Author Topic: New UK Post code shipping module, needs ideas for a wish list  (Read 94128 times)

dirtymonkey

  • Beginner
  • *
  • Posts: 14
  • Can you get square eyes?
    • Rocket IT Support
Re: New UK Post code shipping module, needs ideas for a wish list
« Reply #15 on: November 16, 2009, 16:46:27 pm »
Hi Ian,

Any chance of a quick update on this project?
I'd be happy to beta test if required.

Thanks in advance, DM.
Rocket IT Support - RocketITSupport.com | Custom Joomla Design/Development/Content Management/Marketing and SEO | Specialising in Quality Joomla Solutions, Remote Webmaster Services, Support and Consultancy.

awharton

  • Beginner
  • *
  • Posts: 4
Re: New UK Post code shipping module, needs ideas for a wish list
« Reply #16 on: March 17, 2010, 14:16:08 pm »
Is this a dead post now ? no sign of the shipping module ?

bella28

  • Beginner
  • *
  • Posts: 22
Re: New UK Post code shipping module, needs ideas for a wish list
« Reply #17 on: March 19, 2010, 10:33:07 am »
I have been following this post and am also in desperate need of a UK shipping module. The plans outlined sound fantastic. I would pay for a module like this!

alpertheidiot

  • Jr. Member
  • **
  • Posts: 103
Re: New UK Post code shipping module, needs ideas for a wish list
« Reply #18 on: April 10, 2010, 04:22:51 am »
Ian, I think some of us are happy to contrubite to a certain degree (financially), please can you update us where you are with the project? This certainly is a very very useful add on (and in fact is essential for a lot of people).

Please let us know whats happening and what needs doing..

thanks

alanB

  • Jr. Member
  • **
  • Posts: 101
Re: New UK Post code shipping module, needs ideas for a wish list
« Reply #19 on: April 23, 2010, 15:12:02 pm »
Hi,

After searching in vane for a UK postcode based shipping solution for virtuemart and finding this thread which looks like the work stalled I created my own UK postcode shipping module for a client of my company and my boss says that we will release it to the virtuemart community.

With this in mind and the earlier comments in this thread, I added more options than our client actually needs but I've had to restrict the bulk of my testing to the clients setup so please treat it as beta code and thoroughly test before deploying to a production enviornment. We don't offer any guarantee of fitness for purpose or any official support yet.

I'll accept bug reports here but as we aren't officially supporting it at the moment I don't know when I'll be able to do bug fixes.

----------- Details -----------

Installation
------------

Download the attached postcode_shipping_module.zip, unzip and upload the 3 files to /administrator/components/com_virtuemart/classes/shipping/

Configuration
-------------

Go to Components->VirtueMart.
Click on the Admin tab and click Configuration then the Shipping tab.
Tick the check box for "UK Postcode Zones. Shipping rates by zones defined by UK postcodes" to enable the module.
Click on the Store tab and click Shipping module List.
Find the Postcode Zones entry and click Configure Ship Method.

Options
-------

Carrier Name: This is the name shown in the shipping information on the order screen and also the start of the name in the checkout ship methods stage.

Tax Rate: set the tax rate for shipping.

Enable default zone: you can enable a default zone to catch any postcodes that don't match any zones you've set up, you can give teh default a name and base rate just like normal zones.

No zone match message: text to display if the default zone is disabled and the postcode doesn't match any normal zones (can be left blank to display no message).

Rate type: you can choose from 4 rate types - flat rate, by weight, by price or by items, see below for more info.

Shipping options: you can create shipping options that will present extra choices to the user and modify the zone rate (eg 9am delivery, Saturday delivery etc - see below for more details).

Maximum shipping rate: you can set a maximum shipping rate to cap the amount of shipping charged (can be used to give free shipping for a period without changing the zones or max £50 shipping etc).

Total order price for free shipping: you can set an amount to trigger free shipping.

Check address is in GB: if enabled the module will check if the address country is GB and immediately exit if not. If enabled you can enter a message to show if country is not in GB.

Zones
-----

Each zone has the following settings.

Zone name: the name of the zone (this does not have to be unique so you can create several different zones with different matching criteria but the same name to give the illusion of one zone).

Postcodes in zone: a comma seperated list of postcodes or parts of postcodes as controlled by the match type setting (see below).

Base rate: the base amount to charge for the zone, this will be modified depending on the rate type settings (see below) and the shipping option choosen (if any).

