Jump to content

EDIT: major issue for 1.4 based themes


Recommended Posts

original title: Cart broken in 1.5.0.13

 

Hi,

 

I'm new to the Prestashop platform. I'm building a site on the RC1 of Prestashop 1.5, and I'm assembling strong customizations to a custom theme.

 

In the process, I noticed how the cart isn't really working if AJAX is disabled. Clicking on the Add to Cart button from any page other than the product page won't work, and deleting products from the cart module is also not possible. The order/cart page is also not responding to commands such as deleting and quantity change.

 

Everything works if I enable AJAX, but for many reasons we don't want to enable it on this website.

 

Is it something known to not work at the current state of the 1.5 release?

 

EDIT: The default theme also won't work properly... the order page (the cart) will respond to delete, increase and decrease commands, but the Add buttons from - say - the category pages, won't work.

Edited by David @ Vendilo (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

This problem was due to the fact that most of the themes that are compatible with 1.4 (in fact based on the default theme) have a different way of building links.

 

In 1.4 is not uncommon to find something like this:

href="{$link->getPageLink('cart.php', true)}?delete&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&token={$token_cart}"

 

while in 1.5 they should be something like:

href="{$link->getPageLink('cart.php', true)}&delete&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&token={$token_cart}"

 

The main difference is the question mark (?) in the link. In 1.5, it's already in the link due to the controller variable. Adding another one would break the link, ignoring all the parameters

Link to comment
Share on other sites

×
×
  • Create New...