Adding a Product to the Cart via Querystring

Last modified by philwinkle on Thu, June 24, 2010 16:41
Source|Old Revisions  

This is an old revision of the document!


In working with Magento oftentimes you find yourself wanting to use the cart, checkout and administrative functions of the application without having to be tied to using all of the underlying CMS functionality as well. Many organizations rely on static html frontends while linking to offsite carts. Using Magento’s own built-in functionality we can add simple and bundled items to the cart easily without any intermediary steps.

Adding a Simple Product

By Magneto ID

Simple products are the easiest to add because there are fewer options that need to be passed. The basic structure is:

/path/to/app/checkout/cart/add?product=[id]&qty=[qty]

Where [id] is the Magento ID of the product and [qty] is the Quantity you wish to add.




 

Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs