Skip to content

Shipping Method Restrictions based on 'StateProvince'#7163

Open
Dev-Sina wants to merge 2 commits intonopSolutions:developfrom
Dev-Sina:feature/shipping-method-restrictions-based-on-state-province
Open

Shipping Method Restrictions based on 'StateProvince'#7163
Dev-Sina wants to merge 2 commits intonopSolutions:developfrom
Dev-Sina:feature/shipping-method-restrictions-based-on-state-province

Conversation

@Dev-Sina
Copy link
Copy Markdown
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.

2 participants