VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Shipping by Rules for VirtueMart

IMPORTANT ANNOUNCEMENT: Plugin development ceased, all plugins made available freely (GPL)

With great sadness we have to announce that we are ceasing development of all our VirtueMart, WooCommerce and Joomla plugins. Effective immediately, all our plugins -- even those that were paid downloads -- are made available for free from our homepage (GPL license still applies), but we cannot and will not provide any support anymore.

It has been a great pleasure to be part of the thriving development communities of VirtueMart as well as WooCommerce. However, during the last year it became painstakingly clear that in addition to a full-time job, a young family and several other time-consuming hobbies at professional level (like being a professional singer) the plugin development and the support that it requires is not sustainable and is taking its toll. It has been an honor, but it is now time to say good bye!

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Different Shipping rates by city with the same ZIP 19 Sep 2017 17:26 #1

  • VIPER975
  • VIPER975's Avatar Topic Author
  • Offline
  • Posts: 1
Hi,
I need to set different shipping rates for different cities. This is because we have different shipping rates in the same ZIP code for different cities.
Example 1:
ZIP: 04020
City: Ponza
Shipping rate: 15,50€

Example 2:
ZIP: 04020
City: Itri
Shipping rate: 5,50€

How can I fix it?
Thanks

Please Log in or Create an account to join the conversation.

Different Shipping rates by city with the same ZIP 21 Sep 2017 00:59 #2

Dear Viper975,
In addition to the ZIP variable, there is also the City variable available, which holds the user-entered city name:
ZIP==04020; City="Ponza"; Shipping=15.5
ZIP==04020; City="Itri"; Shipping=5.5

Note, however, that this relies on the customer entering the city correctly. If the customer makes any typo in the city, none of the rules will match. To handle this case, you can add a fall-through rule that displays a warning/error message to the customer:
ZIP==04020; City="Ponza"; Shipping=15.5
ZIP==04020; City="Itri"; Shipping=5.5
ZIP==04020; Warning="Unknown city: the 04020 postal code consists only of the two cities Ponza and Itri. Please enter either."; NoShipping

Best regards,
Reinhold

Please Log in or Create an account to join the conversation.

  • Page:
  • 1

VM - Shopping cart

 x 

Cart empty

Login Formular