Login
Register

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!

×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

multiple products purchased from same vendor 30 Jul 2016 17:30 #1

  • Forrest
  • Forrest's Avatar Topic Author
Hi,

I wonder if you can help, I'm looking for a shipping rule that would allow one shipping cost per vendor if multiple but different products are purchased.

With woocommerce there is an option for 'Charge once for national shipping, even if more than one is purchased.' however, it would seem this only only applies if multiples of the same product are purchased.

For example, lets say someone purchases the below:

Vendor A - Product A
Vendor A - Product B
Vendor B - Product A
Vendor B - Product B

In this scenario, I would like for a flat fee to be applied for the products purchased from vendor A and a separate flat fee for products purchased from vendor B.

Any thoughts or guidance you could offer would be much appreciated.

Many thanks

Stephen

multiple products purchased from same vendor 06 Aug 2016 12:42 #2

Dear Stephen,
You can implement this using a custom variable definition, where you check each vendor separately whether any products from that vendor are purchased:
Variable=myShipping; Value=0
Variable=myShipping; "vendor-1" in Vendors; myShipping=myShipping+5
Variable=myShipping; "vendor-2" in Vendors; myShipping=myShipping+99
Shipping=myShipping

Alternatively, you should also be able to implement the shipping cost for each vendor as an extra charge (that way you get around the extra variable, but the logic is still the same: You'll need to manually implement one check for each vendor):
"vendor-1" in Vendors; ExtraShippingCharge=5
"vendor-2" in Vendors; ExtraShippingCharge=99
Shipping=0

With both of the above, the shipping will be 5 (if any product from Vendor A is bought) plus 99 (if any product from Vendor B is bought). It does not matter which products from vendor A and B are bought.

Best regards,
Reinhold

multiple products purchased from same vendor 08 Dec 2016 15:24 #3

  • vedia
  • vedia's Avatar
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 (I have the same needs as Stephen).

If I copy/paste this in the "rules" field of the plugin :

Variable=myShipping; Value=0
Variable=myShipping; "myvendor1" in Vendors; myShipping=myShipping+5
Variable=myShipping; "myvendor2" in Vendors; myShipping=myShipping+99
Shipping=myShipping


Here is the message on the basket page (with 1 product from each vendor) :

Unknown variable 'myShipping' in rule 'myShipping=myShipping+5'
Unknown variable 'myShipping' in rule 'myShipping=myShipping+99'


And the delivery cost remains at 0.

Do I missed something? Can you tell me if I have to correct something?

Many thanks in advance.

Arnaud

multiple products purchased from same vendor 08 Dec 2016 15:45 #4

  • vedia
  • vedia's Avatar
I think that I just found the answer myself with another syntax which seems to work fine :

Variable=vendor1Shipping; Value=0
Variable=vendor1Shipping;"vendor1" in Vendors; Value=5
Variable=vendor2Shipping; Value=0
Variable=vendor2Shipping; "vendor2" in Vendors;Value=99
Shipping=vendor1Shipping+vendor2Shipping


(thanks to documentation/shipping-by-rules-plugins-for-virtuemart/rules-examples.html)

[SOLVED] multiple products purchased from same vendor 08 Dec 2016 22:29 #5

Problem solved.
  • Page:
  • 1