Shipping By Rules for WooCommerce

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!



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


Is it possible to have global variables? 20 May 2016 13:01 #1

  • natprod
  • natprod's Avatar Topic Author
Hello everybody,

I would like to ask you if it is possible to have variables used by more than one method.
I have a list of post codes that is going to add something in the shipping price.
As I want to have 2 shipping methods the express and the slower courier. I would like to have a parameter to multiply (No charge addition is 0) for all my methods.

Here is a code I wrote
Variable=ZIPADD; Value=0
Variable=ZIPADD; 1000<=ZIP<1500 ; Value=200
Variable=ZIPADD; 2000<=ZIP<2500 ; Value=300
shipping= ( ZIPADD + 10 )

I cannot use ZIPADD in another method and so I have to copy it in order to work. As these are a lot of lines it would be better to be written once.

Thanks in advance

Is it possible to have global variables? 21 May 2016 00:08 #2

Dear NatProd,
Thank you for the feature request, which absolutely makes sense.
Unfortunately, it is currently not possible to have multiple methods share variables (or have global variables). I have put it on our list of possible future extensions, but unfortunately, I can't give either a timeline nor confirm whether we will really implement global variables.

  • Page:
  • 1