Excluding downloadable products from the Free shipping over x calculation.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 年 前
I am new to nopCommerce.

1. Shipping is obviously for physical products and not downloadable products, which are not shipped.
2. Downloadable products can be selected as free shipping by ticking a box (even though this is obvious and should not be required).
3. The Shipping Settings has the following


"Pick Up in Store" enabled
Free shipping over 'X'
Value of 'X'
Calculate 'X' including tax
Use warehouse location
Consider associated products dimensions and weight


How can one exclude the value of downloadable products from the Free shipping over "X" total?

E.g. Free shipping over 'X' is set as £30   Under £30, shipping is set to £2.99

2 Products purchased:
   a) Books for £25
   b) Downloadable product for £6

Total of order is £31.  As £31 > X,  so free shipping is triggered.
Surely, this is wrong as the shipping should apply to physical products only.
Since £25 < X, Shipping of £2.99 should be charged.  So £33.95 should be charged.

Is there a simple box:
Calculate X excluding downloadable products.

(This to me appears simple feature and critical and should be available)?

Is there a way to achieve this?

Thanks
6 年 前
It would require customization.  Or, the Shipping Director plugin can do it.  For example:

Decimal        MySubtotal      Items.Where(!Product.IsDownload).Sum(GetSubTotalWithDiscounts())

OptionExit     Free Shipping   [MySubtotal] > 30

Option         Shipping        true                 Shipping.FixedOrByWeight


(There is also GetSubTotalWithoutDiscounts() if you do not want to include any discounts in the total calculation.)
6 年 前
Hi

I do not require discounts in the total calculation.
Is the following part of the Shipping Director plug in or is it customisation?



Decimal        MySubtotal      Items.Where(!Product.IsDownload).Sum(GetSubTotalWithDiscounts())

OptionExit     Free Shipping   [MySubtotal] > 30

Option         Shipping        true                 Shipping.FixedOrByWeight


(There is also GetSubTotalWithoutDiscounts() if you do not want to include any discounts in the total calculation.)


Thanks
6 年 前
Those lines are examples of configuring Shipping Director.  Shipping Director uses Linq-like expressions to allow for complex shipping scenarios/calculations.  You can read more about it in the Getting Started blogs
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.