VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Shipping By Rules for WooCommerce

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!

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: [SOLVED] Conditional shipping rate per vendor

Conditional shipping rate per vendor 09 Dec 2016 10:49 #1

Dear Reinhold,

I just added your advanced plugin to my marketplace (woocommerce/wc vendors)
I configure your plugin to respect the delivery rules of my sellers

Is it possible to apply a specific shipping value per vendor depending of the total cost for this vendor?
E.g. If the client buy more than 50€ of products to this vendor, shipping cost is free.

Here is the rules I apply :

Variable=vendor1Shipping; Value=0
Variable=vendor1Shipping;"vendor1" in Vendors; Amount<50;Value=4.916
Variable=vendor1Shipping;"vendor1" in Vendors; 50<=Amount;Value=0
Variable=vendor2Shipping; Value=0
Variable=vendor2Shipping; "vendor2" in Vendors;Amount<21;Value=1.667
Variable=vendor2Shipping; "vendor2" in Vendors;21<=Amount;Value=0
Shipping=vendor1Shipping+vendor2Shipping


The tests with this rules show that the variable Amount is the amount of the whole basket.
Is there a way to test the amount of a specific vendor?

Thanks in advance.

Arnaud

Please Log in or Create an account to join the conversation.

Conditional shipping rate per vendor 09 Dec 2016 17:19 #2

Dear Arnaud,
Your observation is absolutely correct: the Amount variable holds the total amount of all products with no restrictions. However, there is also the evaluate_for_vendors function that restricts the evaluation of its first arguments (Amount in your case) to products from a (or multiple) given vendors:
Variable=vendor1Shipping; Value=0
Variable=vendor1Shipping;"vendor1" in Vendors; evaluate_for_vendors(Amount, "vendor1")<50;Value=4.916
Variable=vendor1Shipping;"vendor1" in Vendors; 50<=evaluate_for_vendors(Amount, "vendor1");Value=0

Best regards,
Reinhold

Please Log in or Create an account to join the conversation.

[SOLVED] Conditional shipping rate per vendor 09 Dec 2016 22:19 #3

Problem solved.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1

VM - Shopping cart

 x 

Cart empty

Login Formular