Guides and articles » Miscellaneous features and options » Direct link to the basket with items

Direct link to the basket with items


It is possible to create a URL that redirects to your basket and automatically adds one or more products/variants to the basket.

This can, for example, be used if you want to send a customer directly to the purchase of a specific product, without them first having to visit the product page and add it to the basket.

The URL looks like this:

https://www.dinadresse.com/basket?items_add=i:123456,10

In the URL you must replace:

dinadresse.com with your own domain

123456 with the ID of your product. You can see this ID in your browser's URL when you edit the product in the admin.

10 specifies the number of items to add to the basket.

Variants in the basket

If you want to add a variant to the basket, the format looks like this:

https://www.dinadresse.com/basket?items_add=v:123456,10

Here 123456 should be replaced with the ID of the variant. This ID can also be seen in your browser's URL when you edit the variant in the admin.

Multiple different products/variants

It is possible to add several different products and variants to the basket at the same time. This is done by adding the two parameters again, separated by commas.

In this example a total of 6 products/variants are added to the basket.

https://www.dinadresse.com/basket?items_add=i:123456,1,i:123457,2,v:123458,3