Revindex Storefront


Last updated on 2015-06-05 2 mins. to read

Below are several examples you may find helpful.

  1. To add a single product to cart with a quantity of 1: 
  2. To reset the cart before adding a single product with a quantity of 2: 
  3. To add a single specific variant with a quantity of 5: 
  4. You can also pass the parameters using normal querystring if your site is not configured with friendly URL: 
  5. To add a single product and populate the custom fields (dynamic form), you need to pass the name & value pairs through the rvdsfdfr parameter. Suppose you created 2 custom fields for your product with the IDs "MyPrice" and "MyDesc". 

    You start by crafting your custom fields parameters as if it's a querystring:


    Then you encode it and append it to the rvdsfdfr parameter so you end up with a URL like this: 
  6. To add multiple products, you can chain a new URL using the returnurl parameter. You can chain as many URLs as you like (up to the limitation of your browser, usually 2000 characters). You must remember to encode the URL that you're chaining to so that any special characters don't conflict. If you're chaining multiple URLs, you need encode over the previously encoded URL (even if it's already encoded). 


Richard Jul 25, 2018 4:01 PM
Please can you provide an example of co to simply clear the shopping cart.

Powered by Revindex Wiki