Shipping Director & specific length product

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 yıl önce
I am currently using Shipping Director plugin.  I need to figure out how to setup rules for specific length product & also check on quantity of the line item.

We sell 4', 5', 6', 8' light bulbs, in addition to smaller bulbs.  www.mebulbs.biz

We have multiple box sizes based on quantity of item.  Longer length bulbs are marked as ship separately to minimize damage in shipping.

Below is example of rules that are failing because of error.  (still working on figuring out what SD does not like)

420  False  Reference  LT52Q9  (Product.Length >= 40 and Product.Length < 52 and ShoppingCartItem.Quantity < 12)

640  False  String  $PackageBox  "MaxWeight:53,Height:4,Width:6,Length:52"        
642  False  Packing  Pack  Items.Any([@LT52Q9])  Packing.FirstFitSingleBox/AppendPackages      NOT [@LT52Q9]

I cannot have SD "shrink" the packaging as it must remain at length specified.

Is anyone one else shipping oversize using Shipping Director??
6 yıl önce
In an expression, within the context of an Item, you can access the Quantity property.  e.g. Items.Where([@LT30]) .Sum(Quantity)

The Packing Expression is already in the context of an Item  (as opposed to context of entire cart, where most other expressions are evaluated).  So, you can do this:
(Product.Length >= 40 and Product.Length < 52 and Quantity < 12)

However, you may want to separate your Length evaluation (needed by Packing's Exclude), from the condition used to see if you want to pack that size box at all.  If you use Quantity in the Exclude Expression, the quantity reflects just the one cart item.  If you have multiple cart items, in the length range, then the total quantity of all of them needs to be calculated at the context of the cart.  E.g.

420  Reference  LT52    (Product.Length >= 40 and Product.Length < 52)
425 Integer     QtyLT52   Items.Where([@LT52]).Sum(Quantity)

640  String  $PackageBox    "MaxWeight:53,Height:4,Width:6,Length:52"
        
642  Packing  Pack        Items.Any([@LT52]) and [QtyLT52] < 12 ...
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.