This guide covers how to exclude products from discounts and promotions in Shopify, including both Shopify Plus and standard Shopify stores. We also cover removing OP from discounts and promotions in Big Commerce.

Shopify

Shopify Plus

Excluding a product from all discounts and promotions in Shopify typically involves using Shopify Scripts (for Shopify Plus merchants). Shopify Scripts allow you to customize discounts during the checkout process. Here’s how you can do it:

1

Identify The Product

Use the product ID, product handle, or product tag to identify the product(s) you want to exclude.

2

Tag the Product

In your Shopify admin, add the tag no_discount (or a tag of your choice) to the product(s) you want to exclude.

3

Write the Script

Shopify Scripts are written in Ruby. Below is an example script that excludes specific products from discounts.

What the script is doing:

  • Checks each line item in the cart
  • If the product has the tag no_discount, the script resets its line price to the original price, removing any applied discount.
        # This script prevents discounts from applying to products with a specific tag.

      EXCLUDED_TAG = "no_discount" # Replace with your product tag


      # Iterate through the cart line items
      Input.cart.line_items.each do |line_item|
        # Check if the product has the excluded tag
        if line_item.variant.product.tags.include?(EXCLUDED_TAG)
          # Remove discounts from this line item
          line_item.line_price = line_item.line_price_was
        end
      end


      Output.cart = Input.cart
4

Save the Script

  • Go to Shopify Admin > Settings > Checkout > Scripts.
  • Add a new script, paste the Ruby code, and save it.
5

Test the Script

Add the product to the cart and ensure that discounts are not applied to it.

Alternative Approaches

Exclude by Product ID or Handle

EXCLUDED_PRODUCT_IDS = [1234567890, 9876543210] # Replace with your product IDs


Input.cart.line_items.each do |line_item|
  if EXCLUDED_PRODUCT_IDS.include?(line_item.variant.product.id)
    line_item.line_price = line_item.line_price_was
  end
end


Output.cart = Input.cart

Exclude Multiple Products by Tag


EXCLUDED_TAGS = ["no_discount", "exclusive"]


Input.cart.line_items.each do |line_item|
  if (line_item.variant.product.tags & EXCLUDED_TAGS).any?
    line_item.line_price = line_item.line_price_was
  end
end


Output.cart = Input.cart

These scripts ensure that excluded products retain their original prices, unaffected by automatic discounts or promotions.

Notes

  • Shopify Plus Required: Shopify Scripts are only available to Shopify Plus merchants.
  • Checkout Apps: If you are not on Shopify Plus, you may need to use a third-party app to achieve similar functionality.

Non-Shopify Plus (Smaller Plans)

1

Using Discount Conditions and Exclusions

While Shopify Plus offers more flexibility with scripts, standard Shopify (non-Plus) users can still manage some basic exclusions via the discount settings.

Steps for Producing Exclusions

  1. In your Shopify Admin, go to Discounts.
  2. Create or edit a discount code or automatic discount.
  3. Under Discount applies to, select Specific products.
  4. To exclude a product, don’t add it to the discount’s list of applicable products.
  5. You can also create a discount that applies to the entire order or specific product collections while making sure that the excluded product isn’t in those collections.

Limitations

This method is more restrictive. If you have multiple promotions running simultaneously, it may become cumbersome to manually ensure the correct exclusions. For more dynamic or complex scenarios, this might not be sufficient.

2

Tagging Products for Exclusions

A workaround to control product eligibility for discounts in a more granular way is to use tags.

Steps to Use Tags

  1. Add a unique tag to the products you wish to exclude, such as no-discount.
  2. Create a discount code or automatic discount with conditions that apply to products with specific tags.
  3. Exclude the tagged products from the discount by not including the tag when you set up the discount.

For example, in the discount setup: Apply to products without the no-discount tag.

Pro Tip: This requires manual intervention to tag products that should be excluded from discounts and could become cumbersome if you need to manage this frequently.

3

Third Party Apps

For more complex scenarios where you need full control over discount exclusions, there are several apps in the Shopify App Store that offer more advanced discount management features. Some of these apps allow you to exclude specific products or product collections from discounts, even if the discount would typically apply to the cart or order.

