Forums / Built-in Shipping and Payment Modules / need help about restrict shipping method by $cartShowTotal

need help about restrict shipping method by $cartShowTotal

Locked

Views: 1,194

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
6 Jan 2009, 3:39 AM
#1
auick avatar

auick

New Zenner

Join Date:
Jan 2009
Posts:
8
Plugin Contributions:
0

need help about restrict shipping method by $cartShowTotal

hello all, i need help on how to set up different shipping method base on shopping-cart sub-total.

For example, i like ship by USPS if the sub-total value is less than Us$100, if the sub-total is higher than US$100, it will show one message say you will need to select UPS method.

When i try

if ($cartShowTotal>100) {
$error = true;
}

nothing happen, it seems $cartShowTotal can not be regonized.

Really appreciate for your concern. thanks.

6 Jan 2009, 4:52 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: need help about restrict shipping method by $cartShowTotal

That isn't a variable in Zen Cart except on the shopping__cart page so its value is 0 in the checkout_shipping ... :eek:

Wouldn't it be better to customize the shipping modules themselves to only display based on price rather than have the customer have to think?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

7 Jan 2009, 3:31 AM
#3
auick avatar

auick

New Zenner

Join Date:
Jan 2009
Posts:
8
Plugin Contributions:
0

Re: need help about restrict shipping method by $cartShowTotal

Thanks Ajeh for your tips and advice, it is really better and easier.

What i though is shipping method shown bases on shopping cart price, if higher, then unselectable and only show one message.

After two days trace, $_SESSION['cart']->show_total() looks like the one what i am looking for.:smile: