Jump to content

[SOLVED] Disabling ajax / javascript in shopping-cart.tpl


Recommended Posts

Hello,

I'm wondering if there is a simple way (like an option in the backend i simply can't find) for disabling ajax / javascript for shopping-cart.tpl.

 

By disabling ajax i mean, the price and quantity updates when removing a product or changing the quantity. We have some special calculations going on which are obviously not being updated by the default functionality. We plan to include these calculations in the cart-summary.js at a later date but don't have time now and would like to just use the shopping-cart.tpl with page refreshes for now.

 

Any help would be greatly appreciated.

 

p.s. ajax-cart in the blockcart module is disabled, doesn't stop the cart summary page from being ajax'd though :(

 

Edited by defuzed (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Well it was enough for our needs to just comment the first 3 .on('click') functions from cart-summary.js

$('.cart_quantity_up').off('click').on('click', function(e){
  e.preventDefault();
  upQuantity($(this).attr('id').replace('cart_quantity_up_', ''));
});
$('.cart_quantity_down').off('click').on('click', function(e){
  e.preventDefault();
  downQuantity($(this).attr('id').replace('cart_quantity_down_', '')); 
});
$('.cart_quantity_delete' ).off('click').on('click', function(e){
  e.preventDefault();	
  deleteProductFromSummary($(this).attr('id')); 
});

becomes

/* $('.cart_quantity_up').off('click').on('click', function(e){
  e.preventDefault();
  upQuantity($(this).attr('id').replace('cart_quantity_up_', ''));
});
$('.cart_quantity_down').off('click').on('click', function(e){
  e.preventDefault();
  downQuantity($(this).attr('id').replace('cart_quantity_down_', '')); 
});
$('.cart_quantity_delete' ).off('click').on('click', function(e){
  e.preventDefault();	
  deleteProductFromSummary($(this).attr('id')); 
}); */

crazy complicated i know :D

Link to comment
Share on other sites

×
×
  • Create New...