[-] FO : restored the display of available cart rules in the cart #PSCFV-5473
This commit is contained in:
@@ -172,7 +172,7 @@ class DiscountCore extends CartRule
|
|||||||
*/
|
*/
|
||||||
public static function getVouchersToCartDisplay($id_lang, $id_customer)
|
public static function getVouchersToCartDisplay($id_lang, $id_customer)
|
||||||
{
|
{
|
||||||
return array();
|
return CartRule::getCustomerCartRules($id_lang, $id_customer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ class ParentOrderControllerCore extends FrontController
|
|||||||
'CUSTOMIZE_FILE' => Product::CUSTOMIZE_FILE,
|
'CUSTOMIZE_FILE' => Product::CUSTOMIZE_FILE,
|
||||||
'CUSTOMIZE_TEXTFIELD' => Product::CUSTOMIZE_TEXTFIELD,
|
'CUSTOMIZE_TEXTFIELD' => Product::CUSTOMIZE_TEXTFIELD,
|
||||||
'lastProductAdded' => $this->context->cart->getLastProduct(),
|
'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,
|
'currencySign' => $this->context->currency->sign,
|
||||||
'currencyRate' => $this->context->currency->conversion_rate,
|
'currencyRate' => $this->context->currency->conversion_rate,
|
||||||
'currencyFormat' => $this->context->currency->format,
|
'currencyFormat' => $this->context->currency->format,
|
||||||
|
|||||||
@@ -805,7 +805,7 @@ table#cart_summary #total_price_container {
|
|||||||
font-weight:normal;
|
font-weight:normal;
|
||||||
border-top:1px dotted #ccc
|
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 #display_cart_vouchers span {font-weight:bold}
|
||||||
.cart_voucher input.discount_name {
|
.cart_voucher input.discount_name {
|
||||||
padding:0 5px;
|
padding:0 5px;
|
||||||
|
|||||||
@@ -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}" />
|
<input type="text" class="discount_name" id="discount_name" name="discount_name" value="{if isset($discount_name) && $discount_name}{$discount_name}{/if}" />
|
||||||
</p>
|
</p>
|
||||||
<p class="submit"><input type="hidden" name="submitDiscount" /><input type="submit" name="submitAddDiscount" value="{l s='OK'}" class="button" /></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>
|
</fieldset>
|
||||||
</form>
|
</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}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
{if $use_taxes}
|
{if $use_taxes}
|
||||||
|
|||||||
Reference in New Issue
Block a user