Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Forum

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:

Different cities with different rates per Weight. 07 Dec 2014 12:04 #1

  • gareth
  • gareth's Avatar Topic Author
Hi,

Im trying to set up a rule based on cities and the weights using Advance shipping.

I want to set up a drop list of the cities (About 40) at the checkout.

Heres an example of how I would like it to work:

City Name 1 cost $87.50 per 1kg to ship to
City Name 2 cost $65.50 per 1kg to shit to
etc...

So if I wanted to ship an item that weighed 0.73 to City Name 1

City Name = 0.73kg * $87.50 = $63.87

What formular would I use? This has really got me stuck. any help would be appreciated!

Different cities - Formula error! Help 09 Dec 2014 06:09 #2

  • gareth
  • gareth's Avatar Topic Author
Is there anybody that can help with this.


I have created a a "city" list from a drop down menu by import the names in to the database under

The formula I have is

Name=Alexandra;weight*25

So it would work like:

Select Alexandra as the city. The item weighs 0.87Kgs and the price per 1 Kg rate to go to that town is $25.00
Giving a shipping rate of $21.75

But its giving me the error:

syntax error during evaluation, RPN is not well formed! (Full rule: 'weight*')
Unknown error occurred during evaluation of rule 'weight*'.
Outstack:

Array
(
[0] => weight
[1] => *


Would really appreciate some help.

Different cities - Formula error! Help 10 Dec 2014 01:22 #3

Dear gareth,
How exactly did you create the "city" drop down, and where is that setting stored? If it is stored in the standard "City" field of the shipping address, you can use the City variable to check for the selected city (Please note that Name= identifies the name of the rule, not the shipping city!):

Name=Shipping to Alexandra; City=="Alexandra"; Shipping=Weight*25

If you create the dropdown in some other way (with a custom field or so), then things are a bit more complicated, because custom fields and other custom features are not readily available to the plugin.

Regarding the error: Are you sure you have the "25" in the rule? That error message appears when you forget the final term and write "weight*" (without the 25).

Best regards,
Reinhold

Different cities with different rates per Weight. 10 Dec 2014 05:49 #4

  • gareth
  • gareth's Avatar Topic Author
Thanks For that. Yes a create a new list using "city" and imported the names in phpmyadmin.

Your line works perfectly. But when I try it with mine I get errors.

The code Iam using is:

Name= Shipping to Auckland; City==“Auckland“; Shipping=Weight*75
Name= Shipping to Alexandra; City==“Alexandra“; Shipping=Weight*400
Name= Shipping to Ashburton; City==“Ashburton“; Shipping=Weight*308
Name= Shipping to Balclutha; City==“Balclutha“; Shipping=Weight*384
Name= Shipping to Blenheim; City==“Blenheim“; Shipping=Weight*252
Name= Shipping to Christchurch; City==“Christchurch“; Shipping=Weight*182
Name= Shipping to Clyde; City==“Clyde“; Shipping=Weight*337
Name= Shipping to Cromwell; City==“Cromwell“; Shipping=Weight*316
Name= Shipping to Dargaville; City==“Dargaville“; Shipping=Weight*131
Name= Shipping to Dunedin; City==“Dunedin“; Shipping=Weight*216
Name= Shipping to Edgecumbe; City==“Edgecumbe“; Shipping=Weight*113
Name= Shipping to Gisborne; City==“Gisborne“; Shipping=Weight*143
Name= Shipping to Gore; City==“Gore“; Shipping=Weight*326
Name= Shipping to Greymouth; City==“Greymouth“; Shipping=Weight*279
Name= Shipping to Hamilton; City==“Hamilton“; Shipping=Weight*89
Name= Shipping to Hastings; City==“Hastings“; Shipping=Weight*128
Name= Shipping to Havelock North; City==“Havelock North“; Shipping=Weight* 128
Name= Shipping to Hawea; City==“Hawea“; Shipping=Weight*337
Name= Shipping to Invercargill; City==“Invercargill“; Shipping=Weight*300
Name= Shipping to Kaikohe; City==“Kaikohe“; Shipping=Weight*131
Name= Shipping to Kaitaia; City==“Kaitaia“; Shipping=Weight*138
Name= Shipping to Kawakawa; City==“Kawakawa“; Shipping=Weight*122
Name= Shipping to Kawerau; City==“Kawerau“; Shipping=Weight*113
Name= Shipping to Kerikeri; City==“Kerikeri“; Shipping=Weight*140
Name= Shipping to Kumeu; City==“Kumeu“; Shipping=Weight*75
Name= Shipping to Levin; City==“Levin“; Shipping=Weight*121
Name= Shipping to Masterton; City==“Masterton“; Shipping=Weight*131
Name= Shipping to Mt Maunganui; City==“Mt Maunganui“; Shipping=Weight*93
Name= Shipping to Napier; City==“Napier“; Shipping=Weight*111
Name= Shipping to Nelson; City==“Nelson“; Shipping=Weight* 229
Name= Shipping to New Plymouth; City==“New Plymouth“; Shipping=Weight*106
Name= Shipping to Oamaru; City==“Oamaru“; Shipping=Weight*266
Name= Shipping to Orewa; City==“Orewa“; Shipping=Weight*79
Name= Shipping to Palmerston North; City==“Palmerston North“; Shipping=Weight*118
Name= Shipping to Queenstown; City==“Queenstown“; Shipping=Weight*381
Name= Shipping to Rangiora; City==“Rangiora“; Shipping=Weight*278
Name= Shipping to Rotorua; City==“Rotorua“; Shipping=Weight*93
Name= Shipping to Russell; City==“Russell“; Shipping=Weight*118
Name= Shipping to Silverdale; City==“Silverdale“; Shipping=Weight* 77
Name= Shipping to Taumaranui; City==“Taumaranui“; Shipping=Weight*143
Name= Shipping to Taupo; City==“Taupo“; Shipping=Weight*118
Name= Shipping to Tauranga; City==“Tauranga“; Shipping=Weight*93
Name= Shipping to Thames; City==“Thames“; Shipping=Weight* 115
Name= Shipping to Timaru; City==“Timaru“; Shipping=Weight* 249
Name= Shipping to Tokoroa; City==“Tokoroa“; Shipping=Weight*98
Name= Shipping to Wanaka; City==“Wanaka“; Shipping=Weight* 380
Name= Shipping to Wanganui; City==“Wanganui“; Shipping=Weight*131
Name= Shipping to Warkworth; City==“Warkworth“; Shipping=Weight*83
Name= Shipping to Washdyke; City==“Washdyke“; Shipping=Weight*277
Name= Shipping to Wellington; City==“Wellington“; Shipping=Weight*162
Name= Shipping to Wellsford; City==“Wellsford“; Shipping=Weight*83
Name= Shipping to Westport; City==“Westport“; Shipping=Weight*240
Name= Shipping to Whakatane; City==“Whakatane“; Shipping=Weight*118
Name= Shipping to Whangarei; City==“Whangarei“; Shipping=Weight*598


And the error I get when I try to select a shipment option on the front end is:


Evaluation yields unknown value while evaluating rule part '“Auckland“'.
Evaluation yields unknown value while evaluating rule part '“Alexandra“'.
Evaluation yields unknown value while evaluating rule part '“Ashburton“'.
Evaluation yields unknown value while evaluating rule part '“Balclutha“'.
Evaluation yields unknown value while evaluating rule part '“Blenheim“'.
Evaluation yields unknown value while evaluating rule part '“Christchurch“'.
Evaluation yields unknown value while evaluating rule part '“Clyde“'.
Evaluation yields unknown value while evaluating rule part '“Cromwell“'.
Evaluation yields unknown value while evaluating rule part '“Dargaville“'.
Evaluation yields unknown value while evaluating rule part '“Dunedin“'.
Evaluation yields unknown value while evaluating rule part '“Edgecumbe“'.
Evaluation yields unknown value while evaluating rule part '“Gisborne“'.
Evaluation yields unknown value while evaluating rule part '“Gore“'.
Evaluation yields unknown value while evaluating rule part '“Greymouth“'.
Evaluation yields unknown value while evaluating rule part '“Hamilton“'.
Evaluation yields unknown value while evaluating rule part '“Hastings“'.
Evaluation yields unknown value while evaluating rule part '“Havelock North“'.
Evaluation yields unknown value while evaluating rule part '“Hawea“'.
Evaluation yields unknown value while evaluating rule part '“Invercargill“'.
Evaluation yields unknown value while evaluating rule part '“Kaikohe“'.
Evaluation yields unknown value while evaluating rule part '“Kaitaia“'.
Evaluation yields unknown value while evaluating rule part '“Kawakawa“'.
Evaluation yields unknown value while evaluating rule part '“Kawerau“'.
Evaluation yields unknown value while evaluating rule part '“Kerikeri“'.
Evaluation yields unknown value while evaluating rule part '“Kumeu“'.
Evaluation yields unknown value while evaluating rule part '“Levin“'.
Evaluation yields unknown value while evaluating rule part '“Masterton“'.
Evaluation yields unknown value while evaluating rule part '“Mt Maunganui“'.
Evaluation yields unknown value while evaluating rule part '“Napier“'.
Evaluation yields unknown value while evaluating rule part '“Nelson“'.
Evaluation yields unknown value while evaluating rule part '“New Plymouth“'.
Evaluation yields unknown value while evaluating rule part '“Oamaru“'.
Evaluation yields unknown value while evaluating rule part '“Orewa“'.
Evaluation yields unknown value while evaluating rule part '“Palmerston North“'.
Evaluation yields unknown value while evaluating rule part '“Queenstown“'.
Evaluation yields unknown value while evaluating rule part '“Rangiora“'.
Evaluation yields unknown value while evaluating rule part '“Rotorua“'.
Evaluation yields unknown value while evaluating rule part '“Russell“'.
Evaluation yields unknown value while evaluating rule part '“Silverdale“'.
Evaluation yields unknown value while evaluating rule part '“Taumaranui“'.
Evaluation yields unknown value while evaluating rule part '“Taupo“'.
Evaluation yields unknown value while evaluating rule part '“Tauranga“'.
Evaluation yields unknown value while evaluating rule part '“Thames“'.
Evaluation yields unknown value while evaluating rule part '“Timaru“'.
Evaluation yields unknown value while evaluating rule part '“Tokoroa“'.
Evaluation yields unknown value while evaluating rule part '“Wanaka“'.
Evaluation yields unknown value while evaluating rule part '“Wanganui“'.
Evaluation yields unknown value while evaluating rule part '“Warkworth“'.
Evaluation yields unknown value while evaluating rule part '“Washdyke“'.
Evaluation yields unknown value while evaluating rule part '“Wellington“'.
Evaluation yields unknown value while evaluating rule part '“Wellsford“'.
Evaluation yields unknown value while evaluating rule part '“Westport“'.
Evaluation yields unknown value while evaluating rule part '“Whakatane“'.
Evaluation yields unknown value while evaluating rule part '“Whangarei“'.


Its got me stumped. Why does your line work but not mine?

Different cities with different rates per Weight. 10 Dec 2014 09:42 #5

Dear Gareth,
Did you create those rules using Word? Word replaces all double quoted by "typographical quotes", which are different characters to a computer, so the plugin no longer properly detects “Wellington“ as a string.
On first sight they look quite similar to humans, but if you increase the font size, you'll see that they look a little different. To a computer, they are completely different.

You'll need to replace all those typographical quotes (i.e. “ and “ by ").

Best regards,
Reinhold

Different cities with different rates per Weight. 10 Dec 2014 11:08 #6

  • gareth
  • gareth's Avatar Topic Author
That was is it. Working great now. Thanks.

One other questions, if I install a 3rd party one page checkout. There should be no issue with shipment being not the native virtuemart one?

Different cities with different rates per Weight. 11 Dec 2014 23:15 #7

  • gareth
  • gareth's Avatar Topic Author
I have tried to use a one page checkout third party plugin. But it doesnt seem to be compatible with your shipping module. Is there a reason for this? Should it still work with virtuemart?

Different cities with different rates per Weight. 12 Dec 2014 00:26 #8

Which OPC plugin have you tried?
I don't see a reason why it shouldn't work, as long as the OPC properly sends all data to VM by AJAX calls.
After all, each shipping method (even the "built-in" standard shipping by weight, country and zip) is provided by a plugin and VM simply creates a list of available shipping methods and sends it to the OPC...

What are your exact problems?

Best regards,
Reinhol
  • Page:
  • 1