Add to Cart URL link + Multi Prod + Coupon (1.5/2.x/3.x)

Add to Cart URL link + Multi Prod  + Coupon (1.5/2.x/3.x)
(Paste these in your browser url)

Add Single product to cart:
Add 2 products to cart:[0]=44&product_id[1]=48
Add 2 products + coupon[0]=44&product_id[1]=48&coupon=2222

Supported OpenCart Versions:

What does it do:
Adds the ability to add an item to cart by direct link (GET) rather than needing a form post (POST).
Also adds alternative methods of adding by product_id, sku, or model.
Supports options as well (See examples below)

* You will need to have the latest vQmod engine installed (

Main features:
* Simple vQmod script plug and play. No files to edit or overwrite.
* Supports lookup by product_id, sku, or model
* Instantly adds to cart and redirect to cart page
* Supports adding coupon code as part of url
* If product has required options that were not specified, it will redirect to the product page to allow proper choice
* Can be expanded to support ANY unique field (isbn, upc, location, etc)
* Passable Parameters:
- product_id
- xproduct_id (alternative if running
- model
- sku
- quantity
- option
- redirect (eg: checkout/checkout)
- recurring_id
- coupon

Examples of use:
Single Product examples:
For single products, pass in the key=value format

For options, pass the product_option_id inside a square bracket equal to the product_option_value_id
You can get these 2 values from the html source for the option. For example, the select will have the product_option_id and the option will have the product_option_value_id

Product with no options (product_id):
Product with qty of 2 (product_id):
Product with 1 option (product_id):[8]=22
Product with 1 option and qty of 2 (product_id):[8]=22
Product via sku with qty of 2:
Product via model with qty of 5:
Product via product_id with qty of 2 and redirect to the checkout page:
Product with recurring_id set:
Product with coupon and quantity set:
Product with text option set:[8]=This+is+a+text+option

Multi product examples:
For multiple products, use the square brackets with the index (starting from 0) []

For options, first use the indexed square bracket as shown above, then pass the product_option_id inside a second square bracket equal to the product_option_value_id

2 Products[0]=66&product_id[1]=40
2 Products, different quantity[0]=66&quantity[0]=3&product_id[1]=40&quantity[1]=4
2 Products with options
2 Product with coupon:[0]=30&product_id[1]=40&coupon=12345
How to figure out the option id for options in url:
In my above url examples you can see the part with "&option[8]=22"
That means the option id is "8" and the option value id is "22"
To Look this up
1. Use the "View Source" on your browser while looking at a product page with options.
2. Search for this exact string. Be sure not to add the final quote.
3. Now you should be able to see which option corresponds to the option id and option value id.
4. For text or textarea, you would use the option id = the actual text you want with spaces replaced by plus symbols (e.g. &option[25]=This+is+my+Text).

Other great uses:
To allow for creating custom invoices by adding an item to the cart with a custom price and then redirecting them right to checkout:

Combine with my Custom Price Product mod
Then call the url passing the custom price and redirect:[227]=123.25&redirect=checkout/checkout


  • Developed by OpenCart Partner
  • Documentation Included


1.5.4,,, 1.5.6,,,,,,,,,,,,,,,,,,,, 4.x.x.x,,

Last Update
7 Jan 2019

14 Apr 2013
234 Sales
Member since: 23 Apr 2010

View all extensions Get Support