| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Need If statement help! | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Need If statement help!
Hello,
I have a function for displaying a message if certain shipping criteria are met. 1. shipping address isn't blank 2. they have put PO box in their ship to 3. they haven't already selected Parcel Post {if $po_address ne "" and $cart.shippingid ne "51"} this works fine. Now I have a new method of shipping that I have to test for called Mail Innovations. So this is what it needs to test for 1. shipping address isn't blank 2. they have put PO box in their ship to 3. they haven't already selected Parcel Post or Mail Innovations - if they have no need to show warning. I have tried several ways to test for it but they don't seem to be working {$userinfo.s_address} {if $po_address ne "" and ($cart.shippingid ne "122" or $cart.shippingid ne "51")} Can someone tell me what I am doing wrong? Thanks, Randal
__________________
*********************** Visit Our Other Web Sites! ∙ Nutritional Herbs and Supplements <a href="http://www.theherbsplace.com"> The Herbs Place </a> ∙ Frugal Ideas and a Forum To Submit Your Questions <a href="http://www.thefrugallife.com"> The Frugal Life </a> ∙ Healthy and Natural Pet Products <a href="http://www.healthypetcorner.com"> Healthy Pet Corner </a> *********************** Joined 08/02/05 X-Cart Gold Version 4.3.2 Linux RedHat Enterprise |
|||||||
#2
|
|||||||
|
|||||||
Re: Need If statement help!
Try changing your boolean constructs - your current method of using an "or" conjunction to test for "not equals" condition will not give you desired results.
Change: Code:
Code:
|
|||||||
|
#3
|
|||||||
|
|||||||
Re: Need If statement help!
Thanks that was a big help.
__________________
*********************** Visit Our Other Web Sites! ∙ Nutritional Herbs and Supplements <a href="http://www.theherbsplace.com"> The Herbs Place </a> ∙ Frugal Ideas and a Forum To Submit Your Questions <a href="http://www.thefrugallife.com"> The Frugal Life </a> ∙ Healthy and Natural Pet Products <a href="http://www.healthypetcorner.com"> Healthy Pet Corner </a> *********************** Joined 08/02/05 X-Cart Gold Version 4.3.2 Linux RedHat Enterprise |
|||||||
|
|||
X-Cart forums © 2001-2020
|