Blog posts tagged with 'VariableRate'

RSS
Next Day Shipping Rate depends on if any or all items are eligible for it.- Thursday, August 2, 2012

In this scenario, our requirement is to offer Standard Shipping and Next Day Shipping methods with fixed amount for each: £3 for Standard and £10 for Next Day).  However, only certain products can be sent on Next Day delivery.  We need the checkout process to exclude Next Day if not applicable.   Additionally, if the cart has a mix of products, some that allow Next Day and some that don't, we want to charge BOTH the Standard and Next Day delivery charge combined on the order (£3 + £10 = £13).

So, we always want to offer Standard shipping at £3, and then additionally offer Next Day if the cart has any Next Day eligible products – but if the cart has a mix, then since we need to ship out two deliveries, we want to charge for both.  Here are the possible cases:

No Next Day eligible products:

Standard              £3

All Next Day eligible products:

Standard              £3

Next Day             £10

Some Next Day eligible products, and some not:

Standard              £3

Next Day             £13

And here’s one way to do it in Shipping Director:

Create a (non-published) Category called “Can Ship Next Day”, and put all eligible products in that category.   (Remember, products can be in more than one category).  Then, just configure Shipping Director! 

Order

Type

Name

Expression

Rate Expression

10

Reference

canShipNextDay

Product.HasCategory("Can Ship Next Day")

 

30

Option

Standard

true

3

40

OptionExit

Next Day

Items.All([@canShipNextDay])

10

50

OptionExit

Next Day

Items.Any([@canShipNextDay])

13

 

(The above blog was updated 9/8/2013.  Older versions of Shipping Director did not have HasCategory() function, and used a more complex expression to get the Category: 

Order

Type

Name

Expression

Rate Expression

10

Reference

categories

ProductVariant.Product.ProductCategories

 

20

Reference

categoriesAny_CanShipNextDay

[@categories].Any(Category.Name = "Can Ship Next Day")

 

30

Option

Standard

true

3

40

OptionExit

Next Day

Items.All([@categoriesAny_CanShipNextDay])

10

50

OptionExit

Next Day

Items.Any([@categoriesAny_CanShipNextDay])

13



Tags :  VariableRate
Comments (0)