Shipping Restriction by City for a product

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
I want to develop a plugin where user can configure Shipping Restriction by City for a product. Please guide me. I am novice for nopcommerce
11 years ago
Have you considered [url=www.noptools.com]Shipping Director[/url]?

Here's some examples of doing restrictions -

Restricted Products

Exclude Ground Shipping
11 years ago
Hi, The problem is little complex. we need Restriction by city for each product. One order may contain more than one product. Currently in NopCommerce we accept city as text (textbox). This problem will touch all those areas.
11 years ago
You can expand on the Restricted blog example above.  I.e. have multiple categories like "Restricted for City ABC",   "Restricted for City XYZ", etc.
To use City rather than Country, just use ShippingAddress.City = "Some City Name"

e.g. ... something like this ...

ErrorExit
Restricted for ABC
ShippingAddress.City = "ABC" and Items.Any([@categories].Any(Category.Name = "Restricted for ABC"))
"Sorry, we cant ship "
    + Items.First([@categories].Where(Category.Name = "Restricted for ABC")).ProductVariant.Product.Name
    + " to ABC"

ErrorExit
Restricted for XYZ
ShippingAddress.City = "XYZ" and Items.Any([@categories].Any(Category.Name = "Restricted for XYZ"))    + " to XYZ"
"Sorry, we cant ship " +
    + Items.First([@categories].Where(Category.Name = "Restricted for ABC")).ProductVariant.Product.Name

(line breaks added above for readability.  Also, some additional vars and refs can be added to shorten it)


Note that if any items in the cart are restricted, the entire cart must be rejected.  There is no way in nopC (currently :) to create separate shipments in the checkout process
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.