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:

Shipping cost + % of total weigth + fix per Kg 25 Nov 2015 19:12 #1

  • musqsim
  • musqsim's Avatar Topic Author
HI there,

I'm using ADVANCED SHIPPING BY RULES and I'm trying to set some rules with this.

Firts I need to check wich is bigger: the total weight or total volumetric weight.
To get the Total volumetric weight I need to use this formula: L(m)xH(m)xW(m)x250 = kg

Then wich one is bigger is selected and move to second condition:

I need to add a fixed cost of 0.05€ per Kg

and finally I need to add in Euros 13.25% of total weight.


Example:
order with 5 Kg, and dimensions on 0.50(w), 0.30(h), 0.20(l)

weight: 5kg
volumetric weight: 0.50x.30x0.20x250 = 7.5 Kg (So this one is used, the cost of shipping to 7.5Kg is 15.65€)

Then I need to add a tax of 0.05€ per kg: 7.5x0.05=0.375€ -> should be 0.38€

The I need to add a tax of 13.25% of total weight: 7.5x0.1325 = 0.99375€ -> should be 0.99€


This means that total cost of this shipment to charge to user is: 15.65 + 0.38 + 0.99 = 17.02€

So far I got:

Variable=RWeight; Value= Length*Width*Height*250

Name=TNT Economy Express Zone 2; max(RWeight,max(RWeight,weight))<=5; Shipping=14.00
Name=TNT Economy Express Zone 2; 5<max(RWeight,weight)<=6; Shipping=14.83
Name=TNT Economy Express Zone 2; 6<max(RWeight,weight)<=7; Shipping=15.65
Name=TNT Economy Express Zone 2; 7<max(RWeight,weight)<=8; Shipping=16.48

Can you help me with this?
Thanks in advance!

Shipping cost + % of total weigth + fix per Kg 03 Dec 2015 13:50 #2

Dear Musqsim,
To make things clearer to read and understand in the future, I would make use of several custom variables for the volmetric weight and the weight used for he calculation.
The extra cost and the percentage tax can be achieved with the ExtraShippingCharce feature (see the documentation: open-tools.net/documentation/shipping-by...l#shipping_modifiers )
Variable=VolWeight; Value = Length*Width*Height*250
Variable=UseWeight; Value = max(VolWeight, Weight)
ExtraShippingCharge=0.1325*UseWeight+0.05*ceil(UseWeight)

Name=TNT Economy Express Zone 2; UseWeight<=5; Shipping=14.00
Name=TNT Economy Express Zone 2; 5<UseWeight<=6; Shipping=14.83
Name=TNT Economy Express Zone 2; 6<UseWeight<=7; Shipping=15.65
Name=TNT Economy Express Zone 2; 7<UseWeight<=8; Shipping=16.48

Please note that the ExtraShippingCharge will automatically be added to the Shipping that is determined by the TNT Economy Express Zone rules. You don't have to explicitly add the extra charge. You just define the extra charge once (calculated from the Weight), and the plugin does the rest.

Best regards,
Reinhold

Shipping cost + % of total weigth + fix per Kg 03 Dec 2015 15:53 #3

  • musqsim
  • musqsim's Avatar Topic Author
Well, thanks a lot!

I'll use this yes.
Good work.

[SOLVED] Shipping cost + % of total weigth + fix per Kg 04 Dec 2015 00:34 #4

Problem solved.

[SOLVED] Shipping cost + % of total weigth + fix per Kg 25 Jan 2016 20:10 #5

  • musqsim
  • musqsim's Avatar Topic Author
Hi there,

sorry to open a SOLVED Topic, but I'm having some difficulties.

All good so far except I need to calc VolWeight for each product and not to the total.

If I have 2 products, I need to reach VolWeight of each product and then sum them...

By the way I can only get VolWeight to work with the following:
Variable=VolWeight; Value = TotalLength*TotalWidth*TotalHeight*250

not with the one you mentioned:
Variable=VolWeight; Value = Length*Width*Height*250

If I use this one, I get:

Evaluation yields unknown value while evaluating rule part 'Length'.


It is possible to check VolWeight for each product?

Thanks!

[SOLVED] Shipping cost + % of total weigth + fix per Kg 29 Jan 2016 12:42 #6

Dear Musqsim,
If I understand you right, all you want to do is calculate the volumetric weight of the total order, i.e. the total volume of all products multiplied by a factor 250. You don't need the actual volumetric weight of each product.

If this is the case, the volumetric weight can be easier calculated using the Volume variable:
Variable=VolWeight; Value=250*Volume

Is this what you have in mind?

Best regards,
Reinhold

[SOLVED] Shipping cost + % of total weigth + fix per Kg 29 Jan 2016 15:18 #7

  • musqsim
  • musqsim's Avatar Topic Author
Hi, thanks for reply.

No, I don't need weight of total order.

I need to calc the volume of each product and after that sum them all.

With
Variable=VolWeight; Value = TotalLength*TotalWidth*TotalHeight*250

This sums all the measures and clc volume weight, I need to calc each product volume weight of each product and sum them. After that aplly the shipping costs.

I'm using Advanced Shipping Rules, by the way. Thanks!

[SOLVED] Shipping cost + % of total weigth + fix per Kg 29 Jan 2016 16:02 #8

I need to calc the volume of each product and after that sum them all.


This is exactly what the Volume variable does: it gives the sum of the volumes of all individual products in the cart. The additional factor *250 can then be applied to Volume to arrive at the volumetric weight:
Variable=VolWeight; Value = Volume*250

Best regards,
Reinhold

[SOLVED] Shipping cost + % of total weigth + fix per Kg 04 Feb 2016 10:42 #9

  • musqsim
  • musqsim's Avatar Topic Author
I'm such a dumb!!!

now I get, thanks a lot, it works all great!
  • Page:
  • 1