Jump to content

Add to Cart not working in Accessories Tab


Daniel D

Recommended Posts

When I click "Add to Cart" button in the Accessories Tab, I get the following message: "Product not found This product is no longer available."

The view button works well.

I use Prestashop 1.6.0.9

Please click the following link to see the problem on my website:

 

http://www.studioworks.com.au/century-c-stand/heavy-duty-c-stand-with-boom-arm

 

I hope someone can help

Thanks

Daniel

post-770786-0-35046200-1490331412_thumb.jpg

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

  • 2 months later...

Open product.tpl in the theme folder, reach the 'accessories' area, and see where you have the <a> tag that adds a product to the cart.
It has a "rel" attribute, but it won't work with 1.6

instead, add this property to it

data-id-product="{$accessory.id_product|intval}" 

Should do it :)

Link to comment
Share on other sites

Hi

Thanks for the help.

I replaced

l'}" rel="ajax_id_product_{$accessory.id_product|intval}" title="{l s='Add to cart'}">{l s='Add to cart'}</a>

with

l'}" rel=data-id-product="{$accessory.id_product|intval}" title="{l s='Add to cart'}">{l s='Add to cart'}</a>

 

I cleared the cache and I still get Product not found This product is no longer available when I click on Add to Cart

I hope there is another solution.

Thanks

Daniel

Link to comment
Share on other sites

No you should replace

rel="ajax_id_product_{$accessory.id_product|intval}" title="{l s='Add to cart'}">{l s='Add to cart'}</a>

with

data-id-product="ajax_id_product_{$accessory.id_product|intval}" title="{l s='Add to cart'}">{l s='Add to cart'}</a>

so change is just from rel to data-id-product .

  • Like 1
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...