Cron Jobs, Reminder, Fonts, Members / Wizard / Price, Credit and Promotion
This commit is contained in:
parent
a0f4eda6ea
commit
6167273a48
204 changed files with 8746 additions and 215 deletions
|
|
@ -14,6 +14,7 @@ var IqShoppingCart = {
|
|||
cart_input: '.cart-input-event-onchange',
|
||||
remove_item: '.remove_item_form_cart',
|
||||
shipping_state: '#change_shipping_state',
|
||||
reduce_payment_credit: '#switch_reduce_payment_credit',
|
||||
comp_products: 'switchers-comp-product',
|
||||
count_comp_products: 'count_comp_products',
|
||||
shipping_is_for: 'shipping_is_for',
|
||||
|
|
@ -58,6 +59,10 @@ var IqShoppingCart = {
|
|||
event.preventDefault();
|
||||
_self.update_cart_database($(this).data('product-id'), 0);
|
||||
});
|
||||
$(_self.reduce_payment_credit).on('change', function(event){
|
||||
event.preventDefault();
|
||||
_self.re_calculate_cart($(this).is(':checked'));
|
||||
});
|
||||
$('input[name^="'+_self.comp_products+'"]').on('change', function(){
|
||||
_self.update_comp_product($(this));
|
||||
});
|
||||
|
|
@ -117,18 +122,22 @@ var IqShoppingCart = {
|
|||
_self.performRequest({product_id: product_id, qty: qty, action: 'updateCart'})
|
||||
.done(_self.refreshItemsAndView);
|
||||
},
|
||||
re_calculate_cart: function (checked){
|
||||
var _self = this;
|
||||
_self.performRequest({reduce_payment_credit: checked, action: 'reCalculateCart'})
|
||||
.done(_self.refreshItemsAndView);
|
||||
},
|
||||
refreshItemsAndView: function (data){
|
||||
var _self = IqShoppingCart;
|
||||
$(_self.card_holder).html(data.html_card);
|
||||
$(_self.comp_holder).html(data.html_comp);
|
||||
_self.showInit();
|
||||
|
||||
},
|
||||
refreshDatabaseAndView: function (data) {
|
||||
var _self = IqShoppingCart;
|
||||
$(_self.card_holder).html(data.html_card);
|
||||
$(_self.comp_holder).html(data.html_comp);
|
||||
|
||||
|
||||
var input = $(_self.table).find('input[name="product_qty_'+data.data.product_id+'"]');
|
||||
input.val(data.data.qty);
|
||||
_self.showInit();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue