Login
Register

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!

×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

The rule about "State" not work 07 Mar 2015 09:41 #1

  • jeremy
  • jeremy's Avatar Topic Author
HI:

I use rules_shipping_advanced and get three questions:

A. I think the rule about "State" can not work because I copied the code from example for testing:

~Name="Free shipping to California"; State2 == "CA"; Shipping=0
Name="Flat rate to some other states"; state2 in list("TX", "WS", "MS"); Shipping=5~

I pasted this code on one of shipping method but this shipping method even didn't show up!

If i pasted other example code without state, It work and shipping method show up of cause.

How come?

B. what are those 8 country zone for? any different?

C. The language override can't work as attached pic

I try to override the RULE_SHIPPING_FREE into chinese"免運費" chinese version but fail, any wrong?

D. I want to set up the rule depend on some variables:

-Different weight
-Different country
-Different state(Because state can't work so I have to ask how)


THANK YOU!

Jeremy
Attachments:

The rule about "State" not work 10 Mar 2015 17:43 #2

Dear Jeremy,

HI:

I use rules_shipping_advanced and get three questions:

A. I think the rule about "State" can not work because I copied the code from example for testing:

~Name="Free shipping to California"; State2 == "CA"; Shipping=0
Name="Flat rate to some other states"; state2 in list("TX", "WS", "MS"); Shipping=5~

I pasted this code on one of shipping method but this shipping method even didn't show up!


The rules look okay. Of course, the shipping method will only be offered if your customer selects a state that has a 2-letter abbreviation of CA, TX, WS or MS. In all other cases, the shipping method will not offer any shipping rate (since none of the rules matches).
For testing purposes you can let the plugin print out all available variables (including the state2). See the section on debugging in the documentation.

B. what are those 8 country zone for? any different?


It is simply to make it easier to combine multiple conditions into one method. With those country zones you can put rules for multiple countries into one shipping method rather than having to create one method for each country zone separately.

Another use case is when you have a special shipping rate to one country in certain conditions, but otherwise the same shipping as some other countries.

E.g. Shipping to all EU countries is 15€ flat by default. Only Orders to Germany with weight below 2kg are 10€ flat. You can implement this with two country zones:

Country Zone 1: Country "Germany"
Rule: Weight<2; Shipping=10

Country Zone 2: ALL EU countries (also Germany)
Rule: Shipping=15

The first country zone will only apply to Germany, and only match if the weight is below 2kg. If the weight is 2kg or above, the rule will not match, and the second country zone will be checked (and will be used).


C. The language override can't work as attached pic[/color]

I try to override the RULE_SHIPPING_FREE into chinese"免運費" chinese version but fail, any wrong?


There is no language string RULE_SHIPPING_FREE in the plugin. Where exactly is the string that you try to translate?

D. I want to set up the rule depend on some variables:

-Different weight
-Different country
-Different state


That should all be no problem. The exact setup of the shipping methods, country zones and rules depend on the exact shipping cost structure that you want to implement...

Best regards,
Reinhold

The rule about "State" not work 10 Mar 2015 20:04 #3

  • jeremy
  • jeremy's Avatar Topic Author
HI:

Really appreciated your reply.

I use one page checkout plugin.

Please see the pic 1, I apply this rule:

Name="Free shipping to California"; State2 == "CA"; Shipping=0
Name="Flat rate to some other states"; state2 in list("TX", "WS", "MS"); Shipping=5

It means if customer choose country(united state) and state(California), the shipping method will show up and offer "o" shipping fee.

But see pic2:

Nothing
Attachments:

The rule about "State" not work 13 Mar 2015 23:46 #4

Dear Jeremy,
Which One Page Checkout plugin do you use exactly? AFAIK, there are at least three different OPC plugins for VirtueMart available...
Does it work with VirtueMart's default checkout system (if you disable the OPC plugin)?

I have tried it with VM's default checkout system and with the RuposTel One Page Checkout plugin (demo.open-tools.net/j3v3/), and in both cases, the shipping to california is correctly offered at 0 shipping costs...

Best regards,
Reinhold

Best regards,
Reinhold
  • Page:
  • 1