Product Surcharge (Tariff): Auto-Add Product to Cart (Matching QTY)

Use this Discount Rule to add a surcharge to items in the cart, such as a tariff. The auto-added product will match the quantity of the main product added to the cart.

👍

You can use this Auto-Add Product to Cart Discount Rule for any use case where extra charges need to be added as a percentage charge of another item.

Step 1: Create a Virtual product for your Product surcharge.

The auto-added Surcharge (Tariff) should be a virtual product so that it is not subject to shipping. It does not need to be visible in your store (1. Not Visible Individually), nor does it need to be assigned a category or have inventory tracked.

Step 2: Create Product Attributes

In Products > Attributes, you will need to set up two custom attributes used for this auto-add product rule. These attributes will be added to any product that needs an automatically-added sku, when added to the cart.

Attribute 1: Create a Text type attribute called Surcharge SKUor a similar name. Check the box next to **Can Be Used for Building Promotions > Discount Rules and Sales**.

Attribute 2: Create a Text type attribute called Surcharge Percentageor a similar name. Check the box next to **Can Be Used for Building Promotions > Discount Rules and Sales**.

Step 3: Add Custom Attributes to Products

In Products > Product Edit > Custom Attributes > Add Attribute

  1. Select the Surcharge SKU attribute and enter the SKU of the Surcharge product as the value. *SKU is case sensitive.

  2. Add another attribute, select the Surcharge Percentage attribute, and enter the percentage amount of the Product price to be added. Only enter the number of the percentage, do not include the % symbol. For example, if the price of Zoey Product 1 is $100, the product "my-surcharge-sku" will be added with a price of $20.

Optional Step: Add a Customization to the Virtual Surcharge Product

Create a Customization, Text Type, to add details on the Order. It is used to add a message to the automatically added item which can indicate which product triggered it to be added.

Title can be something like "Product Details", Type = Text or Area, and How to Charge = Per Item.

📘

Add your Details customization to the Virtual Surcharge Products which will get added to cart automatically.

Copy your Customization Title as it will be used in the next steps.

Step 4: Create the Auto-Add Product Rule

In Promotions > Discount Rules > Create a Discount Rule, enter the Coupon Name (Product Surcharge or Tariff for example), set Status to Active, and Select applicable Customer Groups.

Go to the Actions tab

  1. Apply, select Automatically Add Product To cart (Matching Qty).

  2. Matching Attribute for SKU, select the attribute you created to Surcharge SKU.

  3. Customization Title (OPTIONAL): If you created a Customization on your Virtual Surcharge Product, enter the Customization Title here: Product Details.

  4. Customization Message(OPTIONAL): If you created a Customization on your Virtual Surcharge Product, enter the message to print on the line of the Automatically added products. A surcharge has been added for {{sku}} of {{percent}}

  5. Calculate Amount as Surcharge Percentage from Product Attribute Set to Yes.


  6. Product Attribute for Surcharge select the attribute you created Surcharge Percentage

  7. Apply the rule only to cart items matching the following conditions (leave blank for all items)
    Add Surcharge Percentage greater than 0 - so that only items with that attribute set will get the extra fee.