Creating cart links

There is currently no user interface for creating cart links, but this section includes some basic instructions.
Cart links are simple to form using a few actions and arguments with the following rules:

  • The cart link should be /cart/add/cart_link_content.
  • Chain together as many actions as you want with dashes.
  • Do not put any spaces or use dashes in any action arguments.
  • Use the table below to learn about actions and their arguments.
  • Arguments come directly after their action letters.
  • Specify the redirection by adding ?destination=url where url is the page to go to.

ActionDescriptionArgument
iSets the ID of the cart link.A custom text ID for the link.
eEmpties the customer's cart.None.
mDisplays a preset message to the customer.A message ID.
pAdds a product to the cart.A product string using the rules below...

  • You must at least specify a node ID immediately after the 'p'.
  • Add additional specifications separated by underscores.
  • Specify the quantity with q followed by the number to add.
  • Specify attributes/options using a#o#, replacing # with the ID of the attribute and option.
  • Turn off the add to cart message with m0.

Example: /cart/add/e-p1_q5-imonday_special?destination=cart

This example will empty the cart, add 5 of product 1 to the cart, track clicks with the ID "monday_special", and redirect the user to the cart. To use this on your site, simply create an HTML link to the URL you create:

<a href="http://www.example.com/cart/add/e-p1_q5-imonday_special?destination=cart">Link text.</a>