Match type: each zone can be set to match either the "area" or "outward" part of the postcode or the full postcode. The "area" part is the first letter(s) (eg TR for Cornwall where I live), the "outward" part is the letter(s) and number(s) upto the space (eg TR18 for Penzance), the full postcode is, of course the full postcode.

If a zone is set to "outward" match type you can enter postcode ranges like "TR15-18" as an equivenlant of writing "TR15,Tr16,Tr17,TR18". There are no ranges for area or full match zones.

A postcode will be tried against all "full" match zones first then against "outward" match zones and finally "area" match zones.

This allows you to setup a full match zone for a handfull of postcodes around your business (eg "TR181AB,TR182BC,TR183ED"), then an outward match zone for your postcode district (eg "TR18") and finally area match zones for the 'standard' zones for your carrier (eg "TR,PL,TQ"). this way the postcode TR18 1AB will match the full match zone, while TR18 9ZZ will match the outward match zone and TR19 4FG will match the area match zone.

Rate Type
---------

As stated above there are 4 rate types to choose from.

Flat rate
---------

The zone's base rate will be charged no matter what the order contains.

By weight
---------

You set a weight amount (in kg's) for the base rate and any extra weight will be charged in multiples of the base rate. So an order with a total weight of upto the amount set will be charged the zone's base rate, an order with up to twice the amount will be charged twice the zone's base rate etc.

You can also configure whether to show info of the weight on the shipping method choice list eihter nothing, show the number of "units" of weight or show the total weight. If you set the show option you can set a display label and whether to pluralise the lable.

As an aside I've done this because our client sells large items and they needed to be able to charge shipping per pallet with each item taking one or more pallets. So I've set the rate type to "By weight" and set the amount to 1 and to display the number of units of weight with a display label "pallet" with pluralise lable enabled. This means that I can set the weight of each item 1 kg for each pallet and the shipping method will charge 3 times the base rate for an item taking 3 pallets and will show "3 pallets" on the choose shipping method choice.

By price
--------

You can set up price bands with a minimum price to trigger the band and a modifier to apply to the zone's base rate. The modifier can be either a multiplication (*x), a division (/x), an addition (+x), a subtraction (-x) or a setter (=x) and it will be applied to the zone's base rate.

So if you set a band with a minimum of £10 and a modifier of +5 and a second band with a minimum of £100 and a modifier of =0 then an order of less than £10
will cost the zone's base rate, while orders between £10.01 and £100 will add 5 to the zone's base rate while orders of £100.01+ will be charge 0.

By Items
--------

Works similar to By price above except that the bands affect the number of items that fall within that band.

So if you set up a band with a minimum of 3 and a modifier of /2 and a second band with a minimum of 10 and a modifier of =0 then the first and second item would be charged the zone's base rate each, the third until the ninth item would be charged 1/2 the zone's base rate each and the tenth item upwards would not be charged.

Shipping Options
----------------

These have a name and a modifier (as above the modifier can be +,-,/,* or =).

When the module ouputs it's radio button on the shipping method choice stage of the checkout it will show an additional radio button choice for each option set.

So if you set an option with name equals "9am delivery" and modifier equals +15 and another option with name equals "Saturday delivery" and modifier equals +25 on the shipping methods stage of the checkout you will get 3 radio buttons from this module:

   ( ) STD, Zone 1: £10
   ( ) STD, Zone 1 [9am delivery]: £25
   ( ) STD, Zone 1 [Saturday delivery]: £35

Multiple carriers
-----------------

This module can only be configured with the zones for one carrier, however after reading the shipvalue topics about changes needed to clone the shipvalue module I've tried to make it easy to clone this module to provide for different carriers.

Basically for each carrier beyond the first you will need to decide on the clone's identifier which has to be the same in all the edits below (except the name and description in the ini file) and then follow the following steps (for the example the clone's identifier is '1'):

Copy postcode.php to postcode1.php.

Edit postcode1.php, change the following lines

