// add hack for blockcart cache and back button
This commit is contained in:
@@ -670,8 +670,9 @@ $(document).ready(function(){
|
||||
ajaxCart.overrideButtonsInThePage();
|
||||
|
||||
var cart_qty = 0;
|
||||
var current_timestamp = parseInt(new Date().getTime() / 1000);
|
||||
|
||||
if (typeof $('.ajax_cart_quantity').html() == 'undefined')
|
||||
if (typeof $('.ajax_cart_quantity').html() == 'undefined' || (generated_date != null && (parseInt(generated_date) + 30) < current_timestamp))
|
||||
ajaxCart.refresh();
|
||||
else
|
||||
cart_qty = parseInt($('.ajax_cart_quantity').html());
|
||||
|
||||
@@ -38,6 +38,7 @@ var removingLinkText = '{l s='Please remove this product from my cart.' mod='blo
|
||||
var freeShippingTranslation = '{l s='Free shipping!' mod='blockcart' js=1}';
|
||||
var freeProductTranslation = '{l s='Free!' mod='blockcart' js=1}';
|
||||
var delete_txt = '{l s='Delete' mod='blockcart' js=1}';
|
||||
var generated_date = {$smarty.now|intval};
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ var removingLinkText = '{l s='remove this product from my cart' mod='blockcart'
|
||||
var freeShippingTranslation = '{l s='Free shipping!' mod='blockcart' js=1}';
|
||||
var freeProductTranslation = '{l s='Free!' mod='blockcart' js=1}';
|
||||
var delete_txt = '{l s='Delete' mod='blockcart' js=1}';
|
||||
var generated_date = {$smarty.now|intval};
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user