// Cart rule display in cart summary
This commit is contained in:
+2
-1
@@ -2665,7 +2665,8 @@ class CartCore extends ObjectModel
|
||||
// The cart content is altered for display
|
||||
foreach ($cart_rules as &$cart_rule)
|
||||
{
|
||||
if ($cart_rule['free_shipping'])
|
||||
// If the cart rule is automatic (wihtout any code) and include free shipping, it should not be displayed as a cart rule but only set the shipping cost to 0
|
||||
if ($cart_rule['free_shipping'] && empty($cart_rule['code']))
|
||||
{
|
||||
$cart_rule['value_real'] -= $total_shipping;
|
||||
$cart_rule['value_tax_exc'] = $total_shipping_tax_exc;
|
||||
|
||||
@@ -226,7 +226,7 @@ class AdminCartRulesControllerCore extends AdminController
|
||||
}
|
||||
|
||||
/* Retrieve the cart rule product rule groups in the POST data if available, and in the database if there is none */
|
||||
public function getProductRuleGroupsDisplay($cartRule)
|
||||
public function getProductRuleGroupsDisplay($cart_rule)
|
||||
{
|
||||
$productRuleGroupsArray = array();
|
||||
if (Tools::getValue('product_restriction') && is_array($array = Tools::getValue('product_rule_group')) && count($array))
|
||||
@@ -258,7 +258,7 @@ class AdminCartRulesControllerCore extends AdminController
|
||||
else
|
||||
{
|
||||
$i = 1;
|
||||
foreach ($cartRule->getProductRuleGroups() as $productRuleGroup)
|
||||
foreach ($cart_rule->getProductRuleGroups() as $productRuleGroup)
|
||||
{
|
||||
$j = 1;
|
||||
$productRulesDisplay = array();
|
||||
|
||||
@@ -672,7 +672,6 @@ table#cart_summary td {
|
||||
vertical-align:top
|
||||
}
|
||||
table#cart_summary td.cart_delete,
|
||||
table#cart_summary td.cart_discount_price,
|
||||
table#cart_summary td.price_discount_del {border-right:none}
|
||||
table#cart_summary .last_item td {border-bottom:1px solid #999}
|
||||
|
||||
|
||||
@@ -100,38 +100,27 @@
|
||||
<td colspan="2" class="price" id="total_product">{displayPrice price=$total_products}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr class="cart_total_voucher" {if $total_discounts == 0}style="display: none;"{/if}>
|
||||
<tr class="cart_total_voucher" {if $total_discounts == 0}style="display:none"{/if}>
|
||||
<td colspan="5">
|
||||
{if $use_taxes}
|
||||
{if $priceDisplay}
|
||||
{if $display_tax_label}{l s='Total vouchers (tax excl.):'}{else}{l s='Total vouchers:'}{/if}
|
||||
{else}
|
||||
{if $display_tax_label}{l s='Total vouchers (tax incl.):'}{else}{l s='Total vouchers:'}{/if}
|
||||
{/if}
|
||||
{if $use_taxes && $display_tax_label}
|
||||
{l s='Total vouchers (tax excl.):'}
|
||||
{else}
|
||||
{l s='Total vouchers:'}
|
||||
{/if}
|
||||
</td>
|
||||
<td colspan="2" class="price-discount price" id="total_discount">
|
||||
{if $use_taxes}
|
||||
{if $priceDisplay}
|
||||
{displayPrice price=$total_discounts_tax_exc}
|
||||
{else}
|
||||
{displayPrice price=$total_discounts}
|
||||
{/if}
|
||||
{if $use_taxes && !$priceDisplay}
|
||||
{assign var='total_discounts_negative' value=$total_discounts * -1}
|
||||
{else}
|
||||
{displayPrice price=$total_discounts_tax_exc}
|
||||
{assign var='total_discounts_negative' value=$total_discounts_tax_exc * -1}
|
||||
{/if}
|
||||
{displayPrice price=$total_discounts_negative}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="cart_total_voucher" {if $total_wrapping == 0}style="display: none;"{/if}>
|
||||
<td colspan="5">
|
||||
{if $use_taxes}
|
||||
{if $priceDisplay}
|
||||
{if $display_tax_label}{l s='Total gift-wrapping (tax excl.):'}{else}{l s='Total gift-wrapping:'}{/if}
|
||||
{else}
|
||||
{if $display_tax_label}{l s='Total gift-wrapping (tax incl.):'}{else}{l s='Total gift-wrapping:'}{/if}
|
||||
{/if}
|
||||
{if $display_tax_label}{l s='Total gift-wrapping (tax incl.):'}{else}{l s='Total gift-wrapping:'}{/if}
|
||||
{else}
|
||||
{l s='Total gift-wrapping:'}
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user