Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / list of shipping IDs?

list of shipping IDs?

Locked

Views: 638

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
10 Apr 2010, 6:39 PM
#1
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

list of shipping IDs?

Hi -

I'm modifying a bit of code, and need to know the text used as the shipping IDs for UPS shipments. By way of example, I'm using the following test:

if 	($_SESSION['shipping']['id'] != 'usps_EXPRESS'
	 && $_SESSION['shipping']['id'] != 'usps_PARCEL'
	 && strpos($_SESSION['shipping']['id'], 'ups') != 0
	 && !IS_ADMIN_FLAG)
{

The USPS examples worked perfectly, but when I added the line for UPS, the test failed when UPS shipping was selected. My conclusion is that the UPS strings are something other than what I expected them to be.

I don't know how to look these up; can someone tell me what the correct strings are?

Thanks.

11 Apr 2010, 1:59 AM
#2
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: list of shipping IDs?

Update: while I didn't get those IDs (which would be nice to have), I discovered my problem. Evidently, the PHP strpos function returns an offset that begins at 1, not 0. My old "C" programming habits bit me on this one.

11 Apr 2010, 3:21 AM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: list of shipping IDs?

Thanks for the update on what you needed to fix this ...

Keep in mind, you can echo the $type just before the $method is being built ...

11 Apr 2010, 3:24 AM
#4
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: list of shipping IDs?

Ajeh:

Keep in mind, you can echo the $type just before the $method is being built ...

I realize I should know what this means, but...I don't . Types and methods were introduced into programming sometime in the Quaternary Period, or after I stopped programming for a living.

11 Apr 2010, 3:34 AM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: list of shipping IDs?

I am referring to the variables in the code for:
/includes/modules/shipping

you can search on:
$type
$method

and you will see where the $method is built to have the $type and $title and $cost built ...

Right above the $method you could echo the $type or what have you to see what the specific value is ...