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 by state and weight multiplier 20 Jul 2013 14:40 #1

  • sonyarief
  • sonyarief's Avatar Topic Author
Dear,

I just bought advanced shipping by rule plugins and i need some assistanc.

How if i want to calculate shipping based on states and weight * price per kg. Different states, different shipping cost.

For example:

state: abc; shipping=5*Weight
state: def; hipping=6*Weight
and so on.

Is it possible? or do you have any other way to use it?

Thanx a lot. Really need your help.

shipping by state and weight multiplier 24 Jul 2013 14:49 #2

By "states" do you mean countries, or the provinces / subdivisions of a country (like Texas, Alabama, etc. in the US, or like British Columbia, Quebec, etc. in Canada)?

You can have different rules for different countries by simply using different country zones.

There is currently no selection/variable for provinces inside a country. If you are able to describe the provinces in terms of postal code ranges, you can use conditions on the ZIP variable to have different shipping rates for different provinces.

Best regards,
Reinhold

shipping by state and weight multiplier 24 Jul 2013 18:02 #3

  • sonyarief
  • sonyarief's Avatar Topic Author
Dear Reinhold,

Thanx for the reply. What I meant by states, is by states. you can see from the countries setting, there is "states" on the right hand of each country.

What i mean, After i create all the states of that country, I need shipping by rules plugin to detect the states so that the plugin can work something like this:

Name: Fedex ; "name of state" ; Shipping: 12*Weight.

Can this plugin do that? if not, can you please modify it?

Thank You. I really need it to detect the state. :)

shipping by state and weight multiplier 24 Jul 2013 18:11 #4

Thanks for the clarification. As I said, currently, you cannot use the state in a condition. One implementation problem is that the state is internally represented by the state ID (a number), so making the state available as a variable (which would be very simple to implement) is totally unusable for the plugin user, because from a condition like state==634 it is almost impossible to tell which state you actually mean.

So the only user-friendly solution would be to extend the country selection to country+state, but AFAICS there is no predefined GUI control for that in Virtuemart. So I'd have to implement the whole selection box manually...

I'll put it on my TODO list, but cannot promise whether or if I'll be able to implement this in the near future.

Best regards,
Reinhold

shipping by state and weight multiplier 24 Jul 2013 18:18 #5

  • sonyarief
  • sonyarief's Avatar Topic Author
Dear Reinhold,

Thanx for your fast reply. Okay. With all respect, it's okay for me to help by giving some fee for the development of the plugin.

I am using this plugin as per Zip code and it works really excellent. It's just I need it for other site.

Thanx for your concern.

Regards

shipping by state and weight multiplier 17 Aug 2013 18:44 #6

  • sonyarief
  • sonyarief's Avatar Topic Author
Dear Reinhold,

just received the updates and thanx for it.

can the update do what i need now?

"Name: Fedex ; "name of state" ; Shipping: 12*Weight."

Thanx a lot

shipping by state and weight multiplier 17 Aug 2013 19:08 #7

There are now the following four variables:
-) StateID (the numeric ID as set in the VM config)
-) State (the displayed name, e.g. "California")
-) State2, State3 (the 2- and 3-letter codes as set in the VM config)

You can use any of these, but I prefer the 2-letter code. For examples, please see the plugin examples (www.open-tools.net/documentation/22-virt...ipping-by-rules.html near the end of the page).

shipping by state and weight multiplier 17 Aug 2013 19:22 #8

  • sonyarief
  • sonyarief's Avatar Topic Author
Thanx a lot Reinhold.

I really appreciate the update since i need it so much.

However, how to use it for the state?

i put it like this:

Name=Fedex; State = California ; Shipping=10*Weight
Name=Fedex; State = Arizona ; Shipping=20*Weight

Is this right?

Thank You.

shipping by state and weight multiplier 23 Aug 2013 16:06 #9

Basically, that's right. You just need to wrap strings in quotes and use == for the comparison:
Name=Fedex; State == "California" ; Shipping=10*Weight
Name=Fedex; State == "Arizona" ; Shipping=20*Weight

shipping by state and weight multiplier 15 Feb 2014 16:20 #10

  • seehandy
  • seehandy's Avatar
Hi Reinhold,
I have similar problem here,
Example

Name=Fedex; State == "California" ; Shipping=10*Weight

but i want formula for roundup weight, so it is 1lbs 2lbs 3lbs, what is the formula?

Example shipment Fedex to California weight 3,5lbs i don't want the formula count is as 10*3,5 but it should count 10*4

What is the formula? please help thank you.

shipping by state and weight multiplier 15 Feb 2014 17:08 #11

You can round up a variable to the next whole integer with the ceil(Weight) function. so, you simply have to replace Weight by ceil(Weight).

Best regards, Reinhold
  • Page:
  • 1