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:

depending category problem when combine products 24 Nov 2014 12:39 #1

  • design
  • design's Avatar Topic Author
Hi,
I have a group of categories that i want to apply specific shipping rates.

Bellow i have set the code and it works right.

Name="test1"; Condition=contains(list(19, 20, 25, 26, 27, 21, 34, 33, 30, 22, 39, 38, 35), Categories); 1<=Articles<5; 1<=Amount<1000; Shipping=15
Name="test2"; Condition=contains(list(19, 20, 25, 26, 27, 21, 34, 33, 30, 22, 39, 38, 35), Categories); 5<=Articles<100; 1<=Amount<1000; Shipping=10
Name="test3"; Condition=contains(list(19, 20, 25, 26, 27, 21, 34, 33, 30, 22, 39, 38, 35), Categories); 1000<=Amount<9999; Shipping=5
Name="test4"; Condition=contains(list(28, 29, 32, 31, 37, 36), Categories); Shipping=0

My problem is created when i combine a product from the group of categories (test1) with the group (test4).
If i add to the cart 2 products from different groups then it doesn t show shipping.

Can you help me with that ?

Kind Regards

depending category problem when combine products 24 Nov 2014 20:13 #2

Your condition contains(list(19, 20, 25, 26, 27, 21, 34, 33, 30, 22, 39, 38, 35), Categories) means that only products from these categories are allowed. In particular, none of the products must have any other category assigned (not even as a second category).

BTW, in the upcoming version 5.0 of the plugin I added the function "contains_only", which is easier to understand:
Condition=contains_only(Categories, 19, 20, 25, 26, 27, 21, 34, 33, 30, 22, 39, 38, 35)

To figure out why the condition is not fulfilled and none of the rules matches, you can add a rule to show all variables at the end:

Name="Debugging... All variables: <pre>{Values_debug}</pre>"; NoShipping

This will print a long list of all available variables, inter alia also the Categories variable, so you can check whether it contains really only those allowed categories.

Best regards,
Reinhold
  • Page:
  • 1