Jump to content

Help with code for add to cart button


Recommended Posts

I'm new in prestashop. I've started my first project using this great tool.
Happens that I'm not being able to create an add to cart button capable of dealing with product combinations.
I am using a module to personalize a product (selecting diferent attributes for the product) in the end the client should press the add to cart button and the product should appear n the cart.
I've explored cart.php searching for a solution and tried to find the code using firebug but no luck...

Help is very much appreciated.
Thank you in advance

Share this post

Link to post
Share on other sites

First of all thank you for your interest in my problem.
I've been trying to understand the way the prestashop cart works and from what I understood (please correct me if I'm wrong)
1 - the client chooses a product it's attributes and presses the 'add to cart' button
2 - prestashop uses the ID of the choosen product and it's atributes ids to find a product combination
3 - prestashop adds that combination to the cart

If this is right I should be able to create a code to use in my 'add to cart' button to accomplish this.

To be honest what is really missing is knowledge of the tool but I'm hoping to learn it fast to be able to develop some new modules for the comunity.

If you could give me a better insight about the prestashop cart it would be very much appreciated.

Share this post

Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More