[-] FO : restored the display of available cart rules in the cart #PSCFV-5473

This commit is contained in:
dMetzger
2012-11-09 13:08:28 +00:00
parent f94d51181c
commit 9e79db962b
4 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -172,7 +172,7 @@ class DiscountCore extends CartRule
*/
public static function getVouchersToCartDisplay($id_lang, $id_customer)
{
return array();
return CartRule::getCustomerCartRules($id_lang, $id_customer);
}
/**
+1 -1
View File
@@ -335,7 +335,7 @@ class ParentOrderControllerCore extends FrontController
'CUSTOMIZE_FILE' => Product::CUSTOMIZE_FILE,
'CUSTOMIZE_TEXTFIELD' => Product::CUSTOMIZE_TEXTFIELD,
'lastProductAdded' => $this->context->cart->getLastProduct(),
'displayVouchers' => Discount::getVouchersToCartDisplay($this->context->language->id, (isset($this->context->customer->id) ? $this->context->customer->id : 0)),
'displayVouchers' => CartRule::getCustomerCartRules($this->context->language->id, (isset($this->context->customer->id) ? $this->context->customer->id : 0)),
'currencySign' => $this->context->currency->sign,
'currencyRate' => $this->context->currency->conversion_rate,
'currencyFormat' => $this->context->currency->format,
+1 -1
View File
@@ -805,7 +805,7 @@ table#cart_summary #total_price_container {
font-weight:normal;
border-top:1px dotted #ccc
}
.cart_voucher #display_cart_vouchers .title_offers {margin-top:10px}
.cart_voucher .title_offers {margin-top:10px}
.cart_voucher #display_cart_vouchers span {font-weight:bold}
.cart_voucher input.discount_name {
padding:0 5px;
+8 -8
View File
@@ -190,16 +190,16 @@
<input type="text" class="discount_name" id="discount_name" name="discount_name" value="{if isset($discount_name) && $discount_name}{$discount_name}{/if}" />
</p>
<p class="submit"><input type="hidden" name="submitDiscount" /><input type="submit" name="submitAddDiscount" value="{l s='OK'}" class="button" /></p>
{if $displayVouchers}
<h4 class="title_offers">{l s='Take advantage of our offers:'}</h4>
<div id="display_cart_vouchers">
{foreach $displayVouchers as $voucher}
<span onclick="$('#discount_name').val('{$voucher.name}');return false;" class="voucher_name">{$voucher.name}</span> - {$voucher.description} <br />
{/foreach}
</div>
{/if}
</fieldset>
</form>
{if $displayVouchers}
<h4 class="title_offers">{l s='Take advantage of our offers:'}</h4>
<div id="display_cart_vouchers">
{foreach $displayVouchers as $voucher}
<span onclick="$('#discount_name').val('{$voucher.code}');return false;" class="voucher_name">{$voucher.code}</span> - {$voucher.name} <br />
{/foreach}
</div>
{/if}
{/if}
</td>
{if $use_taxes}