Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shipping Method Restrictions based on 'StateProvince' #7163

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Dev-Sina
Copy link
Contributor

@Dev-Sina Dev-Sina commented May 1, 2024

Almost, all customers say that they need a way to restrict some provinces for some shipping methods which they are not supported by the provider or the store owner would transit orders to those provinces by some another providers! So, I always write my custom codes to all versions to do that! But I decided to add this feature to the core of nop.

All services, controllers, etc. are similar to the 'ShippingMethodRestrictions' based on country.

I create a new entity of 'ShippingMethodStateProvinceMapping' to do that and I put both 'CountryId' and 'StateProvinceId' in that. Some another scenarios could be applied, but this one is more efficient, I think.

Thanks

Dev-Sina added 2 commits May 1, 2024 11:07
…handle shipping method restritions based on states/provinces of each country
…to CASCADE NOACTION; because StateProvinceId is on CASCADE DELETE and the CountryId in the StateProvince is on CASCADE DELETE, too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants