Free shipping but only for some products

Created on 14 December 2023, 11 months ago
Updated 31 January 2024, 10 months ago

Is it possible to let a user have free shipping on only some products so say:

Normally we charge shipping on all products but for 1 month only we only charge shipping on 1 product everything else is free.

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom c_archer Cumbria

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @c_archer
  • πŸ‡¬πŸ‡§United Kingdom c_archer Cumbria

    For example this is the promotion.

    In this instance is should be Β£5.75 for shipping:

    In this example it should be Β£8.32:

  • πŸ‡ΊπŸ‡ΈUnited States rszrama

    Generally speaking, this is a perfect case for a custom PromotionOffer plugin, because the UI to support every possible permutation of "only give free shipping for some products" would be quite unwieldy. The primary way I could see Commerce Shipping supporting this right now would be for stores using the FlatRatePerItem shipping method type, since we can easily recalculate the rate from the offer after filtering out specified items from the shipment before counting the quantity.

    My proposal would be something like this:

    • Define a new ShipmentFixedAmountOffPerItem and ShipmentPercentageOffPerItem promotion offers.
    • The idea is that these will calculate either a fixed or percentage based discount off of the price per item as set in the shipping method configuration.
    • When calculating the discount amount, the plugin will basically need to determine how many items on the shipment should be discounted, sum up the total of the discount, and apply it as an adjustment.
    • The primary option for determining how many items to discount should be an "Item matching method" radios with options labeled:
      • "Charge full price for a specified quantity of items", which then prompts you to enter the number of items that should be discounted. This number could be 0 or greater, meaning you could use this for a free shipping method based on shipping per item.
      • "Discount the shipping per item for specific products", which then prompts you to select a "Product matching method" of "Any of the following" vs. "Any except the following", and has you reference products via a multi-value autocomplete.
      • "Discount the shipping per item for specific product variations", which is like the above but at the variation level.

    This would give you the tools you'd need (assuming you're calculating the shipping rate by item quantity) and be flexible enough for other scenarios, especially the idea of giving free shipping on a subset of the product catalog but still charging for other items. This won't really help folks just using a flat rate for the whole order, but that's where a custom promotion offer plugin comes in.

Production build 0.71.5 2024