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: Categories based shipping

Categories based shipping 25 Mar 2018 19:03 #1

  • fer3oon
  • fer3oon's Avatar Topic Author
  • Offline
  • Posts: 12
Hi all,

I have a woocommerce website, and i am finalizing the shipping for it, i have the next categoires lets call them by slug along with shipping needed
Categories A, B and C || shipping = 15 + (20*length(vendors)) ,, vendors here who supplies only these Categories A, B and C only
Categories D, E and F || shipping = 400 +(100*length(vendors)) and max articles count <=5 , vendors here who supplies only these ategories D, E and F only

Categories D, E and F || shipping = 1000 +(100*length(vendors)) and max articles count <=10 and >=6 , vendors here who supplies only these Categories D, E and F only

Categories D, E and F || shipping = 1500 +(100*length(vendors)) and max articles count =15 and >=11 , vendors here who supplies only these Categories D, E and F only

Categories G, H and I || shipping = 200 +(50*length(vendors)), vendors here who supplies only these Categories G, H and I only

issue is the combination between the categories in one CART (order)

how can i manage if condition

if customer buy one item from each category in one cart

how do you solve this in your plugin ?

Regards,
Fer3oon

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

Categories based shipping 24 Aug 2018 00:32 #2

Dear Fer3oon,
Sorry for the very late reply. We have been very busy with several concurrent projects and were unable to provide any support in the last few months.

While the plugin calculates shipping costs for the whole order by default (i.e. you do not specify shipping costs per product or per category), with the advanced version of the plugin, you can still achieve what you want. To get the number of vendors that sell products from categories A, B and C in the order, you can use the function evaluate_for_categories to restrict the calculation of the vendor variable to just those categories. You'll then do the same for all other categories:
<code>
Variable=catABC; Value = 15 + 20*evaluate_for_categories(length(vendors), "A", "B", "C"))
Variable=catDEF; evaluate_for_categories(Articles, "D", "E", "F") <= 5; Value = 400 + 100*evaluate_for_categories(length(vendors), "D", "E", "F"))
Variable=catDEF; 5<evaluate_for_categories(Articles, "D", "E", "F") <=10; Value = 1000 + 100*evaluate_for_categories(length(vendors), "D", "E", "F"))
Variable=catDEF; 10<evaluate_for_categories(Articles, "D", "E", "F") <= 15; Value = 1500 + 100*evaluate_for_categories(length(vendors), "D", "E", "F"))
Variable=catGHI; Value = 200 + 50*evaluate_for_categories(length(vendors), "G", "H", "I"))
Shipping=catABC + catDEF + catGHI
</code>

Best regards,
Reinhold

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

  • Page:
  • 1

VM - Shopping cart

 x 

Cart empty

Login Formular