Phil C Posted July 12, 2011 Share Posted July 12, 2011 Hi everyone,Is it possible to add a product to the shopping cart via a URL link? For example a link from an external website?I'm creating a special module in our website in flash and want to create an "add to cart" button which adds produts to the cart.Thanks for any help!Phil Link to comment Share on other sites More sharing options...
Phil C Posted July 13, 2011 Author Share Posted July 13, 2011 No one able to help here? Link to comment Share on other sites More sharing options...
Lindsayanng Posted July 13, 2011 Share Posted July 13, 2011 Quick question: Will this page be on the same server under the same domain name as the actual store? If so, you will have to include the prestashop config and application pages that do all of that cookie management and order passing. Then you create a form that calls cart.php where your submit button is your add to cart button its not as easy as I am making it sound, however. You need to be able to maintain the cookie between the two pages. Link to comment Share on other sites More sharing options...
Phil C Posted July 13, 2011 Author Share Posted July 13, 2011 Thanks for the response Lindsay, I was hoping there would be a simple way to extract the URL to add a product tot he cart.doesn't look like this is possible in presta though, so I'll keep looking!Thanks agian,Phil Link to comment Share on other sites More sharing options...
Lindsayanng Posted July 13, 2011 Share Posted July 13, 2011 It's possible, but you can't pass information via a plain url. It needs to actually know the product info, the price, etc and then pass it into the cart. Unless you are using curl/javascript (like FBML) I dont think there is any other way to pass information from a plain old URL Link to comment Share on other sites More sharing options...
Phil C Posted July 13, 2011 Author Share Posted July 13, 2011 I thought there may be a url along the lines of:www.storename.com/add_cart.php&category=1?product_id=1?attribute01=100The only e-cmmerce system I've seen with this built in (smoothly) is http://www.hikashop.com. There's a button you can press on a product admin page (or the child/variant's page) which provides the html link to add that item to the cart.That isn't available in presta then i assume?It's a shame because its crucial to the store i'm setting up Link to comment Share on other sites More sharing options...
Lindsayanng Posted July 13, 2011 Share Posted July 13, 2011 Did this add a curl that could be use OUTSIDE of the install?? Oh just on another page without the cart install? My suggestion would be to maybe make a new template page and just include your flash file in there and then add an add to cart button Link to comment Share on other sites More sharing options...
Phil C Posted July 13, 2011 Author Share Posted July 13, 2011 Yeah the links work from external areas also.I will have a play about with presta and see what i can come up with. It's a shame its not as straight forward as I'd hoped, but things rarely are! Link to comment Share on other sites More sharing options...
lukas25 Posted April 11, 2012 Share Posted April 11, 2012 Try something like this: http://yoursite.com/cart.php?add&id_product=19 Where 19=product ID, it work even with frindly URL running Link to comment Share on other sites More sharing options...
Recommended Posts