elektrojo Posted July 21, 2013 Share Posted July 21, 2013 am making tutorials using CMS pages in prestashop about the items i sell , I need to add the needed items images with a link under them to add the item to the cart. is that possible? my imagination to page is like the attached file, i made it using paint Link to comment Share on other sites More sharing options...
El Patron Posted July 21, 2013 Share Posted July 21, 2013 this link may prove helpful http://www.prestashop.com/forums/topic/173355-add-to-cart-in-a-cms-page/ 1 Link to comment Share on other sites More sharing options...
elektrojo Posted July 21, 2013 Author Share Posted July 21, 2013 this link may prove helpful http://www.prestasho...-in-a-cms-page/ first of all thank you it's not working for all browsers even the same browser it work well, is there a way to get it as a link that I can embed in icon Link to comment Share on other sites More sharing options...
El Patron Posted July 21, 2013 Share Posted July 21, 2013 I don't know, use google search in english 'prestashop cms add to cart' and look through the postings. my help here was to be your personal google searcher... I have no experience with add to cart and cms... Link to comment Share on other sites More sharing options...
vekia Posted July 21, 2013 Share Posted July 21, 2013 i checked the El Pantron's solution and it works you have to use this code: <p><a onclick="ajaxCart.add(product_id=2, attribute_id=0, true, null, quantity=1, null);">Add to cart</a> remember to define correct product id and also attribute_id ! (if you don't use attribs, use null) 1 Link to comment Share on other sites More sharing options...
elektrojo Posted July 21, 2013 Author Share Posted July 21, 2013 i added this as hyperlink and it wokred "http://www.elektrojo.com/shop/cart?add=&id_product=5&token=3b6f1171bf5da4048a22515063c25d01" this is from my shop links, all what i have to do is change the products ID could you approve this solution ? get the link from any add to cart button in you shop Link to comment Share on other sites More sharing options...
vekia Posted July 21, 2013 Share Posted July 21, 2013 i think that is bad solution, what when someone will have other token? then it will not work. make sure that you've got TOKEN off in your preferences tab in BO then it will probably work + if you want to create nice ajax button as is mentioned above, make sure that youv'e got ajax cart enabled in the preferences tab in your bo + turn off TOKEN Link to comment Share on other sites More sharing options...
smallbizwiz Posted July 4, 2014 Share Posted July 4, 2014 I had a similar issue, and after screwing with a CMS page for a while, I simply copied the Home Featured module, and hooked it to the location I wanted it (i.e. not displayHome). Add-to-Cart worked like a charm. Now attribute values are a different story...I had to hack some code to pass through what I needed using JQuery form fields to get the data. Not pretty, but it works Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now