Jump to content

[extension] UK Postal Zones Pack


shoulders
 Share

Recommended Posts

Hello

 

This is my first release to try and fix postage for UK prestashop companies.

 

The intial release was done for ps 1.3.x version and should be backwards compatible. It currently will work with ps 1.4.x version but i am lloking at solutions where we can use the counties option with the postcodes.

 

Basically this pack includes a SQL file that will

  • setup 12 new zones for the uk and its dependencies
  • make the UK have states
  • add all UK counties in as states
  • assign all counties to an appropriate zone
  • assign all other UK dependecies to an appropriate zone

Most carriers will have a combination of the 12 zones i have configured. look at the zone map i have included.

 

All my research is in the pack so the community can look at it and make sure there are no stupid errors etc..

 

PLEASE BACKUP BEFORE USING THIS. THIS IS AN INITIAL RELEASE AND SHOULD NOT BE USED ON PRODUCTION SERVERS JUST YET

 

To Do List

  • add Royal Mail Carrier and its Weight ranges in to the SQL
  • figure out how to utilise ps 1.4 counties and postcodes (a feature request might be needed)
  • make the script so it will allow upgrading previous versions (i need suggestion on insert/update commands in my SQL
  • make an English (UK Language Pack ie check -> cheque etc..)
  • migrate SQL script into a moduel
  • upgrade to PS1.5

thanks

 

shoulders

 

Set Zones By Postcode Module (new 01-05-13) currently not available

 

Currently only tested on PS 1.5.3.1, it might work on 1.4 but not checked.

 

yes thats right, you can now set shipping zones by customers postcode. I have loads of error checking code in there that should compensate for customers. This is a RC release and i believe it to work 100% but you guys need to do some proper testing.

 

I have left it in this thread as i might merege the 2 chunks of code together to make it less messy.

 

This is free to use but cannot be resold etc.. without my permission etc..

 

If you want to say thanks there is a donate button in the module

 

module removed for now

UK Postal Zones Pack RC 1.0.zip

Edited by shoulders (see edit history)
  • Like 3

Share this post


Link to post
Share on other sites

yes you are right on that. Royal Mail are a fixed price to anywhere in the UK so postcodes etc do not make any difference.

The reason for the postcodes (or counties at present in my pack) is for when you set up a courier for larger items you can account for their different pricing structure while using the same postal zones etc without having to recode everything. This pack's aim is to set up the basics for any UK delivery company. So far i am quite pleased with how i have managed to use the counties to chop up the UK because i cannot use postcodes yet.

EG. With my pack, If a shop uses only royal mail for delivery a customer will still set up their county although it will not make a difference in delivery price but then the shop adds a courier firm for delivery with different shipping zone prices you can then use the already entered counties in customers addresses to calculate the new postage for the courier company.

is this what you ment?

cheers

Share this post


Link to post
Share on other sites

firstly please play about with this on a test server first / make backups etc...

Yes, The idea is run just run the mysql script in phpmyadmin once you have altered the database prefixes in the script. ( i will update the instructions)

and yes, renaming in the translation section , change where it says state to county, i have not worked out which ones to change yet, that is on thelist of things to do.

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Hi Shoulders,

I've just applied this to a store I'm currently working on.. its fantastic!

I've yet to really set up the pricing/ranges etc, but everything went in without a hitch and I'm sure you've just saved me hours of tedious imputting.

A big thank you from me anyway. Have you considered making this into some sort of module?

Great work!

Mark

Share this post


Link to post
Share on other sites

I am not sure this can be made in to a module. the research took most of the time. Matching counties up to postcodes, although not 100% perfect it allows much more specific delivery prices. I am particulary chuffed finding the ISO codes for the counties.

I have added a royal mail section to version 2 of this script. i am still tweaking it.

I think prestanotes could be really handy as longs as it does not just become a forum but a repository for stuff.i like prestaportal.com for resources.

Thanks for the feedback

Share this post


Link to post
Share on other sites

As I module I was only thinking as a big easy 'RUN' button type of deal for those that aren't too hot on PHPMyAdmin/SQLYog etc, where the module runs the .sql file from within the directory.

I guess this could be made into a separate module itself, to allow people to easily import SQL into their database (complete with BACK UP warnings all over the place!).

Just a thought anyway :)

