Shipping setup/configuration

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 года назад
Hi,

I'm looking to set up the following shipping/postage rules and wondering whether somebody can recommend a good approach:

Rule 1: All items in a particular Category cost $10 in shipping. It's actually a "Merchandise" category that sells only lightweight items such as T-shirts, Hoodies and Caps. Buyers can have as many items from this category for a total of $10 shipping. E.g. 1 Hoodie, 2 Caps, 2 T-shirts for a total of $10 shipping.

Rule 2: In the only other category, the shipping cost depends on the selected "Product attribute". If a customer chooses the "4 Pack" then shipping is $15, if they choose the "24 Pack" then shipping is $25.

Rule 3: Maximum shipping cost is $50. So whatever is in the shopping cart, shipping costs no more than $50. I know there is a "free shipping over x amount" option, but there's doesn't appear to be a "max shipping amount".

Only 1 shipping method is needed.

Can one of the Shipping plugins handle all of the above conditions, or am I better off trying to write my own plugin.
2 года назад
Hi kooblakabla

there is no configuration on default nopCommerce.
It is batter to builds our own plugin.
2 года назад
Shipping Director can do it.  It could look something like this:

Decimal
LightWeight Rate
Items.Any(Product.HasCategory("LightWeight")) ? 10.00 : 0.00

Decimal
4 Pack Rate
Items.Where(HasAttribute("Size","4 Pack")).Sum(Quantity) * 15.00

Decimal
24 Pack Rate
Items.Where(HasAttribute("Size","24 Pack")).Sum(Quantity) * 25.00

Decimal
Total Rate
[LightWeight Rate] + [4 Pack Rate] + [24 Pack Rate]

Option
Shipping
true
Math.Min([Total Rate], 50.00)


Contact us at support at noptools.com and we can help you configure it for your exact needs.
2 года назад
Hi New York,

I'm just testing out your plugin - thank you for the examples otherwise I would not have known where to start.

I'm having a problem with the following example you provided:

Items.Where(HasAttribute("Size","4 Pack")).Sum(Quantity) * 15.00


When I test it out I receive the following error:

Error=No applicable method 'HasAttribute' exists in type 'QueryContextItem'


I tried using "Product.HasAttribute" instead, like so:

Items.Where(Product.HasAttribute("Size","4 Pack")).Sum(Quantity) * 15.00


but get a similar error. Are you able to provide an example with the correct syntax?

Cheers,
Gavin
2 года назад
RE: " ...  type 'QueryContextItem'

I think you may have the expression in the wrong place.  It should be in the Expression field:

Type:   Decimal
Name:  4 Pack Rate
Expression: Items.Where(HasAttribute("Size","4 Pack")).Sum(Quantity) * 15.00


Export your configuration, and email it to us at support at noptools.com.
2 года назад
Sorry, my typo.  (HasAttribute is used to get checkout attributes, e.g.   Customer.HasAttribute("...")  )

Use HasAttributeValue()

Decimal
4-Pack Rate
Items.Where(HasAttributeValue("Size","4 Pack")).Sum(Quantity) * 15.00
2 года назад
That was it. Thank you.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.