Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

UK shipping module needed for 2.3.4 BS and works on PHP7


Enzo_UK

Recommended Posts

Until now I have been using a bit of a self customised version of an older UK Postcode based shipping module, cant remember the name exactly but was ukpostarea.php and think it had been modified along the way by someone else to work with TNT zones.

I have just changed to the newer 2.3.4 BS, and my host is now forcing a change to PHP7 at the end of the month, and I cant get my existing setup to work, as soon as the customer gets passed onto the checkout_shipping.php page it throws a 500 error.

Have ran the files for the shipping module through a validator, and all comes out okay... so don't know what else to do.

I have had a look through the contributions and cant find anything else newer that will do what I want, and wondered if anyone else knew of one that would meet my needs.

I basically need something that takes a UK postcode, splits it in half, checks the first half against a zone number stored in the DB... and then gives a delivery charge according to the zone.

I am tearing my hair out trying to get it working, my host has let me stay on PHP5.6 for now, and my existing set up works... but have until the end of September before they force a switch to PHP7.  I am currently switching back and forth between 5.6 and 7 using the .htaccess file whilst I try stuff out, but it is a live site, so is a real nightmare.

Or if anyone has any ideas or suggestions of where I should start looking for my problem in my existing shipping module, that would also be greatly appreciated.

 

Link to comment
Share on other sites

Make a localhost version of your site, using something such as xampp, uniform server or similar such software.  This will save you a lot of hassle.

I know there is at least one up-to-date UK postcode module that is close to your needs and could be changed appropriately to better reflect your exact needs.  If you cannot find it, another option is to get something coded; https://www.oscommerce.com/forums/forum/79-commercial-support-inquiries/

 

Off the peg and suited to your exact needs ... probably does not exist.

 

Link to comment
Share on other sites

It's something I released a while back, it is not in the addons area as I don't do freebie addons.  
And I can't even find it on my own blog.

If I can find the code, I'll update.
If someone can point you to something else in the meantime, that would be cool.

Link to comment
Share on other sites

Hey @burt I remember when you were working on that, so in an effort to keep my memory sharp, I found the thread where you talked about.  I don't think you have a link to it but maybe the timeline will help you out.  I think this is the same time.

 

I'm not really a dog.

Link to comment
Share on other sites

13 hours ago, John W said:

Hey @burt I remember when you were working on that, so in an effort to keep my memory sharp, I found the thread where you talked about.  I don't think you have a link to it but maybe the timeline will help you out.  I think this is the same time.

Yeah, that would be a part of it - to get the first part of the postcode.  Thanks for finding that, had forgotten about it.
On top would need an admin area (for linking postcodes and prices) and a shipping module for lookup of X postcode to Y price.

Link to comment
Share on other sites

Hi,

@enzo_uk

I'm Using 2.3.4 BS gold, with php5.6.  The postcode is formatted using a script, after the form is submitted, and formats to fit all UK definitions.  Once in the DB then the postcode can be split.

I use a modified version of ukpostarea.php for local delivery and click & collect, so will have to check against php7 when time permits.

the server 500 maybe a permissions problem!

the addon you refer to is:

https://apps.oscommerce.com/9urFk

Mike

 

osC CE live - developing osC Phoenix adding modules with no core changes(awesome and easy!)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...