Some popular discount management apps include:

  • Automatic Discount & Gift: Provides advanced discount rules, including exclusions based on products, collections, tags, or other conditions.

  • Discounted Pricing by Booster Apps: Allows more complex discount rules, including exclusions of specific products.

  • Wholesale Pricing: If you have a wholesale channel, it helps exclude certain products from customer-specific pricing or promotions.

    These apps often integrate directly with Shopify’s discounting system and allow more flexibility than Shopify’s native tools.

4

Using Shopify Scripts (via Third Party Integrations)

For stores using the Shopify Plus equivalent through third-party integrations, some apps may offer the ability to run scripts similar to Shopify Plus’s Script Editor, though this typically requires an additional subscription or a custom implementation. Apps (like Shopify Scripts by Bold Commerce or Shopify Plus-like Discount Logic apps) offer a way to write custom scripts for complex discount rules. However, this will require integration with apps that allow deeper customization.

5

Custom Development (Liquid Template Customizations)

If you’re comfortable with coding or working with a Shopify developer, you could implement a custom solution to remove discounts at checkout using Liquid (Shopify’s templating language) and some basic JavaScript.

Example Steps:

  1. Use Liquid to check the cart contents and identify if a product is in the “no discount” category or has a special tag.
  2. On the cart page or checkout page, use JavaScript to adjust the price or display a message that the product is not eligible for discounts.

However, be aware that custom JavaScript and Liquid solutions will be more about front-end adjustments and won’t actually block discounts from being applied in the backend or at the checkout level. You would need to enforce logic with the help of third-party apps for backend discount enforcement.

Big Commerce

In BigCommerce, removing a product from all discounts and promotions can be achieved using a combination of settings and customizations. Since BigCommerce doesn’t offer native script-based checkout customization like Shopify Plus, the approach relies on configuring settings or using APIs and custom scripts. Here’s how you can do it:

1

Exclude Products in Discount Rules

When setting up a discount or promotion in BigCommerce, you can explicitly exclude certain products.

Steps to Exclude Products:

  1. Go to Marketing > Promotions in your BigCommerce admin.

  2. Select or create a promotion (e.g., cart-level discount, coupon).

  3. In the promotion setup, look for the section to set Conditions or Exclusions.

  4. Add the product(s) you want to exclude by: • Product name

    • Product SKU

    • Product category

  5. Save the promotion.

This ensures that the selected products will not be eligible for the promotion.

2

Exclude Products by Category or Custom Field

If you frequently need to exclude specific products, you can create a “No Discount” category or use custom fields to identify these products.

Steps:

  1. Create a new category called “No Discount” (optional).
  2. Assign the products you want to exclude to this category or use a custom field such as exclude_from_discount = true.
  3. In your promotions, use the Conditions or Exclusions to exclude this category or filter by custom field.
3

Custom Logic with BigCommerce API

If you need more control, you can use the BigCommerce API to enforce custom logic programmatically.

Steps for Custom Exclusions:

  1. Use the Cart API or Checkout API to monitor cart content.
  2. Identify products that should not receive discounts (e.g., based on product ID, SKU, or custom field).
  3. Write a custom script (e.g., in Node.js or PHP) to:
    • Remove or reset discounts for those products.
    • Adjust the total cart price accordingly.
4

Use Custom Checkout Scripts (Stencil)

For merchants using BigCommerce’s Stencil framework, you can use custom JavaScript to enforce discount exclusion rules at checkout.

document.addEventListener('DOMContentLoaded', function () {
    // Get all cart items
    const cartItems = document.querySelectorAll('.cart-item');
    
    cartItems.forEach(item => {
        const productName = item.querySelector('.product-name').innerText;
        
        // Check if the product is excluded
        if (productName.includes('Excluded Product Name')) {
            const discountElement = item.querySelector('.discount-amount');
            
            // Remove any discount applied
            if (discountElement) {
                discountElement.innerText = '$0.00';
            }
        }
    });
});

This script disables discounts visually in the cart/checkout process. However, you’ll still need backend validation via the API.

Notes

  • BigCommerce lacks a native scripting engine, so many advanced features depend on using APIs, checkout customization, or promotion exclusions.
  • Ensure you test changes thoroughly to avoid disrupting legitimate discounts.
  • For more advanced needs, a BigCommerce partner or developer can assist in creating a robust solution tailored to your store.