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!



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


ShopperGroups IS Unknown variable 02 Feb 2018 12:10 #1

  • forihana
  • forihana's Avatar Topic Author
I tried to implement the logical if ShopperGroups is ID 5. Then use the reduction:
Variable=ShipReducedRate; Value=0.1*BasePrice
Name="Shipping complex function";ShopperGroups=5;0.001<=Weight<=0.65;Shipping= Max(6, 19.08-ShipReducedRate)

but it return this error message:
Unknown variable 'ShopperGroups' in rule 'ShopperGroups=5'

from doc which said ShopperGroups should be available variable:
ShopperGroups, Groups VirtueMart shopper groups and Joomla user groups (numeric IDs) of the customer if logged in. Guest users will have the default VM shopper group and an empty groups list. (ADVANCED VERSION only)

could I know this is possible to fix?

I used "Advanced Shipping by Rules" and with joomla 3.6 AND virtuemart 3.0.8 BY THE WAY

thank you so much

ShopperGroups IS Unknown variable 03 Feb 2018 16:39 #2

Dera Forihana,
The "=" operator is an assignment, it it says that "ShopperGroups" should get the value 5, which is not what you have in mind. Admittedly, the error message is not very clear...

As ShopperGroups is a list, you rather want to check whether 5 is in the ShopperGroups list:
Variable=ShipReducedRate; Value=0.1*BasePrice
Name="Shipping complex function"; 5 in ShopperGroups; 0.001<=Weight<=0.65;Shipping= Max(6, 19.08-ShipReducedRate)
Alternatively, you can use "contains_any(ShopperGroups, 5)"

Best regards,

ShopperGroups IS Unknown variable 05 Feb 2018 09:59 #3

  • forihana
  • forihana's Avatar Topic Author
Hi Reinhold,

Thank you so much, yes right now has show no more error message
But my case is kind complex which is:

1. If shopperGroups belong any discount group( in my case is ShopperGroups == 5 AND ShopperGroups == 12 OR ShopperGroups == 13), then it will take whole shipping price

2. If shopperGroups belong only normal group ( in my case is ShopperGroups ONLY HAS VALUE == 5), then it will take discout

Because any shopper at lease will have shopperGroups value == 5 by defalut when he create account, BUT it could be add more value like 12 or 13 or more other value
so I tried to write follow rule:

Variable=ShipReducedRate; Value=0.1*BasePrice
Name="Shipping full function"; Condition=contains_any(ShopperGroups, 12,13); 0.001<=Weight<=0.65;Shipping= 19.08
Name="Shipping complex function";Condition=contains_only(ShopperGroups, 5); 0.001<=Weight<=0.65;Shipping= Max(6, 19.08-ShipReducedRate)

I test weather I add shopperGroup 12 OR only default 5
The result is always take the first one: 19.08

Any ideal?
Thank you Reinhold
Appreciate your help

ShopperGroups IS Unknown variable 05 Feb 2018 11:48 #4

  • forihana
  • forihana's Avatar Topic Author
Hi Reinhold,
After different method test finally I got this method pass:

Variable=ShipReducedRate; Value=0.1*BasePrice
Name="Shipping complex function";Condition=contains_only(ShopperGroups, 5);0.001<=Weight<=0.65;Shipping= Max(6, 19.08-ShipReducedRate)
Name="Shipping Full Price";0.001<=Weight<=0.65;Shipping= 19.08

Thank you so much, this is resolved

[SOLVED] ShopperGroups IS Unknown variable 05 Feb 2018 11:48 #5

  • forihana
  • forihana's Avatar Topic Author
Problem solved.
  • Page:
  • 1