Code: [Select]
59: class postcode {
60:    var $classname = "postcode";
61:    var $instance  = '';

to

Code: [Select]
59:class postcode1 {
60:    var $classname = "postcode1";
61:    var $instance  = '1';

Copy postcode.ini to postcode1.ini

Edit postcode1.ini, changing

Code: [Select]
4: name = Postcode Zones
....
12: description = UK Postcode Zones. Fixed shipping rates by zones defined by UK postcodes
....
15: filename = postcode.php

to

Code: [Select]
4: name = Postcode Zones 1 [enter any descriptive change here, shown on the shipping methods list]
....
12: description = UK Postcode Zones 1. Fixed shipping rates by zones defined by UK postcodes [enter any descriptive change here, shown on the shipping tab]
....
15: filename = postcode1.php
-------------------------------

As stated at the beginning of this post we offer no support or warranty for this module and accept no liabilty for problems caused by using this module but I look forward to hearing comments, ideas and bug reports from anyone who does test it.

Cheers,

Alan Brookland,

altcom Ltd.

[attachment cleanup by admin]

alpertheidiot

  • Jr. Member
  • **
  • Posts: 103
Re: New UK Post code shipping module, needs ideas for a wish list
« Reply #20 on: April 23, 2010, 16:03:10 pm »
alan, thank you so much for sharing this.. i will try this asap..

many thanks!

alanB

  • Jr. Member
  • **
  • Posts: 101
Re: New UK Post code shipping module, needs ideas for a wish list
« Reply #21 on: April 23, 2010, 16:51:12 pm »
Hi alpertheidiot,

no problem, I look forward to your feedback.

I've just found a bug, an old line of code left in by mistake but only triggered if the country = GB check is enabled.

Here's the fixed version of the module attached. Please use this one not the one two posts above.

Cheers,

Alan.

[attachment cleanup by admin]

heywood79

  • Beginner
  • *
  • Posts: 8
Re: New UK Post code shipping module, needs ideas for a wish list
« Reply #22 on: May 01, 2010, 15:22:50 pm »
Hi Alan

Thanks for this shipping module. It is just what has been needed.

I have configured for a client and am running through some test scenarios.

I have noticed that when Shipping By weight with the default zone enabled and the weight amount set at 15 it is charging customers a proportion of the default zone shipping rate.

i.e.
Default zone cost £8.99
Product wieght 7.5
Shipping Cost £4.50

Unless I have read/done something wrong this is supposed to charge £8.99 .

Am I correct?

alpertheidiot

  • Jr. Member
  • **
  • Posts: 103
Re: New UK Post code shipping module, needs ideas for a wish list
« Reply #23 on: May 01, 2010, 21:34:57 pm »
alan, I've been testing this your module and it is working like a treat. Im going to use it on my next project, and I will update you accordingly.

like i said, on my tests it just worked perfect, just what I needed.. thank you so much!

heywood79

  • Beginner
  • *
  • Posts: 8
Re: New UK Post code shipping module, needs ideas for a wish list
« Reply #24 on: May 01, 2010, 22:21:12 pm »
Hi alpertheidiot

Is it working spot on for you when you try shipping by weight?


asphole

  • Beginner
  • *
  • Posts: 20
Re: New UK Post code shipping module, needs ideas for a wish list
« Reply #25 on: May 04, 2010, 13:31:02 pm »
Hi guys, This is great to see after several days trawling for a UK based module. This looks like it will work perfectly so kudos to alanB for releasing it to the community. I have installed and tried it BUT i am having the same issue as heywood79 in the I set a base rate of £5.95 (default zone not enabled) but the shipping price being shown is 79p and not 5.95. I'm sure this is a confi issue but i'm stuck as to what to try next. Did you solve this heywood79?

asphole

  • Beginner
  • *
  • Posts: 20
Re: New UK Post code shipping module, needs ideas for a wish list
« Reply #26 on: May 04, 2010, 13:32:46 pm »
Ooops, I also meant to add that I was also using the ship by weight option. (Could this be virtuemart converting my product weight into something other than KG?) I have each product set in KG in the item listing.

asphole

  • Beginner
  • *
  • Posts: 20
Re: New UK Post code shipping module, needs ideas for a wish list
« Reply #27 on: May 04, 2010, 13:46:49 pm »
Just tried a bit more testing and switched on the 'show units of weight' display type and can now see that the weight being shows does not match the weight of the item. My item is set to 1.1kg in VM but is showing as 0.44kg on the shipping page. Now just need to find out why...

asphole

  • Beginner
  • *
  • Posts: 20
Re: New UK Post code shipping module, needs ideas for a wish list
« Reply #28 on: May 04, 2010, 14:15:09 pm »
$num_units; seems to be what is providing the unti of measure in the php script. My php is poor tho so any ideas anybody?

alpertheidiot

  • Jr. Member
  • **
  • Posts: 103
Re: New UK Post code shipping module, needs ideas for a wish list
« Reply #29 on: May 04, 2010, 16:30:48 pm »
sorry guys, I havent tried by weight option. I will try and let you know when I have some time..