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:

totally clueless, need help 24 Feb 2015 19:11 #1

  • rage76
  • rage76's Avatar Topic Author
hi, just bought the Advanced Shipping by Rules Plugin for VirtueMart. Since I am a newbie, I am totally clueless on it's usage.

Hoping someone can help me in creating shipping rules with parameters as below:

1. Air shipping - for weight below 500gm, Rs.50
2. Air shipping - based on weight (for most items) 100 per kg. flat.
3. Surface shipping - 50 per kg but minimum weight charged is for 2 kg. (this means 100) beyond that 50 per kg.
4. Option of Surface shipping "only", for particular products.

I shall be grateful.

Thanks.

totally clueless, need help 25 Feb 2015 17:21 #2

  • rage76
  • rage76's Avatar Topic Author
OK, I tried to figure out and this is what I did:

1. Upto 0.5Kg - Order weight: {weight}Kg; 0<Weight<=0.5; Shipping=50

this will most probably add shipping 50 to orders with weight below 0.5kg, right?

2. Upto 5Kg - Order weight: {weight}Kg; 0.5<Weight<=5; Shipping=100*(Weight)

This is total order weight x 100 for weight more than 0.5 and <= 5

But what I want here is the shipping should be calculated in multiples of 1kg. So, if the order weight is more than 1 and less than 2, it should be charged for 2. How to achieve this?

totally clueless, need help 26 Feb 2015 17:28 #3

Hello,
If I understand you correctly, the air shipping should be offered for all orders, while the surface shipping should only be offered if only particular products are in the order.
You would create two shipping methods, one for air shipping and the other for surface shipping. For both you probably want to restrict shipping to India only.

1+2) For the air shipping methods your attempt is almost correct, except that you need the multiple of 1kg, as you mention. This can be done with the ceil(...) function, which returns the next higher whole number:
Name={weight}Kg; 0<Weight<=0.5; Shipping=50
Name={weight}Kg; 0.5<Weight<=5; Shipping=100*ceil(Weight)

3+4) Surface shipping should only be offered for particular products, so you have add those conditions. If the conditions are met, the shipping cost with 50*ceil(Weight), but with a minimum of 100 (i.e. we take 100 or 50*ceil(Weight), whichever is greater. This means, we use the max(...) function):
Name=Surface shippping; Condition=contains_only(skus, "sku1", "sku2"); Shipping=max(100, 40*ceil(Weight))
This example assumes that you distinguish the surface shipping products by sku. If you identify them by their category, you can change the condition to check the Categories or the Manufacturers lists.

Best regards,
Reinhold

totally clueless, need help 01 Mar 2015 08:19 #4

  • rage76
  • rage76's Avatar Topic Author
Hello Reinhold, Good day !!

Thanks for the support. Some queries:

1. Air shipping: if I need to auto calculate shipping with weight going anything beyond 5, what do I need to add?

2. Surface: If is set as per sku, every time I add a new product, I will have to add that sku to the rule, plus there might be so many products. Also, the products could be in multiple categories by multiple manufacturers. How do I resolve this?

If I create a new category for example "surfaceship", add this to all the products that must be surface shipped, and keep this category unpublished, will this work?

warm regards

Rajesh

totally clueless, need help 03 Mar 2015 15:31 #5

Dear Rajesh,
1) Air shipping beyond 5kg:
Simply modify the rule to remove the upper bound condition on the weight (i.e. delete the <=5 ):
Name={weight}Kg; 0.5<Weight; Shipping=100*ceil(Weight)

2) You are correct: If you do it with SKUs, then you'll have to keep the list up to date in the shipping method, which can be quite cumbersome. You can use an unpublished category, as you suggest.
It seems I initially misunderstood your requirement: Now you say that certain products MUST be surface-shipped, while I understood you initial request that only certain products are allowed to be surface-shipped. If you want certain products to REQUIRE surface-shipping, when you need to add a condition to the air shipping that prevents air-shipping for those products.
Name=Air Shipping; Condition=contains_none(Categories, 14); 0.5<Weight<=5; Shipping=100*ceil(Weight)

Do you then want to offer surface shipping for all orders, or only for orders that have to be surface-shipped? In the latter case the rule for the surface-shipping method would be:
Name=Surface Shipping; Condition=contains_any(Categories, 14); Shipping=max(100, 40*ceil(Weight))

If you want to offer surface-shipping for all orders, simply remove the condition and create two separate shipping methods.

If you want to offer only air shipping or only surface shipping, then you can combine all into one set of rules of one shipping method:
Name=Air shipping - {weight}Kg; 0<Weight<=0.5; Condition=contains_none(Categories, 14); Shipping=50
Name=Air shipping - {weight}Kg; 0.5<Weight; Condition=contains_none(Categories, 14); Shipping=100*ceil(Weight)
Name=Surface shipping; Shipping=max(100, 40*ceil(Weight))

Best regards,
Reinhold

totally clueless, need help 03 Mar 2015 16:33 #6

  • rage76
  • rage76's Avatar Topic Author
UPDATE: It seems I have been able to achieve what I wanted...Shall confirm after testing

wow, I am even more confused now !!

I have aerosols which cannot be shipped by air so I need 'only' surface shipping for them.

So do I use an un-published category and add a condition to the air shipping that prevents air-shipping of the products that fall under this category?

Or is there another, better option.

With your help, I now have 2 options, Airship & Surfaceship (for shipments beyond 2kg) and they seem to be working fine.

One more thing:

What is '14' in the following rule, is it the category id?
Name=Air Shipping; Condition=contains_none(Categories, 14); 0.5<Weight<=5; Shipping=100*ceil(Weight)

Warm regards

Rajesh Prakash
techsolute.com

[SOLVED] totally clueless, need help 08 Mar 2015 15:19 #7

Problem solved.

Great to hear that you were able to figure out the solution yourself!

Best regards,
Reinhold
  • Page:
  • 1