Prestanotes: Nah not a forum, its my intension to simply make it a blog/feed with regular bite-size tutorials, snippets, free modules and updates, hopefully with contributions from others down the line.

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Any Idea how we can find out the postal code zone ( ie AL, AB, KY) by the counties ( in this case :STATE ) you set up ?

as many international freight companies will base theit freight price based on the Postal Code Zone

Thank You in advance

Share this post


Link to post
Share on other sites

Any Idea how we can find out the postal code zone ( ie AL, AB, KY) by the counties ( in this case :STATE ) you set up ?

as many international freight companies will base theit freight price based on the Postal Code Zone

Thank You in advance


I am not really sure what you are asking. all county post codes are in the excel file in the pack. also there is a link to the website i used to work all this out. ie counties by post code.

Posting by postcode is not really possible yet, it is on my list of things to see if it is possible but it will probably involve a lot of work.

see here

forge.prestashop.com/browse/PSCFI-1648

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Hi Shoulders,

Thanks for all your work and replies on this, I think I got a bit lost though reading through all the questions!

I'm basically looking for a solution for a flower shop to be able to limit delivery of their flowers to within a 10 or 20 mile radius of they're shops as they have their own delivery vans.

So if someone tries to buy flowers for delivery to a Postcode not covered by their vans they are prevented from completing the order until they enter a Postcode that is catered for.

Is your solution the best option for this?

I hope this makes senese!
Cheers Shoulders
Warren (UK)

Share this post


Link to post
Share on other sites

Hi Shoulders,

Thanks for all your work and replies on this, I think I got a bit lost though reading through all the questions!

I'm basically looking for a solution for a flower shop to be able to limit delivery of their flowers to within a 10 or 20 mile radius of they're shops as they have their own delivery vans.

So if someone tries to buy flowers for delivery to a Postcode not covered by their vans they are prevented from completing the order until they enter a Postcode that is catered for.

Is your solution the best option for this?

I hope this makes senese!
Cheers Shoulders
Warren (UK)


Hi mate,

this solution is not for you. the best you can do is limit by postal zones (uk split into 6 zones), keep check the latest prestashop updates

Share this post


Link to post
Share on other sites

Has anybody confirmed that these postal zones actually work with PayPal?

@LancastrianIT, Your readme says two things,
1) that you've removed "GB-" from the ISOs because they won't fit.
2) that you've found some possible faults on the paypal county list

There has previously been a serious issue with PrestaShop and PayPal when Presta was passing an incorrect ISO of "UK". I doubt that an ISO of "MAN" (Greater Manchester's ISO) will actually work. I am impressed at your finding ISOs for UK counties but I believe that if you can't feed "GB-MAN" then you should leave everything as "GB" - if you think about it, most UK PrestaShop installs will be using "GB" for all UK addresses, so if you do the same then users are less likely to run into trouble. It's nice having a specific ISO but no use if no-one else recognises it. Indeed, as the ISO is "GB-MAN", even a fully ISO-aware payment system is likely to baulk at "MAN".

It will be worthwhile for someone (after fixing the ISOs) to test the 4 counties that you've amended to see whether PayPal has any issue with a county that doesn't match their list, but I suspect there's more lee-way with this part.

The trouble with the UK is that there is very little agreement on how to divide it up. Many individuals tend to cling to historic counties - there are many people in Greater Manchester where I live that still believe they are in Lancashire.

It would be useful therefore to have some mechanism to 'correct' the state based on the postcode, possibly adapting along the lines of this method

These niggles aside, this is good work. Thanks for sharing it.

Share this post


Link to post
Share on other sites

These postal zones are not for integration with paypal. Paypal was used as a base for the county names.

I will include the GB- when prestashop updates the field length

after research the 4 paypal county names mentioned were found to be incorrect, these were older names for some counties. I have advised paypal and they responded.

GB should not be used for all counties. The ISO code is for reference mainly but i included it for completeness.

I will keep an eye on the Paypal county list and update when they do. The list i am using matches the paypal list exactly.

My method of dividing the UK up i think is probably the best way of doing it until Prestashop completely recognises postcode.

My pack also has the added advantage of putting all my research out there so everyone knows how it works and can improve it if there is a way.

thanks for all comments

Share this post


Link to post
Share on other sites

  • 4 weeks later...

Hi there mate,

This looks good to me - and I am wondering if it will help me...

Basically i am selling products that will only be distributed around the London area (I can provide the postcodes required). The price of postage is fixed at £10 and free for purchases over £25

If someone wants to buy a product outside the postcodes, they will not be able to go through with the order (some message will display)

Is your solution suitable for this?

Many thanks,

Share this post


Link to post
Share on other sites

Hi there mate,

This looks good to me - and I am wondering if it will help me...

Basically i am selling products that will only be distributed around the London area (I can provide the postcodes required). The price of postage is fixed at £10 and free for purchases over £25

If someone wants to buy a product outside the postcodes, they will not be able to go through with the order (some message will display)

Is your solution suitable for this?

Many thanks,


Hi

This solution does not do any king of postcode lookup, it is based on counties to postal zone. This feature you need will probably be part of PS 1.5.

Share this post


Link to post
Share on other sites

Hi there mate,

This looks good to me - and I am wondering if it will help me...

Basically i am selling products that will only be distributed around the London area (I can provide the postcodes required). The price of postage is fixed at £10 and free for purchases over £25

If someone wants to buy a product outside the postcodes, they will not be able to go through with the order (some message will display)

Is your solution suitable for this?

Many thanks,


Hi

This solution does not do any king of postcode lookup, it is based on counties to postal zone. This feature you need will probably be part of PS 1.5.


Thanks for the quick reply. In fact I am building this site for a client....is there anyway i can use your solution to help me in anyway achieve something similar to what i want to do? i.e. is there a way that it will restrict people who buy outside certain counties?

Thanks,

Share this post


Link to post
Share on other sites

using my system no. my system basically is the PS system correctely configured for royal mail and courier posting around the UK.

you can maybe setup up states like London LO1, London LA2 so this will have the postcode in it but it might have issue with the postall address or you could try using london as a state and assign counties to it. Have a play on a demo server. i just got out a pen and paper and planned it first knowing how i i could seperate the address with prestashop.

Share this post


Link to post
Share on other sites

Hi Shoulders,

Thanks for all your work and replies on this, I think I got a bit lost though reading through all the questions!

I'm basically looking for a solution for a flower shop to be able to limit delivery of their flowers to within a 10 or 20 mile radius of they're shops as they have their own delivery vans.

So if someone tries to buy flowers for delivery to a Postcode not covered by their vans they are prevented from completing the order until they enter a Postcode that is catered for.

Is your solution the best option for this?

I hope this makes senese!
Cheers Shoulders
Warren (UK)


I believe I have a solution for your problem. Here is what I have had developed:

1) admin area has a place where suitable postcodes can be entered
2) user is able to register using any address
3) when he chooses a delivery address that is not within the specified postcode list e.g. CR*, HA*, an message will display (custom message e.g. "we're sorry we can't deliver here, please view a list of suitable locations for delivery by clicking.

Let me know if this is something you would be interested in. I can put you in touch with the developer.

Thanks

Share this post


Link to post
Share on other sites

for me this is not my aim but there are a few other people on this thread which would be of use. my solution is just really to populate the prestashop system in the best way without having to spend ages typing it in and working out what goes where.

shoulders

Share this post


Link to post
Share on other sites

  • 4 weeks later...

Hi

 

Just installed this on clients site Presta 1.4.3 and as it stands no glitches. Still to test via PayPal module so would like to hear from anyone who is using this with PayPal and had any issues/fixes

 

If this work then fantastic amount of time saved, this should be turned into a turn key module!

 

Brilliant Shoulders

Share this post


Link to post
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
  • 3 months later...
  • 1 month later...

Hi Shoulders

 

This looks great just what i need as i only deliver to the uk and fed ex us the same map system as apc , i was just wondering as i am new to all this and still learning , where in the sql script do i change the prefixes if you could let me know that would be great.

many thanks

Share this post


Link to post
Share on other sites

  • 1 month later...

Shoulders, this is great. I want your babies.

 

I'm setting up a second shop and I well remember the pain of manually inserting this information.

 

Thanks.

 

thanks for the offer but prestashop is my baby

 

Hi Shoulders

 

This looks great just what i need as i only deliver to the uk and fed ex us the same map system as apc , i was just wondering as i am new to all this and still learning , where in the sql script do i change the prefixes if you could let me know that would be great.

many thanks

 

its been a while since i looked at this, what do you mean prefix's and what do the change?

Share this post


Link to post
Share on other sites

Hey Shoulders just been going through the list of counties/states and spotted that ( only as a customer that we have is from there) inverness is missing which would be scottish highlands are you aware of this

 

hi mate,

 

can you send me an example address that is missing from the list. when i do the next revision i will see about adding it. I need to check it is missing and is not filed under something else.

 

you should be able to add inverness in prestashops admin by hand to fill the gaps

Share this post


Link to post
Share on other sites

Hi

 

Just installed this on clients site Presta 1.4.3 and as it stands no glitches. Still to test via PayPal module so would like to hear from anyone who is using this with PayPal and had any issues/fixes

 

If this work then fantastic amount of time saved, this should be turned into a turn key module!

 

Brilliant Shoulders

 

i would like this added to the core of prestashop as that is one of the biggest failing for prestashop (well for the UK anyhow), although my system is not perfect it will reduce postage costs to shop owners a lot.

 

i would love to be able to turn this into a module so people did not have to run mysql scripts manually.

  • Like 1

Share this post


Link to post
Share on other sites

Hi Shoulders,

 

I've just tried running your SQL script in my phpadmin page and get the following error, obviously i'm doing something wrong!

 

UPDATE ps_country SET active =0 WHERE iso_code != 'GB';

 

MySQL said: b_help.png

#1046 - No database selected

 

I replaced your prefix rdp666 with my prefix ps.

 

Then pasted the contents of "Complete SQL Setup Script for UK Postal Zones.sql" into the sql window and hit go.

 

Any ideas how to get this working for me?

 

Thanks a lot.

 

Paul

Share this post


Link to post
Share on other sites

Hi Shoulders,

 

I've just tried running your SQL script in my phpadmin page and get the following error, obviously i'm doing something wrong!

 

UPDATE ps_country SET active =0 WHERE iso_code != 'GB';

 

MySQL said: b_help.png

#1046 - No database selected

 

I replaced your prefix rdp666 with my prefix ps.

 

Then pasted the contents of "Complete SQL Setup Script for UK Postal Zones.sql" into the sql window and hit go.

 

Any ideas how to get this working for me?

 

Thanks a lot.

 

Paul

 

hi mate,

 

I am pretty sure i know what you are not doing.

 

when you are in phpmyadmin make sure you click on the satabase you are going to work on first, so it shows all the tables etc... then when you have done that select the SQL tab at the top and it should work.

 

Make sure you backup or experiment on a non-live site.

Share this post


Link to post
Share on other sites

  • 1 month later...
  • 1 month later...

Nice job, I'm testing a Prestashop 1.4.8.2 version and this would be very handy if I could get it to work with it, I'm still evaluating Prestashop but everything looks pretty cool. My first post ever so hello :)

