B-219 Sec-55 Noida, India
+918010221733

Deep links to add your Magento products straight to cart

I was asked recently how do you add a product straight to your Magento cart from a link that is external to your Magento store. It turns out the answer is quite straight forward BUT there are some things you need to consider.

To add a simple product to your cart use this link
http://yourwebsite.co.uk/checkout/cart/add?product=85&qty=1

  • obviously yourwebsite.co.uk is the URL to your Magento store
  • product=85 replace 85 with the Magento ID of the product you want to be placed in the cart. You can find this id in the admin – > Catalog > Manage Products the ID is contained in the far left column.
  • qty=1 the 1 represents the quantity of products you want added to the basket. If you want more than 1 increase the number here.

This allow you to directly add simple products to a shopping basket. You may want to do this from a blog, an email or even an advert campaign.

Something to consider

1. If the person adding this to the basket has never been to your website before then they will be presented with the ‘Cookies’ page. You may not spot this error as the chances are you have a cookie on your machine for past test orders you have created but first time visitors will see this using the link created. You need to turn off the ‘Redirect to Cookies Page’ if a cookie is not detected. To do that go to > Configuration > Web > Browser Capabilty Detection > and select  ’No’ in the option ‘Redirect to CMS-page if Cookies are Disabled’

(Visited 34 times, 1 visits today)

Leave a reply

You must be logged in to post a comment.