Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Advanced Ordernumbers 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:

Categorie's 31 Oct 2017 12:30 #1

  • Robcom
  • Robcom's Avatar Topic Author
Hello Reinhold,

I Bought the advenced version of Shipping by Rules.
My question is :
We sell dogg collars, leashes, Harness, cups, t-shirts and cushions it's all in differend packets.
Max. 2 collars can in a envelope, so if you have more it will be een package .
T-Shirt max 1 go in a envelope.
The rest must be a package

How can a make that possible??

Gr Rob

Categorie's 02 Nov 2017 13:28 #2

Dear Robcom,
How do you decide (technically) what is a dog collar and what is a T-Shirt? Do you use categories or manufacturers?

In the following example, I'm assuming your dog collars are in category 1234 (or any of its subcategories) and T-Shirts are in category 2345 and subcats (I.e. all products from category 1234 and any of its subcategories will be considered dog collars!). To be eligible for an envelope, there must be at most 2 dog collars and at most 1 T-Shirt in the order. Everything else will be a package:
Name=Envelope; evaluate_for_subcategories(Articles, 1234)<=2; evaluate_for_subcategories(Articles, 2345)<=1; Shipping=1
Name=Everything else is a Package; Shipping=15

If you have multiple different rates for envelopes (e.g. depending on ZIP and/or amount), then I would store the evaluate_for_subcategories calls in a separate variable and reuse that:
Variable=IsEnvelope; Value = (evaluate_for_subcategories(Articles, 1234)<=2) AND (evaluate_for_subcategories(Articles, 2345)<=1)
Name=Envelope; Condition=IsEnvelope; Amount>100; Shipping=0
Name=Envelope; Condition=IsEnvelope; Amount<=100; Shipping=1
Name=Everything else is a Package; Shipping=15

Best regards,
Reinhold

Categorie's 02 Nov 2017 13:30 #3

Dear Robcom,
I saw from your other post that you appear to be running WooCommerce (you posted this in the VirtueMart section). For WooCommerce, the approach is similar, the only difference being that categories in WooCommerce are identified by their SLUG rather than their numerical ID:
Variable=IsEnvelope; Value = (evaluate_for_subcategories(Articles, "dog-collars")<=2) AND (evaluate_for_subcategories(Articles, "t-shirts")<=1)

Best regards,
Reinhold

Categorie's 05 Nov 2017 08:41 #4

  • Robcom
  • Robcom's Avatar Topic Author
Hello Reinhold,
I'am using categories like Halsband, Bekers, ect...
And i use subcategories by Halsband like 4x50 cm and 4x55cm, 5x50cm and so on.
Thera are different size to work with. So it's very complex i think.

Categorie's 11 Nov 2017 17:31 #5

Dear Robcom,
From your description is seems that you have built a nice hierarchy if categories, so you can easily use the evaluate_for_subcategories function. If you want to allow at most 2 articles from the Halsband category (or any of its subcategories!), the condition is simply 'evaluate_for_subcategories(Articles, "Halsband")<=2'. You don't have to check all subcategories separately, the evaluate_for_subcategories function does this for you.

Best regards,
Reinhold
  • Page:
  • 1