Jump to content
yahalimu

Advice needed on shipping module

Recommended Posts

Hi,

For years now I have used zone rates shipping. It is useful because for example shipping to the the highlands, Isle of Wight & Scottish offshore islands is much more expensive than mainland UK with most of our couriers..

I had to create a new country and country code for the areas so it would work with zone rate shipping module. Has worked fine for years.

My issue is with the new SCA payment regime I'm implementing, the ISO-2 country code sent to the payment gateway MUST be accurate, so my made up code for the offshore islands will now create an error with them and payments may be refused..

Other than hard coding, to convert the made up ISO codes to 'GB' in the payment module, is there another shipping module that would work, for example a post code system for UK orders that would still leave the country code as GB.

Or am I doing it all wrong?? :)

 

Share this post


Link to post
Share on other sites

@yahalimu
We are in the same position as you - haven't a clue what the 'right' way to do this is and never found a definitive answer on the forum.
We have UK as one Country - we have all the counties as Zones of UK - we have Tax Zones made for each region e.g. Northern Ireland is one of them - insert the appropriate counties in the appropriate Tax Zones e.g. County Antrim as Zone in Northern Ireland Tax Zone - note that County Antrim will still show as a zone of UK. we then cloned the Table Rate shipping module, one for each Tax Zone  -Table Rate Shipping gives option to set Shipping Zone which will show the Tax Zones created to choose from whereas Zone  Rate only allows to set Country (confused yet? I know I am!).
Don't know what implication this has on the SCA thing - I can only hope this might help or prompt somebody who actually knows what they are doing to step up to correct.
Best of luck to you in any case.

Share this post


Link to post
Share on other sites

I had a similar problem but it was on a very small scale. I send very few items by courier and then very few are heavy items, just over the 2kg limit of a small parcel with Royal mail so courier costs are not that high.

I decided to keep things simple and just added a small percentage onto the cost of all courier deliveries to cover the additional costs to the far flung corners of the UK. I then push no additional charges for these far flung places.

A bit of a cheat and not what you wanted, but it gets around a problem and looks good to those in the funny places in the UK that couriers dont like.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

That's interesting Heather.

When you say

9 hours ago, Heatherbell said:

we then cloned the Table Rate shipping module, one for each Tax Zone

How do you mean?

I've just installed table rate and I can see where you can set shipping zones but as far as I can see it only allows one zone/instance so its so far, a lot less useful than zone rates.

Did you change the module name/ID name and install a few different named but identical shipping modules?

 

Edited by yahalimu

Share this post


Link to post
Share on other sites
9 hours ago, Heatherbell said:

we then cloned the Table Rate shipping module, one for each Tax Zone

Cloning a module means copying and renaming to make another

 

1 minute ago, yahalimu said:

Did you change the module name/ID name and install a few different but identical shipping modules?

Yes

Share this post


Link to post
Share on other sites

Clever.

Yes I know what cloning means, just needed confirmation.

It is certainly one solution. Have to change database references also I suppose, will check the modules install code.

Good bit of lateral thinking though, I will have to balance the choice of payment module code additions verses shipping module changes.

It would be handy though, for example Greek islands and some parts of the Alps in France & Spain attract a delivery surcharge with many couriers.

The Royal Mail has a flat rate wherever it is in the UK, not so FedEx etc.

Definably a need for a more flexible shipping module.

 

Thanks Heather

Share this post


Link to post
Share on other sites

Clever? Me? Haven't a clue like I said. Only hoped it might help. Trying to figure out the shipping module thing together with carrier charges is a 'mare. Probably worth paying one of the developers here to make a shipping module so at least you know it works - it's a balance of the cost of their time versus yours. Best of luck in any case. :)

Share this post


Link to post
Share on other sites

Modesty doesn't apply. To think of a novel way around the problem deserves some credit.

The SCA was supposed to be mandatory in EU as of tomorrow (14th Sept) but it has been extended another 2 weeks.

Lots of time, I think in my instance I will adjust the payment code to change the ISO-2 code, seems easier.

Oh for a post code based shipping module..

Tnx agn.

 

Share this post


Link to post
Share on other sites

OK I got the new Realex/Global Payments SCA HPP payment working. (see attachment)

The new code provided by global payments is faulty DO NOT USE.

One of them has not been changed/upgraded for 9 years and the other one was missing the final ?> and also an } symbol.

Both just typos but would break the server.

I also updated the final call URL call which has changed.

I left mine using MD5 not SHA1 for ease of commissioning.

Post Code extraction software added to make AVS work.

Some extra country ISO code conversions back to GB to handle my site using different county codes for zone rate shipping. These also had to be corrected for the HPP additional fields, so extra table entries added.

 

 

realex.php

Share this post


Link to post
Share on other sites

I need to install Global payments. I've downloaded the last version, but I see that i could have some problems and Yahamilu member say that he has modified the realex.php file. I'm from Spain. What I have to do then? Install this file instead of the addon of this page? https://apps.oscommerce.com/eU9NA4

