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:

generic child product without category makes fail 14 May 2015 10:17 #1

  • tuki
  • tuki's Avatar Topic Author
I have the following rule:
contains_only(Categories, "101", "79", "95", "84");Articles<=2; Shipping=2.5

When I add a child product (that has no category) to the cart that is not in the upper categories, the shipping method still live in the cart. I also get the problem when I make condition for the sku-s. If adding a childproduct to the cart the shipment method is live.

Could you help me what is the reason?

I use:
j2.5.16
vm2.0.26
advanced shipping by rules 4.1
shipping by rules 4.1 also installed

generic child product without category makes fail 14 May 2015 14:50 #2

Dear Tuki,
You are right, a product without a category assigned does not have any influence on the Categories variable and so does not have any effect on your condition.
What you can do is either
1) Add a hidden category that you add to all products that you want to exclude from that shipping method
2) Try to find some other conditions that do not build on the categories.

I know, both are not ideal, but currently there is really no good solution available. In particular, the shipping plugin is currently lacking a way to check whether each product in the cart fulfills certain conditions. The whole plugin is rather designed to check properties of the cart as a whole, not of individual products.

Sorry that I currently don't have any better solution.
Reinhold

generic child product without category makes fail 14 May 2015 20:04 #3

  • tuki
  • tuki's Avatar Topic Author
Hello,

Ok I understand, One idea:

What is if i modify the rule for:
contains_only(SKUs, "sku1", "sku2", "sku3", "sku4");Articles<=2; Shipping=2.5

I tried it, but I get the similar error. I dont understand it why, because the cild product has own SKU. It the condition syntax acceptable like above? Why I get the similar wrong working. Is the reason the "checking the all cart" method?

Thanks

generic child product without category makes fail 23 May 2015 19:52 #4

Dear Tuki,
Can you try to prepend "Condition=" before the contains_only call? The plugin sometimes misses to detect a rule part as a condition (contains_only is a function that returns 0 or 1, so the plugin wrongly classifies this as the shipping cost, which is then overridden by the explicit Shipping=2.5):
Condition=contains_only(SKUs, "sku1", "sku2", "sku3", "sku4"); Articles<=2; Shipping=2.5

Best regards,
Reinhold
  • Page:
  • 1