// Cart rule display in cart summary

This commit is contained in:
dMetzger committed 2012-05-30 09:29:55 +00:00
1 parent 020f843dbe
commit fafaaf783e
4 files changed
+12 -23

No files matched your search

+2 -1
View File
@@ -2665,7 +2665,8 @@ class CartCore extends ObjectModel
// The cart content is altered for display // The cart content is altered for display
foreach ($cart_rules as &$cart_rule) 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_real'] -= $total_shipping;
$cart_rule['value_tax_exc'] = $total_shipping_tax_exc; $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 */ /* 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(); $productRuleGroupsArray = array();
if (Tools::getValue('product_restriction') && is_array($array = Tools::getValue('product_rule_group')) && count($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 else
{ {
$i = 1; $i = 1;
foreach ($cartRule->getProductRuleGroups() as $productRuleGroup) foreach ($cart_rule->getProductRuleGroups() as $productRuleGroup)
{ {
$j = 1; $j = 1;
$productRulesDisplay = array(); $productRulesDisplay = array();
-1
View File
@@ -672,7 +672,6 @@ table#cart_summary td {
vertical-align:top vertical-align:top
} }
table#cart_summary td.cart_delete, 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 td.price_discount_del {border-right:none}
table#cart_summary .last_item td {border-bottom:1px solid #999} table#cart_summary .last_item td {border-bottom:1px solid #999}
+8 -19
View File
@@ -100,38 +100,27 @@
<td colspan="2" class="price" id="total_product">{displayPrice price=$total_products}</td> <td colspan="2" class="price" id="total_product">{displayPrice price=$total_products}</td>
</tr> </tr>
{/if} {/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"> <td colspan="5">
{if $use_taxes} {if $use_taxes && $display_tax_label}
{if $priceDisplay} {l s='Total vouchers (tax excl.):'}
{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}
{else} {else}
{l s='Total vouchers:'} {l s='Total vouchers:'}
{/if} {/if}
</td> </td>
<td colspan="2" class="price-discount price" id="total_discount"> <td colspan="2" class="price-discount price" id="total_discount">
{if $use_taxes} {if $use_taxes && !$priceDisplay}
{if $priceDisplay} {assign var='total_discounts_negative' value=$total_discounts * -1}
{displayPrice price=$total_discounts_tax_exc}
{else}
{displayPrice price=$total_discounts}
{/if}
{else} {else}
{displayPrice price=$total_discounts_tax_exc} {assign var='total_discounts_negative' value=$total_discounts_tax_exc * -1}
{/if} {/if}
{displayPrice price=$total_discounts_negative}
</td> </td>
</tr> </tr>
<tr class="cart_total_voucher" {if $total_wrapping == 0}style="display: none;"{/if}> <tr class="cart_total_voucher" {if $total_wrapping == 0}style="display: none;"{/if}>
<td colspan="5"> <td colspan="5">
{if $use_taxes} {if $use_taxes}
{if $priceDisplay} {if $display_tax_label}{l s='Total gift-wrapping (tax incl.):'}{else}{l s='Total gift-wrapping:'}{/if}
{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}
{else} {else}
{l s='Total gift-wrapping:'} {l s='Total gift-wrapping:'}
{/if} {/if}