I'd be grateful if someone could help me.

Regards

Share this post


Link to post
Share on other sites

Hi Fatima.

I have it working fine on 2.3.4 but not yet tested on Phoenix but I dont see why it wont.

The realex file provided by Global Payments is full of errors and incomplete.

If you can wait til I get back home later today  I will send you the working package and instructions..

iain

 

 

Share this post


Link to post
Share on other sites

Hi Fatima.

Find files attached.

You need to:

1) change english language file to spanish.

2) possible remove extra UK zones (YA,YB etc) I added unless you want to use them for spanish islands etc. (I used them for scotland, scottish highlands, islands etc all which have different shipping costs yet still UK. (Global Payments needs correct ISO country code sent)

3) change/delete postcode number extraction code. Global Payments needs numbers from the post code to validate.

May need changing slightly but at least the code is correct, unlike the previous code.

Good luck..

realex.zip

Share this post


Link to post
Share on other sites

If you have issues, let me know, I have spent many hours talking to Global Payments, they are not always very helpful when it comes to 3rd party software. I recommend getting their protocol/field list document, 98% rubbish but field definitions very useful.

Edited by yahalimu

Share this post


Link to post
Share on other sites

Thank you very much for your help yahalimu. When yo say that I have to delete poscode number you mean all the code from //  extract numbers from address to  /*md5 crypt*/ or only the "if ($JF_BILLINNG_CO". Excuse me but my knowledge of coding is basic.

Share this post


Link to post
Share on other sites

Try this includes/modules/payment/realex.php file.

I've removed the UK AVS postcode number extraction. (If you want AVS you will have to find some code to extract numbers, Global Payments will give more info if you need to use AVS) and also any references to UK extra zones.

realex.php

Share this post


Link to post
Share on other sites

Hi Yahamilu,

Thank you for your help. I've tried the module but I have a problem with the access to the page of global payments. This is the message:

"508

Invalid characters in the field PROD_ID"

I don't understand why

Share this post


Link to post
Share on other sites

Hello,

If you ring Global Payments tech support they will tell you what the invalid character is.

It should just be your store name in there but they will tell you if you give them your merchant number.

What version of OSCommerce are you using? STORE_NAME should be defined.

Share this post


Link to post
Share on other sites

I have the oscommerce 2.3.4. I've still contact via email with global payments I'm waiting for the response. May be that my store name has an accent.

Share this post


Link to post
Share on other sites

I think that is correct, accents are not allowed.

I will PM you their tech support telephone number, they take ages to do emails sometimes.

Share this post


Link to post
Share on other sites

First of all I have to tell you that the error was due to the accent of my sore name. But now I have an error to access to the page because I'm in a test way.  I managed to contact , but with a telephone number, in Spain, the bank has told me. The case is that here in Spain global payments is associated with the bank "Caixabank". They have told me that the module has to be a sandbox in order to try it. My question is how do you test it? because the module doesn't have any kind of sandbox.

Share this post


Link to post
Share on other sites

Hello,

They should be able to supply you with documentation about sand box. See below..

HPP has two separate URLs for Sandbox and Production. When you first create an account with Global Payments, your account will be set to sandbox mode. We recommend that you process several transactions in this mode to confirm you are happy with how they are processing before setting your account live.

 

<!-- URL for Production transactions -->
https://pay.realexpayments.com/pay
<!-- URL for Sandbox transactions -->
https://pay.sandbox.realexpayments.com/pay

I suggest you change to URL in the realex.php file to https://pay.sandbox.realexpayments.com/pay and see that it works. (Line 27 & 29, two URL's because they used to have a separate URL for mobile which they do not any more)

When all OK they will then make your account 'Live' when you ask and you then change the URL back again.

 

You could replace:

      if ( defined('MOBILE_SESSION') || (tep_session_is_registered('mobilesession') && !tep_session_is_registered('MredirectCancelled')) ) {
          $this->form_action_url = 'https://pay.realexpayments.com/pay';
      } else {
          $this->form_action_url = 'https://pay.realexpayments.com/pay';
      }

 

with:

$this->form_action_url = 'https://pay.realexpayments.com/pay';  OR    $this->form_action_url = 'https://pay.sandbox.realexpayments.com/pay';  for the sandbox URL

 

 

Share this post


Link to post
Share on other sites

look at this. should be exactly what you need. is German but you can translate that.

https://apps.oscommerce.com/Apfpj&inselzuschlag

Share this post


Link to post
Share on other sites

Hi Yahamilu,

Thank you very much for your help. I've tried changing the code as you told me, but I'm still having an error:

508

missing required field SHA1HASH

Share this post


Link to post
Share on other sites

You need to tell them you are using  MD5 not SHA.

In UK at least you can use either so I kept mine as MD5.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×