Querystring Variables

RazorCart > Integration

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/Default.aspx?productid=1

Multiple Products: http://www.mydomain.com/Cart/Default.aspx?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/Default.aspx?productid=1&qty=2

Multi Product: http://www.mydomain.com/Cart/Default.aspx?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.aspx?Variants=1~3~5

Multi Product: http://www.mydomain.com/cart.aspx?Variants=1~3~5;14~34~35~38

With Quantity: http://www.mydomain.com/cart.aspx?Variants=1~2390;2~1&Qty=2,3

User Entered Amount: http://www.mydomain.com/cart.aspx?Variants=1~3&Price=50.00

Please Note:

  • A semi colon is used to delimit Product IDs and the tilde is used to delimit Variant IDs. This format allows you to add multiple products and multiple variants and associate products with a specific set of variants.
  • In order to pass a user entered amount in the querystring you must have User Entered Amounts enabled in the product setup screen for the product you want to add.

 

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.aspx?Sku=ABC123

With Quantity: https://www.mydomain.com/cart.aspx?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/Default.aspx?productid=1

With Variant: http://www.yoursite.com/details/Default.aspx?productid=1&variantid=4

Multi Variant: http://www.yoursite.com/details/Default.aspx?productid=1&variantid=4&variantid=7