Jump to content

[SOLVED] Can't delete from cart and history page won't show invoice


Recommended Posts

Hello,

I've found two problems in my shop and have narrowed it to a single piece of code in my header.tpl file.

[removed]
   var baseDir = '{$base_dir}';
   var static_token = '{$static_token}';
   var token = '{$token}';
   var priceDisplayPrecision = {$priceDisplayPrecision*$currency->decimals};
[removed]



With this code in place, the link that reveals the inoice in the history section will work, but it breaks my cart, not allowing a product to be deleted or the quantity changed. An error pops up saying "product not found".

Now, if I remove this code, the cart works but the history page breaks. The javascript link that reveals the invoice (used by customers to get their downloads), doesn't do anything at all.

I've disabled the security token option in the back office because another post in the forum suggested that, and looking at the code above, it made sense, but it hasn't changed anything.

You can see the cart function here: http://olivemanna.com/ Try to add something to the cart and then delete it.

Can you suggest anything to fix this? I really need both features to work together.

Link to comment
Share on other sites

I apologize, I seem to have fixed it. It must have been something in the script. I removed the class "ajax_cart_block_remove_link" from the blockcart delete link and it works now. Maybe this will help someone else though?

Link to comment
Share on other sites

  • 1 year later...

This almost seemed like it fixed my issue I was having when I tried removing items from the cart with the 'trash' icon, it would flash that same alert. Though it fixed it being on the same product page, it still seems to throw the alert on all other pages. Very odd. Perhaps it might be a caching issue...even though I emptied it already. Either way, appreciate your help!

Link to comment
Share on other sites

  • 1 year later...

hi there natalie, thanks for the post, been struggling with this with matice theme. i've got things working making the changes in header.tpl as suggested and works a treat. tried your other method to remove the ajax_cart_block_remove_link from the cartblock.tpl but doesn't seem to make any difference. any idea why it worked for you and not me?

 

thanks

Link to comment
Share on other sites

solved by doing the following...

 

In file /themes/prestashop/js/cart-summary.js in line 30 after

$(document).ready(function()

{

set

baseDir = 'http://domain.pl/dir/';

 

Where 'http://domain.pl/dir/' i base url of your store :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...