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:

Cat 1, 2 shipping $0; Cat 3, 4 shipping $5+ 02 Jun 2016 19:26 #1

  • rooksads
  • rooksads's Avatar Topic Author
I purchased the VM Advanced Shipping Rules. It appears to be great plugin. I have tried various rules using your documentation and forum postings, but have not found a rule that works for my situation.
Here is my scenario:
Categories 1 and 2 are always shipping=0, regardless of other products are in the cart.
Categories 3 and 4, the first product is shipping=10, each additional product is shipping=5

So if the cart contains 2 products from categories 1 and/or 2, and 2 products from categories 3 and/or 4, the shipping total should equal 15.

Product Category 1 shipping= 0
Product Category 2 shipping= 0
Product Category 3 shipping= 10
Product Category 4 shipping= 5
Total shipping=15

Cat 1, 2 shipping $0; Cat 3, 4 shipping $5+ 03 Jun 2016 21:06 #2

  • rooksads
  • rooksads's Avatar Topic Author
The following rule works for 0 shipping on two categories and priced shipping on two other categories:

Shipping=0*evaluate_for_categories(articles, 1,2)+10*evaluate_for_categories(articles, 3,4)

But I haven't figured the proper syntax for making $5 shipping for each additional item of categories 3 and 4.

So the first item of Category 3 or 4 is shipping=10, and each additional item of Category 3 or 4 is shipping=5

Cat 1, 2 shipping $0; Cat 3, 4 shipping $5+ 07 Jun 2016 21:06 #3

Dear Rooksads,
Your approach is a good start, but I think you need two separate rules, because basically, each product from categories 3 and 4 costs 5$, plus a basic cost of 5$ flat if at least one product from categories 3 or 4 are bought:
Condition=contains_any(Categories, 3,4); Shipping=5+5*evaluate_for_categories(articles, 3,4)
Condition=contains_only(Categories, 1,2); Shipping=0

Best regards,
Reinhold

Cat 1, 2 shipping $0; Cat 3, 4 shipping $5+ 08 Jun 2016 16:21 #4

  • rooksads
  • rooksads's Avatar Topic Author
Works perfectly. Thank you!

This topic is solved.

[SOLVED] Cat 1, 2 shipping $0; Cat 3, 4 shipping $5+ 08 Jun 2016 16:21 #5

  • rooksads
  • rooksads's Avatar Topic Author
Problem solved.

Cat 1, 2 shipping $0; Cat 3, 4 shipping $5+ 27 Oct 2016 13:08 #6

  • trickybug
  • trickybug's Avatar
Hello Reinhold,

I have almost the same problem so decided not to open a new topic.
My scenario is:

Category 1 and 2; shipping of the first article=23, each additional article- 12
Category 3 and 4; shipping of the first article=10, each additional article- 2
But
if any article from Category 3 or 4 is been bought with any article from Category 1 or 2 then the shipping of the articles from Cat.3 or 4 is free.

Could you please help me to build the rule.

Thanks in advance

Cat 1, 2 shipping $0; Cat 3, 4 shipping $5+ 29 Oct 2016 22:35 #7

Dear TrickyBug,
Let's first try to rephrase your shipping costs in a way that can be directly implemented. Please tell me if I misunderstood anything in your descriptions:
- If any products from categories 1 or 2 are bought, shipping is 23 (for the first article) + 12 for each additional article from categories 1 and 2; Articles from categories 3 and 4 are completely ignored
- If no products from categories 1 or 2 are bought, shipping is 10 (for the first article) + 2 for each additional article from categories 3 and for.

This can be directly written as a ruleset:
Comment="Cats 1/2 bought => ignore cats 3 &4"; Condition=contains_any(Categories, 1,2); Shipping=11 + 12*evaluate_for_categories(Articles, 1,2)
Comment="No Cat 1 or 2!"; Shipping=8 + 2*evaluate_for_categories(Articles, 3,4)

Please note that instead of " 23 for the first article and 12 for each further article", I used the equivalent formulation "11 fixed plus 12 for each article bought".

Best reagards,
Reinhold

Cat 1, 2 shipping $0; Cat 3, 4 shipping $5+ 06 Nov 2016 16:52 #8

  • trickybug
  • trickybug's Avatar
Thanks a lot!
  • Page:
  • 1