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!
Welcome,
Guest
|
|
Hello,
I just installed the "Premium" version and tried to implement a filter which, reduces shipping costs if you only order one product of certain categories, say hats and dvds. And if you order more than a product you pay the normal shipping cost (11). Now I added this filter: Name=""; articles<=1;contains_any(Categories,hat,dvd); shipping=3
Name=""; shipping=11 It works perfectly with the number of articles, but it somehow doesn't look at categories at all. So it shows me shipping cost of 3.- if there's one article in the basket and 11.- if there's more than one. But it doesn't matter from which category this article is, so it also shows 3.- if there's only a book in the basket. Can you tell me where the problem is? |
Please Log in or Create an account to join the conversation. |
|
Dear Gutbetucht,
First, if you don't want to display a rule name to the user, you don't need to give a Name="" at all. Second, please note that the category names in WooCommerce are strings, so you have to wrap hat and dvd in quotation marks: articles<=1;contains_any(Categories, "hat", "dvd"); shipping=3
shipping=11 Best regards, Reinhold |
Please Log in or Create an account to join the conversation. |
|
Dear Reinhold,
thank you for your answer. contains_any(Categories,"Weiteres"); articles<=1; shipping=noshipping
shipping=9 But sadly the filter still doesn't work.Weiteres is the name of the Categorie. Any ideas? Thank You Lukas |
Please Log in or Create an account to join the conversation. |
|
Dear Lukas,
Can you please try prepending "Condition=" to the contains_any function: Condition=contains_any(Categories,"Weiteres"); articles<=1; shipping=noshipping
shipping=9 Best regards, Reinhold |
Please Log in or Create an account to join the conversation. |
|
Hi , I am experiencing the same problem VM 3,0,8 here tried : Name=ACTION ; contains_any (Categories, 1); Weight>25; Shipping=0 it does not check the categories in the cart, but no error now i tried Name=ACTION ; Condition=contains_any(Categories,"freeshippingcat"); Weight>25; Shipping=0 an i receive the error Evaluation yields unknown value while evaluating rule part 'contains_any(Categories,'. on checkout Wich rule should i use to get this to work? |
Please Log in or Create an account to join the conversation. |
|
Hello Ivo,
I didn't solve this problem yet, or let's say I've given up on using a category filter. My solution to this problem was, ussing a shipping class filter and giving the categories I wanted to be included the needed shipping class. condition=contains_any(ShippingClasses,"klein"); articles<=1; shipping=3
shipping=11 But if there's a official solution to this problem, this would be nice aswell. Lukas |
Please Log in or Create an account to join the conversation. |
|
Hello Reinhold,
I'm redoing a couple of things on my website and had to change some conditions on my shipping rules. Somehow now I'm experiencing the same problems I had in January, using the contains_any function with categories or shippingclasses. Any ideas? Condition=contains_any(ShippingClasses,"klein"); articles==1; shipping=3
Condition=contains_only(ShippingClasses, "klein"); articles<=5; shipping=9
Condition=contains_any(ShippingClasses, "klein"); articles<=3; shipping=9
articles<=1; shipping=9
amount>175; shipping=2
shipping=11 |
Please Log in or Create an account to join the conversation. |
|
Dear Gutbetucht,
I have tried your rules on a test installation and they worked just like expected:
Are you sure that your shipping class has the slug "klein" (notice that the plugin uses the SLUG of the shipping class, not the display name)? Also, please make sure that you used the same capitalization (i.e. in your case all lower case) in the SLUG. Best regards, Reinhold |
Please Log in or Create an account to join the conversation. |
|
Hello Reinhold,
sorry for not answering. Somehow by magic it started working after your answer. But since a couple of days the argument contains_only doesn't seem to work. If I change the argument to contains_any it works. amount>175; shipping=2
Condition=contains_any(ShippingClasses,"klein"); articles==1; shipping=3
Condition=contains_any(ShippingClasses, "klein"); articles==2; shipping=6
Condition=contains_only(ShippingClasses, "klein"); articles<=5; shipping=9
Condition=contains_any(ShippingClasses, "klein"); articles<=3; shipping=9
articles<=1; shipping=9
shipping=11 Thanks for your help! |
Please Log in or Create an account to join the conversation. |
|
Dear Gutbetucht,
Great to hear that it started working. Regarding the contains_any vs. contains_only: contains_any works just fine here. Have you maybe added a second category to your test products? contains_only works by compiling the list of all categories of all products in the purchase and then checking that against the given categories. It does not wor by checking whether each product has at least one of the categories. So, if one product has one other category, then contains_only no longer matches. Best regards, Reinhold Kainhofer |
Please Log in or Create an account to join the conversation. |
|
Hello Reinhold,
thank you very much. I found the mistake thanks to your hint. The problem was, I was filtering by Shipping Classes and I only added a ShippingClass to the group of articles that I wanted to include, but all the articles I wanted to exclude, didn't have a shipping class, so they didn't conflict with the rule contains_only. Now my only problem is, that I have to trust my partner, to allways add shipping classes to every article he adds to the shop. Or do you have some kind of trick? THANKS! Lukas |
Please Log in or Create an account to join the conversation. |
|
Dear Gutbetucht,
Great to hear that you found the cause of your issue. Unfortunately, I don't know any trick to ensure all articles have a shipping class set. A while ago I thought about adding a function like any_product and all_products, which would check whether one or each product fulfills a given condition, but then I never continued that idea... Sorry, Reinhold |
Please Log in or Create an account to join the conversation. |