Use permalinks to pre-load the cart


This is an advanced tutorial and is not supported by Shopify. Knowledge of web design languages such as HTML, CSS, Javascript and Liquid is required. We suggest hiring a Shopify Expert if you are not comfortable proceeding with the following tutorial.


If you want to see more educational videos and tutorials like this one, visit our video library.

Have you ever wanted to link directly to the Shopify checkout screen with a specific cart already loaded with items? Have you ever wanted to put a "Buy it now" buttons in blogs and newsletters? Have you ever wanted to provide an easy reorder link to customers? Cart Permalinks allows you to do all that and more.

A cart permalink takes your customers directly to the first page of the checkout screen with items already in their cart. Any cart that they might have begun populating with items will be completely untouched and ignored as long as it is in "session".

This is what a cart permalink looks like:,70881382:1

Where 70881412 is the product variant's ID and 1 if the quantity.

So the format of the url is:{variant_id}:#{quantity}(,...)


Notes, cart attributes, and tracking parameters can be added as query parameters as usual. If customer accounts are enabled on your website, and the user is not logged in, they will see the login page before reaching the checkout.

Where do I find my product variant's ID?

To find your product variant's ID, check out this article: Where do I find my variant's ID?

Add a "Buy this" link to a blog post

  1. On the Blog posts page, either add a new blog post or click on an existing blog post.

  2. In the Rich Text Editor, under the "Content" header, click the HTML button:

    Html btn
  3. Add your link. It should look something like this:

    <p><a href="">Buy this item</a></p>
  4. Save your changes and test it out in your store.

You can add a 'reorder' link right in your theme's customers/order.liquid template for each line item in the order.

  1. Find the theme you want to edit, click the ... button, and then click Edit HTML/CSS.

  2. Under the Templates folder, locate and click on customers/order.liquid to open it in the online code editor. Don't see the template? Create one by click the Add a new template link.

  3. In the online code editor, paste the following piece of code where you would like your link to appear:

    <a href="/cart/{{ line_item.variant_id }}:{{ line_item.quantity }}">Reorder this</a>
  4. Click Save to confirm your changes.

Conversion tracking

Wish to add some tracking info to the URL, which will then show up on the order details page in your admin, when orders come in?

Use the one and single cart note:


Or use a cart attribute (you can have several of those):


The cart note and cart attributes are shown on the order details page under Order Note.

Or use the 'ref' parameter:


The ref value is shown on the order details page under Conversion:


Can I let the customer edit quantities?

You can't. Quantities cannot be edited when the customer follows a cart permalink.

Want to discuss this page?

Visit the Shopify Community