开发者

Drupal, Ubercart: is there a way to select all Europeans / Not-Europeans countries in the shipping settings?

I usua开发者_如何学Pythonlly create conditional rules with shipping to assign different costs for:

  • national shipping (a specific country is selected)
  • and international shipping (the same country is selected but a NOT is added to the condition)

I have now to assign different shipping costs according to Europe / Not Europe. A solution would be to select all countries in Europe, but I was wondering if there is a faster way

thanks


For the sanity of your users just do it the way everybody else does!

Have a country pull down with a list of all supported countries in it. Defaulting to you "home" nation.

If you are sending stuff there are a lot more considerations than just shipping costs, you may need to fill in specific tax forms for some countries and depending on what your site is selling you may need special processing for some countries (try sending coffee to Thailand -- you need to obtain permission from thier ministry of agriculture!).


Create the different shipping methods at admin/store/settings/quotes (one for Europe, one for non-Europe).

  1. Add a Rule by editing the new shipping method and adding a condition or go to the Rules config at admin/workflow/rules
  2. Use a text comparison condition with a order:delivery-address:country data selector
  3. In the value field place the regular expression to match any of the desired country names, for example the list of EU member states below.

Maybe it could be done with postal codes too, but I do not know how they are structured. Everyone keeps their sanity.

(\W|^)(Austria|Belgium|Bulgaria|Croatia|Cyprus|Czech|Republic|Denmark|Estonia|Finland|France|Germany|Greece|Hungary|Ireland|Italy|Latvia|Lithuania|Luxembourg|Malta|Netherlands|Poland|Portugal|Romania|Slovakia|Slovenia|Spain|Sweden|United\sKingdom)(\W|$)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