News:

Support the VirtueMart project and become a member

Main Menu

Having a lot of shipping rates makes the website slow?

Started by lindapowers, January 06, 2013, 20:35:19 PM

Previous topic - Next topic

reinhold

Quote from: lindapowers on January 17, 2013, 09:11:26 AM
Hi Reinhold, I'm really interested in testing it, is your website down or my connection having problems?

Sorry, had a hardware failure this morning at ~8:04. Server should be up and running again.

Quote from: lindapowers on January 17, 2013, 09:11:26 AM
PD: The only thing I saw you didnt mention is the Tax in your example line. We need to apply a Tax to our shipping costs.

For each country set you can select the tax to be applied (or not). The tax ID is then passed on to virtuemart, just like in the default weight countries shipping plugin.

lindapowers

#16
Thanks Reinhold

Im testing the free version and works great, saves us the day for our european zones, so many thanks.


However, I think the advanced plugin will be even better for us If I could understand exactly how it works ;D.

We would like to apply additional charges per 5 kg, 10kg etc (we sell boxes of 5, 10 and 15 kg so the kg are always intervals of 5)



If you notice below our shipping costs + tax of the shipping cost gives us rounded results= 5.00 €, 7.00 €

We need them that way cause we use "cash on delivery" as one of our methods so we can't charge decimals and for marketing reasons too, decimals are not nice.


Example of shipping cost for us:

5 kg= shipping base cost (4.1322) + 21% transport tax = shipping cost 5.00 €

10 kg= shipping base cost (5.7851) + 21% transport tax= shipping cost 7.00 €


As you can see our shipping costs always end up being .00 (we previously calculate them that way so that applying the tax gives us those quantities)

Now the question is, can you see a way of using that "additional charge per kg's or units" to make us achieve that?


I think you call it "Weight-dependent shipping with weight bands"

Maybe a method like this one could avoid us from entering a lot of shipping rates and just add additional charges per kg, that way shipping will be calculated even if the customer wanted to buy 4000 kg, text from your website:

"Consider a weight-based shipping cost structure with weight bands. For example, assume that the first 5kg will cost 5€/kg, the next 5kg will cost only 4€/kg, and everything above 10kg will cost 3€/kg. So an order with 7.5kg will cost 35€ (25€ for the first 5kg at 5€/kg, and 10€ for the remaining 2.5kg at 4€/kg), while an order of 20kg will cost 75€."

The problem is that those 4€/kg will get Tax applied too and final result will be a decimal. We would like to obtain an additional charge for units but with rounded results and Tax applied.

Don't know if you can understand what im trying to explain ;D

BTW= Tested in PHP 5.2.13, joomla 2.58 and VM 2.018a






reinhold

Actually, I'm not really sure I understand your shipping costs exactly. If I understand you correctly, you only ship  5, 10, 15, 20, .. kg, so you have a discrete set of possible weights.
For each of them, you want to set a shipping fee so that after 21% taxes you get a nice €-value.

I don't think one can easily express this as a mathematical formula (one might find a general formula, but I have not implemented mathematical functions like round or roundlower, which would be needed).

So, I don't think that one can find a proper mathematical expression to use with the Advanced version.

However, with the advanced version, you can save the time to calculate the net shipping costs (without taxes) from the actual, rounded values that you want to charge your user. E.g. if you want the user to pay 4€ shipping (including taxes), than you might specify the shipping cost as 4/1.21 (i.e. simply take out the 21% taxes). In the standard version, you'll have to do those calculations manually.

lindapowers

#18
Yes Reinhold is exactly what you described.

The shipping fee is interesting for us cause you have unlimited rates while the other method will make us introduce each line for.. lets say until 100 kg. (5, 10, 15, 20, 25 etc)

But what happens for shipping rates over 100 kg which we have not defined? That was our concern with the core VM plugin. Imagine a customer wants to buy products that weight 200 kg and you don't have that line defined.

--------------------------------------

4/1.21 how does virtuemart understand that 1.21 is the shipping rate if you leave the default tax selection without any calculation rule? Is connected I guess.

Anyway thanks a lot for the plugin and for posting, we searched and tried most of the plugins in JED but none except the shipping by states saved us time, your plugin saves us a looot of work.

Regards

reinhold

Quote from: lindapowers on January 18, 2013, 00:13:07 AM
But what happens for shipping rates over 100 kg which we have not defined? That was our concern with the core VM plugin. Imagine a customer wants to buy products that weight 200 kg and you don't have that line defined.

In that case, the shipping plugin does not return any shipping rate, and is thus not offered as a shipping method.

You might use the advanced plugin to set shipping costs of e.g. 4€ per 5kg (i.e. 0.8€/kg), reduced by 21% taxes, for higher weights. I.e.

Weight>100; Shipping=Weight*4/5/1.21

This charges 4€/5kg (that's 0.8€/kg) gross shipping costs (meaning 0.8/1.21=0.661157 net shipping costs per kg, on which 21% tax is then applied).


Quote from: lindapowers on January 18, 2013, 00:13:07 AM
4/1.21 how does virtuemart understand that 1.21 is the shipping rate if you leave the default tax selection without any calculation rule? Is connected I guess.

It doesn't know. This is just a workaround that hardcodes the tax rate of 21% into the shipping costs. In particular, if you want the customer to pay 4€, you need to calculate out the 21% tax, which means you have to divide 4€ by 1.21 (i.e. 1+21/100).


Regarding support for future versions: As I'm using all my plugins on my own webshop (that's actually the main reason why I developed them, and IMO that's the only way to create software that is usable), I'll need to keep them up to date with new VM versions, anyway. So, yes, I'll try to support them as good as possible for new versions (but please understand that I cannot give a legal guarantee). And all future versions of the plugins are made available to all buyers (i.e. I do not use something like "1 year updates are included", rather all future updates are included).


lindapowers

Thanks Reinhold

That line there solves it for us:

We have just removed the hardcoded tax so it takes the one already applied in the rest of the lines.

We don't require a legal guarantee but just understand our concern when we are gonna use your plugin as our main system to calculate all shipping rates and VM is constantly getting updated. We are happy knowing you use them in your own shop.

Regards

reinhold

#21
BTW, the latest version of the "Shipping by Rules" plugin now allows you to give the shipping costs either without taxes (Shipping=...) or with taxes applied (ShippingWithTax=...).
http://open-tools.net/virtuemart-2-extensions/vm2-advanced-shipping-by-rules-plugin.html

So now there is no need any more to add the /1.21 to subtract the 21% taxes. Simply give the shipping costs with taxes and the correct tax amount will be determined from the final shipping costs.

lindapowers

Excellent Reinhold! we really appreciate your work.

Regards