How to create a fee that will be applied to certain products only?

How to create a fee that will be applied to certain products only?

The Extra Fee extension allows creating a fee for mixed carts that will be applied to specific products in the cart only. To create such a fee, please go to Magento Admin Panel → Amasty Extensions → Extra Fee → Fees and create a fee with the value that you require. Here you can find an example both for a fixed fee and for a percent fee:


 
To define the products that fall under the fee, please go to the Calculation tab inside your fee, then proceed to the Fee Calculation Applicability section and select Apply Fees for - Each Product In the Cart. You can use the conditions tree to select a product attribute you'll be using to list the products. In this case, we're defining Category 4 (Bags).


     
Here you can see how the fees are applied to a mixed cart:



Even though this cart contains both Bags and Watches, the fee is applied to Bags only. Let's review each fee type separately:

1. Fixed surcharge per unit (Fixed fee type in backend settings). As we set it to be $12, it is multiplied by the number of units that correspond to the conditions in the Calculation tab. We have 3 Bags in the cart, so the final fee amount is $12*3 = $36;

2. Percent surcharge (Percent fee type). Again, the system locates all items that fall under the category condition we defined in the 'Calculation' tab, and calculates percentage from their subtotal. Here, Bag items cost $96 altogether, so fee amount is $96*10% = $9.6.

In the example above, a fixed fee is multiplied by the number of Bag items that are added to the cart. If you want to add a fixed fee only once per order, the configuration will differ.

For example, if you're setting up a fixed fee:



Please go to the Conditions tab and can select what products will trigger the fee. In our case, it's Bags category:


      
After entering the conditions, please proceed to the Calculation tab and make sure that the Apply Fees for setting is set to Whole Cart.



On the storefront, the fee won't be visible if there are no Bags in the cart:



It'll appear as soon as a Bag is added:



And its value won't change if you increase the amount of Bags in the cart:


      • Related Articles

      • Is it possible to add a fee for certain shipping regions only?

        Fees can be configured to appear only under certain conditions, including the shipping address. When editing or creating a fee at Stores → Configuration → Amasty Extensions → Extra Fee → Fees, please navigate to the Conditions tab inside your fee. ...
      • How to handle taxes for extra fees?

        Enabling taxes for extra fees If you'd like to apply tax to your extra charges, you'll need to prepare your settings first. It needs to be done in two separate places. Default Magento settings Step 1. Navigate to Stores → Taxes → Tax Zones and Rates ...
      • How to create a fee that'll be available for a certain subtotal only?

        Fees can be set to be visible once customers add some items totaling in a specific amount to the cart, or vice versa: hide the fee as soon as customers reach a certain subtotal. To do that while creating your fee at Stores → Configuration → Amasty ...
      • Extra Fee | GraphQL methods

        Queries getListFeeItems description: get a list of created fees getFeeItemsForQuote(cart_id: String!) description: get a list of fees available in the current cart getFeeOptions(fee_id: Int!, store_id: Int!) description: get a list of fee options ...
      • Can I create a discount that will/won't be applied to certain products?

        This article contains instructions on how you can limit discount application to specific products. This approach is universal, and can be used not only in promotions from Amasty modules, but also in default cart prices rules. If you can't find the ...