Querystring Variables

RazorCart supports a number of different querystring operations to dynamically pass data into various pages in your store.  The querystring is the part of the URL that contains data to be passed to RazorCart to perform a dynamic operation in the cart. 

The following querystring operations are supported in RazorCart:

  • Product List - Filter Products By Category
  • Add to Cart - Single/Multiple Products
  • Add to Cart - Product and Quantity
  • Add to Cart - Variants
  • Add to Cart - By Sku
  • Product Details - Products and Variants

 

Product List - Filter Products By Category

The product listing page allows you to filter products by category by passing the CategoryID or URL Keywords in the querystring. When the CategoryID or URL Keywords are passed in the querystring the products will be filtered by Category. This feature will allow you to create your own separate category page using the DNN Html module and rich text editor with links or images to filter your products.

The Category ID for each Category in your store is listed on the Manage Categories screen.

Example: http://www.yourdomain.com/Store?categories=1

The URL Keywords for each Category in your store are configured on the Edit Category screen.

Example: http://www.yourdomain.com/Store/categories/[URLKeywords]

 

Add To Cart - Single/Multiple Products

Single Product: http://www.mydomain.com/Cart?productid=1

Multiple Products: http://www.mydomain.com/Cart?productid=1,2,3

When the ProductID is passed in the querystring the product(s) will be added to the Cart.

 

Add To Cart - Product and Quantity

RazorCart supports adding products with quantity to your cart by passing the ProductID and Quantity(qty) in the querystring.

When the ProductID and qty is passed in the querystring the product(s) and Quantity will be added to the Cart.

Examples

Single Product: http://www.mydomain.com/Cart?productid=1&qty=2

Multi Product: http://www.mydomain.com/Cart?productid=5,6,12,19,28&qty=1,2,1,2,1

 

Add To Cart - Variants

RazorCart supports adding Products with Variants directly to your cart by adding Product ID and Variant ID in the querystring.

When the Product ID and Variant ID is passed in the querystring the product(s) and Variant(s) will be added to the Cart.

Examples

Single Product: http://www.mydomain.com/cart?productid=1&variants=5

Multi Product: http://www.mydomain.com/cart?productid=1&variants=3~6&productid=8&variants=8

With Quantity: http://www.mydomain.com/cart?productid=1&variants=15&qty=2

User Entered Amount: http://www.mydomain.com/cart?productid=1&variants=7&price=50.00

 

Add To Cart - SKU

RazorCart supports adding products directly to your cart by passing the SKU in the querystring.

When a Product SKU is passed in the querystring to the cart page, the cart will look up the Product by SKU and add the Product to the cart.

Examples

Single Product: https://www.mydomain.com/cart?sku=ABC123

With Quantity: https://www.mydomain.com/cart?sku=ABC123&qty=3

 

Product Details Page - Products and Variants

The Product Details module allows you to pass the Product ID in the querystring

When the Product ID is passed in the querystring the Products Details page will be loaded with the Product information associated with the Product ID passed in the querystring.

Examples

Product:http://www.yoursite.com/details?productid=1

With Variants:http://www.yoursite.com/details?ProductID=1&Variants=1~2

 

 

 

Add Feedback