Share this post


Link to post
Share on other sites

I renumbered the states and that fixed it. Works a treat on 1.4.8.2 now, many thanks for this :ph34r:

 

Here's the renumbered states

 

-- Insert UK Counties as States (Active)
INSERT INTO ps_state (id_state, id_country, id_zone, name, iso_code, tax_behavior, active) VALUES
(313, 17, 23, 'Aberdeen City ', 'ABE', 0,1),
(314, 17, 23, 'Aberdeenshire ', 'ABD', 0,1),
(315, 17, 23, 'Angus', 'ANS', 0,1),
(316, 17, 27, 'Antrim ', 'ANT', 0,1),
(317, 17, 23, 'Argyll and Bute', 'AGB', 0,1),
(318, 17, 27, 'Armagh ', 'ARM', 0,1),
(319, 17, 20, 'Avon', 'AVN', 0,1),
(320, 17, 23, 'Banffshire', 'BAN', 0,1),
(321, 17, 20, 'Bedfordshire ', 'BDF', 0,1),
(322, 17, 20, 'Berkshire ', 'BRK', 0,1),
(323, 17, 20, 'Blaenau Gwent ', 'BGW', 0,1),
(324, 17, 21, 'Borders', 'SCB', 0,1),
(325, 17, 20, 'Bridgend ', 'BGE', 0,1),
(326, 17, 20, 'Bristol', 'BST', 0,1),
(327, 17, 20, 'Buckinghamshire ', 'BKM', 0,1),
(328, 17, 20, 'Caerphilly ', 'CAY', 0,1),
(329, 17, 20, 'Cambridgeshire ', 'CAM', 0,1),
(330, 17, 20, 'Cardiff', 'CRF', 0,1),
(331, 17, 20, 'Carmarthenshire', 'CMN', 0,1),
(332, 17, 20, 'Ceredigion', 'CGN', 0,1),
(333, 17, 20, 'Cheshire ', 'CHS', 0,1),
(334, 17, 22, 'Clackmannan', 'CLK', 0,1),
(335, 17, 20, 'Cleveland ', 'CLV', 0,1),
(336, 17, 20, 'Conwy', 'CWY', 0,1),
(337, 17, 20, 'Cornwall ', 'CON', 0,1),
(338, 17, 20, 'Cumbria ', 'CMA', 0,1),
(339, 17, 20, 'Denbighshire', 'DEN', 0,1),
(340, 17, 20, 'Derbyshire ', 'DBY', 0,1),
(341, 17, 20, 'Devon ', 'DEV', 0,1),
(342, 17, 20, 'Dorset ', 'DOR', 0,1),
(343, 17, 27, 'Down', 'DOW', 0,1),
(344, 17, 21, 'Dumfries and Galloway', 'DGY', 0,1),
(345, 17, 20, 'Durham', 'DUR', 0,1),
(346, 17, 22, 'East Ayrshire', 'EAY', 0,1),
(347, 17, 22, 'East Dunbartonshire', 'EDU', 0,1),
(348, 17, 22, 'East Lothian', 'ELN', 0,1),
(349, 17, 22, 'East Renfrewshire', 'ERW', 0,1),
(350, 17, 20, 'East Riding of Yorkshire ', 'ERY', 0,1),
(351, 17, 20, 'East Sussex ', 'ESX', 0,1),
(352, 17, 22, 'Edinburgh City', 'EDH', 0,1),
(353, 17, 20, 'Essex', 'ESS', 0,1),
(354, 17, 22, 'Falkirk', 'FAL', 0,1),
(355, 17, 27, 'Fermanagh ', 'FER', 0,1),
(356, 17, 22, 'Fife', 'FIF', 0,1),
(357, 17, 20, 'Flintshire', 'FLN', 0,1),
(358, 17, 22, 'Glasgow (City of)', 'GLG', 0,1),
(359, 17, 20, 'Gloucestershire ', 'GLS', 0,1),
(360, 17, 20, 'Greater Manchester ', 'MAN', 0,1),
(361, 17, 20, 'Gwynedd', 'GWN', 0,1),
(362, 15, 20, 'Hampshire ', 'HAM', 0,1),
(363, 17, 20, 'Herefordshire','HEF', 0,1),
(364, 17, 20, 'Hertfordshire ', 'HRT', 0,1),
(365, 17, 23, 'Highland', 'HLD', 0,1),
(366, 17, 20, 'Humberside ', 'HUM', 0,1),
(367, 17, 23, 'Inverclyde', 'IVC', 0,1),
(368, 17, 20, 'Isle of Anglesey', 'AGY', 0,1),
(369, 17, 28, 'Isle of Wight ', 'IOW', 0,1),
(370, 17, 29, 'Isles of Scilly ', 'IOS', 0,1),
(371, 17, 20, 'Kent', 'KEN', 0,1),
(372, 17, 20, 'Lancashire ', 'LAN', 0,1),
(373, 17, 20, 'Leicestershire', 'LCE', 0,1),
(374, 17, 20, 'Lincolnshire', 'LIN', 0,1),
(375, 17, 20, 'London', 'LND', 0,1),
(376, 17, 27, 'Londonderry ', 'LDY', 0,1),
(377, 17, 20, 'Merseyside', 'MSY', 0,1),
(378, 17, 20, 'Merthyr Tydfil', 'MTY', 0,1),
(379, 17, 20, 'Middlesex', 'MDX', 0,1),
(380, 17, 22, 'Midlothian', 'MLN', 0,1),
(381, 17, 20, 'Monmouthshire', 'MON', 0,1),
(382, 17, 23, 'Moray', 'MRY', 0,1),
(383, 17, 20, 'Neath Port Talbot', 'NTL', 0,1),
(384, 17, 20, 'Newport', 'NWP', 0,1),
(385, 17, 20, 'Norfolk', 'NFK', 0,1),
(386, 17, 22, 'North Ayrshire ', 'NAY', 0,1),
(387, 17, 20, 'North East Linconshire', 'NEL', 0,1),
(388, 17, 22, 'North Lanarkshire ', 'NLK', 0,1),
(389, 17, 20, 'North Yorkshire', 'NYK', 0,1),
(390, 17, 20, 'Northamptonshire', 'NTH', 0,1),
(391, 17, 20, 'Northumberland', 'NBL', 0,1),
(392, 17, 20, 'Nottinghamshire', 'NTT', 0,1),
(393, 17, 11, 'Orkney', 'ORK', 0,1),
(394, 17, 20, 'Oxfordshire', 'OXF', 0,1),
(395, 17, 20, 'Pembrokeshire', 'PEM', 0,1),
(396, 17, 23, 'Perthshire and Kinross ', 'PKN', 0,1),
(397, 17, 20, 'Powys', 'POW', 0,1),
(398, 17, 23, 'Renfrewshire ', 'RFW', 0,1),
(399, 17, 20, 'Rhondda Cynon Taff', 'RCT', 0,1),
(400, 17, 21, 'Roxburghshire ', 'ROX', 0,1),
(401, 17, 20, 'Rutland', 'RUT', 0,1),
(402, 17, 12, 'Shetland', 'ZET', 0,1),
(403, 17, 20, 'Shropshire', 'SHR', 0,1),
(405, 17, 20, 'Somerset', 'SOM', 0,1),
(406, 17, 22, 'South Ayrshire ', 'SAY', 0,1),
(407, 17, 22, 'South Lanarkshire ', 'SLK', 0,1),
(408, 17, 20, 'South Yorkshire', 'SYK', 0,1),
(409, 17, 20, 'Staffordshire', 'STS', 0,1),
(410, 17, 22, 'Stirling', 'STG', 0,1),
(411, 17, 20, 'Suffolk', 'SFK', 0,1),
(412, 17, 20, 'Surrey', 'SRY', 0,1),
(413, 17, 20, 'Swansea', 'SWA', 0,1),
(414, 17, 20, 'The Vale of Glamorgan', 'VGL', 0,1),
(415, 17, 20, 'Torfaen', 'TOF', 0,1),
(416, 17, 20, 'Tyne and Wear ', 'STY', 0,1),
(417, 17, 27, 'Tyrone ', 'TYR', 0,1),
(418, 17, 20, 'Warwickshire ', 'WAR', 0,1),
(419, 17, 22, 'West Dunbartonshire ', 'WDU', 0,1),
(420, 17, 22, 'West Lothian ', 'WLN', 0,1),
(421, 17, 20, 'West Midlands ', 'WMD', 0,1),
(422, 17, 20, 'West Sussex ', 'WSX', 0,1),
(423, 17, 20, 'West Yorkshire ', 'WYK', 0,1),
(424, 17, 24, 'Western Isles', 'WIS', 0,1),
(425, 17, 20, 'Wiltshire ', 'WIL', 0,1),
(426, 17, 20, 'Worcestershire ', 'WOR', 0,1),
(427, 17, 20, 'Wrexham', 'WRX', 0,1);

Share this post


Link to post
Share on other sites

thansk for the update. I am shortly going to relook at my plugin and check things that have been metioned on this thread and update it for 1.5 aswell.

 

User feedback is always welcomed. If anyone know how to get the prestashop team interested into making this part of the core send me a PM.

 

shoulders

Share this post


Link to post
Share on other sites

  • 1 month later...

not yet RST but i am just changing jobs so i will have a lot more time for web development. Most of the research i have done will still be the same. I ideally want to bring this out for 1.5 stable when it is finished as this is the platform i will start using. I will however try and make it 1.4 compatible if i have time.

Share this post


Link to post
Share on other sites

Hi, I just wanted to say thank you to shoulders and opensourced. I looks like it works with Prestashop 1.4.6.2. I only had to change the prefix to ps_ and it went smoothly :) A big time saver for sure.

Share this post


Link to post
Share on other sites

  • 4 weeks later...

When you say change the language thing in the read me file to change it from state to county, how do you mean? could you explain how i change this please, thanks

 

i cannot remember at this stage. i am really waiting for ps1.5 to come out before i get back in the game. this project is not dead, it is just i am not going to revisit this pack until then.

Share this post


Link to post
Share on other sites

When you say change the language thing in the read me file to change it from state to county, how do you mean? could you explain how i change this please, thanks

 

I think Shoulders ment that, as 'state' has no sense for an UK citizen but his method is using the states feature of Prestashop, you should change all the references to the 'state' word (form labels/errors/etc) saying 'county' if you like to take care of all the details.

 

 

PS. Great to see you want to keep the thing updated for PS1.5 Shoulders! :)

Share this post


Link to post
Share on other sites

you could probably use this one for 1.5, but, i cannot be certain yet and i need to check all the counties and other stuff as there have been a few suggestions. Also i have not programmed for a while so i am very rusty.

 

there will be no development of this by me until 1.5 full release comes out. But i need it for myself so it will get done.

 

keep an eye on this thread.

  • Like 1

Share this post


Link to post
Share on other sites

you could probably use this one for 1.5, but, i cannot be certain yet and i need to check all the counties and other stuff as there have been a few suggestions. Also i have not programmed for a while so i am very rusty.

 

there will be no development of this by me until 1.5 full release comes out. But i need it for myself so it will get done.

 

keep an eye on this thread.

Great, Can't wait!

 

Thanks Shoulders :)

Share this post


Link to post
Share on other sites

  • 1 month later...

hi there

 

I'm running 1.4.8.3

 

I just tried running this script but I get this error message in phpmyadmin - anyone know what it means?

 

#1062 - Duplicate entry '300' for key 'PRIMARY'

 

 

