Search

Contents

Revindex Storefront

Export Print

Examples

Below are several examples you may find helpful.

  1. To add a single product to cart with a quantity of 1:

     http://a.com/product/tabid/138/rvdsfpid/product-1/rvdspact/1/rvdsfpvqty/1/default.aspx 
  2. To reset the cart before adding a single product with a quantity of 2:

     http://a.com/product/tabid/138/rvdsfpid/product-1/rvdspact/1/rvdsfpvqty/2/rvdsfrcart/1/default.aspx 
  3. To add a single specific variant with a quantity of 5:

     http://a.com/product/tabid/138/rvdsfpid/product-1/rvdspact/1/rvdsfpvqty/5/rvdsfpvid/3/default.aspx 
  4. You can also pass the parameters using normal querystring if your site is not configured with friendly URL:

     http://a.com/default.aspx?tabid=138&rvdsfpid=1&rvdspact=1&rvdsfpvqty=1&rvdsfpvid=3 
  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:

     MyPrice=10.00&MyDesc=Hello 

    Then you encode it and append it to the rvdsfdfr parameter so you end up with a URL like this:

     http://a.com/default.aspx?tabid=138&rvdsfpid=1&rvdspact=1&rvdsfpvqty=1&rvdsfpvid=3&rvdsfdfr=MyPrice%3D10.00%26MyDesc%3DHello 
  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).

     http://a.com/default.aspx?tabid=138&rvdsfpid=1&rvdspact=1&rvdsfpvqty=1&rvdsfpvid=3&returnurl=http%3A%2F%2Fa.com%2Fdefault.aspx%3Ftabid%3D138%26rvdsfpid%3D2%26rvdspact%3D1%26rvdsfpvqty%3D1 

Comments

Add comment
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