Menu Close

Get Support From ShopWired Close

All systems fully operational

Subscribe To Updates
Prefer To Live Chat? Chat directly with ShopWired support Available from 9.00am to 6.00pm Monday to Friday Quickest response time
Send A Message
Response within 24 hours

Menu Close

Menu

How to add products to basket from a text link

Products are normally add to a user's shopping basket when the user clicks the 'add to basket' option.

If product variations (like sizes or colours), and/or product extras, are available on the product, then the user will have to select those options first before adding the item to their basket.

You may want the customer to be able to add a product to their basket by clicking a quick link (rather than a button on the product page) and if a product has variations or options, these can be preselected for the customer.

The customer will click a text link like 'add to your basket' or it could be an image. A good example is shown below:

The help guide here describes how to create the URL for the link, not how to formulate the image/text that people will click on.


Creating the URL

Here's an example URL

http://www.yourdomainname.com/lion-t-shirt?add-to-basket&quantity=2&variation[Colour]=Green

The first part, before the question mark, is the URL for the product. This can be obtained by going to the product on your website and copying the URL from your browser's address bar.

The part after the question mark has the following features

add-to-basket tells the system to add the product to the basket

quantity tells the system what quantity of the product to add

variation if the product has variations, what variations should be selected

choice if the product has choices, what choices should be selected

extras if the product has extras, what extras should be selected

comments allows comments to be added to the product in the order (such as customisation text)

If a product doesn't have variations, choices or extras then you don't need to include these in the URL.


Variations

variation[variation-name]=variation-selected

e.g. variation[size]=small

variation-name is the name of the option (like 'size' or 'colour')

variation-selected is the name of the variation that you would like to be selected (e.g. 'small' or 'green')

multiple variations can be configured with the &, e.g.

variation[size]=small&variation[colour]=green

Choices

choice[choice-name]=choice-selected

e.g. choice[finish]=metal

choice-name is the name of the product choice (like 'finish' or 'material')

choice-selected is the name of the choice that you would like to be selected (e.g. 'metal' or 'walnut')

multiple choices can be configured with the &, e.g.

choice[finish]=metal&choice[feet]=walnut

Extras

extras=choice-ID

e.g. extras=10103

choice-ID is the unique ID of the product choice

multiple product extras can be configured with a comma, e.g.

extras=10103,10903


Warning!

Please be aware that product variations and choices are case sensitive!