Never mind, I run the updated script someone posted above and that was accepted OK.

Edited by alwaysperplexed (see edit history)

Share this post


Link to post
Share on other sites

  • 4 months later...

i am now finishing writing my first couple of modules, including a blank skeleton module for PS1.5+ hopefully using all the current standards. once that is done i will look at updating this psotal pack and making it into a proper module. I will still leave all the research and documents in.

 

I will read all the comments that have been left and see where improvements need to be made.

 

thanks

 

shoulders

Share this post


Link to post
Share on other sites

I thought i would just share this with you guys. I am currently in the process of writing a full module that allows you to set postal zones by postcode. Not a range, but a list of postcode (including partial). This is aimed at us lot in the UK but might work for other countries. It will be for PS1.5+ only, if it works on PS1.4 great.

 

during the checkout process the postcode is checked against a list you will set in the admin and if it there, the module will force the checkout to use a specified zone. I will set up to 10 of these rules in the admin.

 

so you could setup zone1 - zone7 , paste in all the postcodes that your courier gaves you, set the zones as normal and you will then have carrier selection by postcode.

 

This is the quick version, but either way it will be very easy, no core code to alter (i am hoping),

Edited by shoulders (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

That sounds great Shoulders!

Would be good if you could provide the module with something like a 'default postcode list' that people could use as an starting point. Here is a link to the one my logistic company gave to me, hope it can help!

 

http://s18.postimage...Areas_20525.jpg

 

no need, you can just copy and paste them in yourself. The module in configurable from the PS backend like normal. No weiredness needed.

 

The only thing is, it does not work off ranges so you would have to type the in like:

 

AB31,AB32,AB33 etc..

 

the best thing is this module complements the main zone system in PS, i will maybe need to write some instructions out but they will not be complicated.

Edited by shoulders (see edit history)

Share this post


Link to post
Share on other sites

read the thread. it is on the very first post.

 

zones by postcode is not in there yet if that is what you are looking for. It is working very well but needs tidying up and testing. I also have to decide how i am going to release it. Free/Paid/Donation.

Share this post


Link to post
Share on other sites

well i thought this might be as bit more popular. here is a brief feature list:

  • this is a fully installable module, no core alterations required (not 100% yet)
  • all fields have syntax checkers
  • 10 postcode rules
  • default rule for all those postcodes that dont match
  • you can specify a single country the postcodes rules work on (might add mulitple, ie isle of white, england/scotland/wales)
  • complements the PS sytem so will fall back to that if no rules set or they do not match
  • all rules can be turned on and off in the module

post-16140-0-51730700-1361319335_thumb.jpg

Edited by shoulders (see edit history)

Share this post


Link to post
Share on other sites

Hello!!

 

First of all, congrats for your work, I always appreciate people who delivers to the community good apps and tools!!

 

In my case it's a pitty I can't use your work, as I want to send internationally. So I have to input the data manually...

Please, could you tell me if this list is correct?

 

http://en.wikipedia.org/wiki/ISO_3166-2:GB

 

Or perhaps should I use the data inside the script?

 

Thank you very much and best regards!!

Share this post


Link to post
Share on other sites

the module has been tested and is about to go live on a shop somewhere in the UK, lol.

 

So

  • once it has had a bit more testing i will release it.
  • I do need to sort the license thing out. this will take longer than writing the module
  • an error message occurs when uninstalling. but it does seem to uninstall correctely (i think i called the parent::uninstall to many times

Share this post


Link to post
Share on other sites

  • 3 weeks later...

I have been looking for this for aaaages! Shoulders, you're awesome. Much love to you for doing this, I can't wait!

 

I for one would be glad to pay for this module. Easily worth it considering the money I sometimes lose shipping pallets to Scotland.

Share this post


Link to post
Share on other sites

Been following this topic for a while now, and have recently added this to our shop.. I don't have major knowledge when it comes to all this tho..

 

One thing I have just noticed is as I was testing selling an item, I logged in to my account, went to the address page (both my billing and delivery addresses are the same) then clicked next and it comes up with an error saying "There are no carriers that deliver to the address you selected."

 

Anyone else had this? Do I need to delete my addresses and redo them?

 

EDIT: just took my own advice and went an checked my address and STATE wasn't selected, changed that and it seems to work fine now.

 

Edited by terryfay1983 (see edit history)

Share this post


Link to post
Share on other sites

This looks great, will it be available for 1.5.4?

I have a test install of 1.5.4 and i get an error when i try and import the sql.

 

 

-- Insert UK Counties as States (Active) INSERT INTO prstshp_state (id_state, id_country, id_zone, name, iso_code, tax_behavior, active) VALUES (300, 17, 23, 'Aberdeen City ', 'ABE', 0,1), (301, 17, 23, 'Aberdeenshire ', 'ABD', 0,1), (302, 17, 23, 'Angus', 'ANS', 0,1), (303, 17, 27, 'Antrim ', 'ANT', 0,1), (304, 17, 23, 'Argyll and Bute', 'AGB', 0,1), (305, 17, 27, 'Armagh ', 'ARM', 0,1), (306, 17, 20, 'Avon', 'AVN', 0,1), (307, 17, 23, 'Banffshire', 'BAN', 0,1), (308, 17, 20, 'Bedfordshire ', 'BDF', 0,1), (309, 17, 20, 'Berkshire ', 'BRK', 0,1), (310, 17, 20, 'Blaenau Gwent ', 'BGW', 0,1), (311, 17, 21, 'Borders', 'SCB', 0,1), (312, 17, 20, 'Bridgend ', 'BGE', 0,1), (313, 17, 20, 'Bristol', 'BST', 0,1), (314, 17, 20, 'Buckinghamshire ', 'BKM', 0,1), (315, 17, 20, 'Caerphilly ', 'CAY', 0,1), (316, 17, 20, 'Cambridgeshire ', 'CAM', 0,1), (317, 17, 20, 'Cardiff', '[...]

MySQL said: dot.gif

#1062 - Duplicate entry '300' for key 'PRIMARY'

Share this post


Link to post
Share on other sites

  • 2 weeks later...
  • 2 weeks later...