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!

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

TOPIC:

Shipping cost by category and zip code and weight 07 Dec 2016 15:59 #1

Hi
I did not understand how to set up the shipping cost

fixed cost for all products in a category while for all other products dependent on zip code and weight

....
Condition=contains_any(Categories,1 ); Shipping=50
....
for products of other categories of shipping cost based on zip code and weight

thank you

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

Shipping cost by category and zip code and weight 07 Dec 2016 17:01 #2

Perhaps I understand with a following structure

Shipping=50*evaluate_for_categories(Articles, 1) + 10*evaluate_for_categories(Articles, 2)

in the second part instead of
10*evaluate_for_categories(Articles, 2)

I should put the cost calculated according to zip code and weight

....
not good it is given that so the cost is not fixed in the category with id = 1

I would like to
categories finestre (id=1) shipping 50
other categories based on the weight and zip code

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

Shipping cost by category and zip code and weight 08 Dec 2016 01:12 #3

Dear Crescy,
If I understand you correctly, you want to charge
-) 50€ for each product of category 1, plus
-) for all other products (i.e. not category 1) a shipping cost amount that depends on the weight of all other articles.

Using the advanced version of the plugin, you can calculate the weight of all products not in category 1 and then simply make the second part of the rules that you quote depend on this variable. The dependence on the ZIP code can be inserted just like in the usual cases. As an example, let's take the following shipping cost structure for all products not in category 1:
- If ZIP is from 1000 to 1999, then shipping cost will be 3€ for each kg
- If ZIP is not from 1000 to 1999, then shipping cost will be 10€ for orders below 5kg and 20 for orders of 5kg and more:
Variable=OtherWeight; Value=Weight-evalute_for_categories(Weight, 1)
1000<=ZIP<2000; Shipping= 50*evaluate_for_categories(Articles, 1) + 3*ceil(OtherWeight)
OtherWeight<5; Shipping= 50*evaluate_for_categories(Articles, 1) + 10
OtherWeight>=5; Shipping= 50*evaluate_for_categories(Articles, 1) + 20

I hope this gives you enough examples so you can tweak them yourselves to your particular shipping cost structure.

Best regards,
Reinhold

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

Shipping cost by category and zip code and weight 09 Dec 2016 10:12 #4

HI Reinhold
thanks for your quick response
you understand perfectly just that, all products of the category 1 fixed cost of 50 (in this case the cost does not vary with the amount) all other products in other categories the cost depends on zip code and weight and on the quantity

Now in my case does not vary only the weight but also the range of zip code, since the cost varies depending on whether it is the mainland or an island (I'm working in Italy) then

zip code range
00010-06135 ContinenteA
07010-09170 Sardegna
09171-89900 ContinenteB
90010-98168 Sicilia

Variable=OtherWeight; Value=Weight-evalute_for_categories(Weight, 1)
00010<=ZIP<06135; Shipping= 50 + 3*ceil(OtherWeight)

OtherWeight<5; Shipping= 50*evaluate_for_categories(Articles, 1) + 10
OtherWeight>=5; Shipping= 50*evaluate_for_categories(Articles, 1) + 20
......

then because 3*ceil(OtherWeight) ?
Best regards

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

Shipping cost by category and zip code and weight 09 Dec 2016 17:55 #5

Dear Crescy,
If I understand you correctly, your shipping cost structure is as follows:
- Shipping for products from category 1 is 50€ for each article, and also for all ZIP codes.
- All other products have shipping costs that depends on the ZIP code of the delivery and the total weight of all products (except category 1). For the ZIP code there are five different areas, each of which has a fixed shipping cost for orders below a given weight and different fixed shipping costs for orders above the threshold.

In the rules you can have multiple conditions, one on the ZIP code and one on the weight. Let us walk through some rules:

1) Define a custom variable OtherWeight that holds the weight of all products not in category 1:
Variable=OtherWeight; Value=Weight-evalute_for_categories(Weight, 1)
From now on you can use the variable OtherWeight to refer to the weight of all products except category 1.

2) For contintnteA (ZIP code condition) orders below 5kg (without category 1) get 10€ fixed, orders above 5kg get 20€ fixed:
00010<=ZIP<=06135; OtherWeight<5; Shipping=50*evalute_for_categories(Articles, 1) + 10
00010<=ZIP<=06135; OtherWeight>=5; Shipping=50*evalute_for_categories(Articles, 1) + 20

3) For Sardegna and the other aread you would create similar rules like we did for ContinenteA in step 2.

BTW, the 3*ceil(OtherWeight) was just an example I used, where each kg costs 3€ shipping. Of course, you'll need to adjust this to your case. If I understand your example correctly, there is only the distinction between lighter and heavier than a threshold (5kg in your example). In this case, I think you'll need a third case: No products from other categories (i.e. the number of articles from category 1 is equal to the total number of articles in the cart), which cause no further shipping costs. In this case, you would have to prepend something like the following rule to the two rules in step 2:
00010<=ZIP<=06135; evaluate_for_categories(Articles, 1)==Articles; Shipping=50*evalute_for_categories(Articles, 1)

I thope these examples help you writing the particular rules that create your shipping cost structure. If not, please give a little more detail about the weight-dependent parts for each of the five regions.

Best regards,
Reinhold

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

  • Page:
  • 1

VM - Shopping cart

 x 

Cart empty

Login Formular