Browse by Topic

Using Custom Links to Add a Product to the Cart

You can use the SKU of a simple product or variant to create custom product URLs to perform specific actions, like:

  • link to a specific product variant
  • add a specific product or variant to the cart
  • add a specific product or variant to the cart, then go directly to checkout
  • add a specific product or variant to the cart, go directly to checkout, and add a source parameter for analytics and conversion tracking

These custom links can be used as a call to action in marketing materials like blog posts, email newsletters, and social media updates. Only a single item (quantity 1) can be added to the cart at a time using a custom link.

Use Buy Buttons to generate custom buy buttons and links that you can add to your blog, social media channels and more. See Buy Buttons for setup and examples.

Buy Button app demonstrating how to generate a custom buy link

Add Product or Variant to Cart

To automatically add a product or variant to a shopper's cart and take them directly to the cart page, include cart.php?action=add&sku=INSERT-SKU-HERE after your store's domain.

Structure:
site.com/cart.php?action=add&sku=INSERT-SKU-HERE

Example:
mybcstore.com/cart.php?action=add&sku=SHIRT-SM-RED

Add Product or Variant to Cart and Go Directly to Checkout

To automatically add a product or variant to a shopper's cart and forward them directly to checkout, include cart.php?action=buy&sku=INSERT-SKU-HERE after your store's domain.

Structure:
site.com/cart.php?action=buy&sku=INSERT-SKU-HERE

Example:
mybcstore.com/cart.php?action=buy&sku=SHIRT-SM-RED

Add Product or Variant to Cart, Go Directly to Checkout, and Include Source

To automatically add a product or variant to a shopper's cart, forward them to checkout, and include source parameter for analytics/conversion tracking, include cart.php?action=buy&sku=INSERT-SKU-HERE&source=SOURCE-HERE after your store's domain. The source parameter can be any string.

Structure:
site.com/cart.php?action=buy&sku=INSERT-SKU-HERE&source=SOURCE-HERE

Example:
mybcstore.com/cart.php?action=buy&sku=SHIRT-SM-RED&source=JULY-EMAIL-NEWSLETTER

Was this article helpful?