Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Postage Options in checkout process


Guest

Recommended Posts

Hiya,

 

I've been messing about with the postage options for my customers, relevant to destination country and shopping cart weight at the point of checking out.

 

I've managed to get it all working apart from one bit which is causing me a problem.

 

If a customer wants shipping to a UK address, none of the international options appear. ie

 

global $order, $total_weight;

if ($order->delivery['country']['iso_code_2'] == 'GB') {

$this->enabled = false;}

 

Appears in the class constructor of the international shipping modules, and it stops them being displayed when GB is the destination country code.

 

However, when I put this in the same place in the UK shipping modules:

 

global $order, $total_weight;

if ($order->delivery['country']['iso_code_2'] == 'AF,AL,DZ,AS,AD,AO,AI,AQ,AG,AR,AM,AW,AU,

AT,AZ,BS,BH,BD,BB,BY,BE,BZ,BJ,BM,BT,BO,BA,BW,BV,BR,IO,BN,BG,BF,BI,KH,CM,CA,CV,KY

,CF,TD,CL,

CN,CX,CC,CO,KM,CG,CK,CR,CI,HR,CU,CY,CZ,DK,DJ,DM,DO,TP,EC,EG,SV,GQ,ER,EE,ET,FK,FO

,FJ,FI,FR,

FX,GF,PF,TF,GA,GM,GE,DE,GH,GI,GR,GL,GD,GP,GU,GT,GN,GW,GY,HT,HM,HN,HK,HU,IS,IN,ID

,IR,IQ,IE,IL,

IT,JM,JP,JO,KZ,KE,KI,KP,KR,KW,KG,LA,LV,LB,LS,LR,LY,LI,LT,LU,MO,MK,MG,MW,MY,MV,ML

,MT,MH,MQ,MR,

MU,YT,MX,FM,MD,MC,MN,MS,MA,MZ,MM,NA,NR,NP,NL,AN,NC,NZ,NI,NE,NG,NU,NF,MP,NO,OM,PK

,PW,PA,

PG,PY,PE,PH,PN,PL,PT,PR,QA,RE,RO,RU,RW,KN,LC,VC,WS,SM,ST,SA,SN,SC,SL,SG,SK,SI,SB

,SO,ZA,GS,

ES,LK,SH,PM,SD,SR,SJ,SZ,SE,CH,SY,TW,TJ,TZ,TH,TG,TK,TO,TT,TN,TR,TM,TC,TV,UG,UA,AE

,US,UM,UY,

UZ,VU,VA,VE,VN,VG,VI,WF,EH,YE,YU,ZR,ZM,ZW') {

$this->enabled = false;}

 

It doesn't seem to want to work, and the UK options still appear, although they do display the "not available"

tags.

 

Is there an easier way to to this? I was hoping the code has a thingy for:

 

 

global $order, $total_weight;

if ($order->delivery['country']['iso_code_2'] is not equal to 'GB') {

$this->enabled = false;}

 

If someone can give me a heads up on what I should be looking for!

 

Cheers all!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...