Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Adding extra amount to flat shipping base on pincode

Adding extra amount to flat shipping base on pincode

Views: 1,229

Results 1 to 6 of 6
11 Feb 2011, 10:55 AM
#1
srivats avatar

srivats

New Zenner

Join Date:
Jun 2010
Posts:
16
Plugin Contributions:
0

Adding extra amount to flat shipping base on pincode

I want to add extra amount to flat rate shipping based on buyer's pincode.I stored extra amount in session.But when i tried to add that amount in flat.php,its not working.```php
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_FLAT_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_FLAT_TEXT_WAY,
'cost' => MODULE_SHIPPING_FLAT_COST +$_SESSION['postage_fee'] )));

12 Feb 2011, 6:02 AM
#2
srivats avatar

srivats

New Zenner

Join Date:
Jun 2010
Posts:
16
Plugin Contributions:
0

Re: Adding extra amount to flat shipping base on pincode

Any ideas??

12 Feb 2011, 2:11 PM
#3
ajeh avatar

ajeh

Oba-san

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

Re: Adding extra amount to flat shipping base on pincode

If you add above that code:

echo 'Postage Fee: ' . $_SESSION['postage_fee'] . '<br>';

what value do you see?

Are you sure that the:
$_SESSION['postage_fee']

is being set properly? Is it a number, like 1.25 or characters like $1.25 ... :unsure:

14 Feb 2011, 5:10 AM
#4
srivats avatar

srivats

New Zenner

Join Date:
Jun 2010
Posts:
16
Plugin Contributions:
0

Re: Adding extra amount to flat shipping base on pincode

It has $ sign with number.

14 Feb 2011, 1:54 PM
#5
ajeh avatar

ajeh

Oba-san

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

Re: Adding extra amount to flat shipping base on pincode

The number sign makes it characters or a word and a word is worth $0.00 ...

Change it to a number only with not characters or commas etc.

15 Feb 2011, 5:01 AM
#6
srivats avatar

srivats

New Zenner

Join Date:
Jun 2010
Posts:
16
Plugin Contributions:
0

Re: Adding extra amount to flat shipping base on pincode

Thanks fixed :smile::smile: