close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Converting ColdFusion CFIF to PHP IF statement

Thread began 3/13/2009 10:10 am by grantr281040 | Last modified 4/02/2009 1:31 pm by grantr281040 | 15693 views | 26 replies

grantr281040

Man I just can't seem to make it work so I just started over as not to confuse myself with the coldfusion elements.

So what I have is this...

Congratulations!!! Your Volume Discount <strong>Savings</strong> is... </span></span> <span class="style91">$</span><?php echo $GCcart->DisplayInfo("TotalDiscount"); ?><br />
</p>
<p><span class="style52 style64 style58"><strong><span class="style78">BUY MORE and SAVE</span><br />
<span class="style75"><span class="style76 style54">Increase your Quantity Now to 50 Cards and Pay Only</span> <span class="style91">$1.38 each </span><span class="style76 style54">!</span><br />
<span class="style76 style54">or get 100 Cards for Only</span> </span><span class="style91">$1.17 each </span><span class="style54 style76"><em>!</em></span></strong><br />
<span class="style33 style114">Discounts apply to same card purchases only. </span><br />
<span class="style81">(Change quantity and click on the &quot;Update Cart&quot; button)</span></span>


What I want it to say is....

IF TotalDiscount is > 0

Then....

Congratulations!!! Your Volume Discount <strong>Savings</strong> is... </span></span> <span class="style91">$</span><?php echo $GCcart->DisplayInfo("TotalDiscount"); ?><br />



If TotalDiscount is == 0

Then.....

<p><span class="style52 style64 style58"><strong><span class="style78">BUY MORE and SAVE</span><br />
<span class="style75"><span class="style76 style54">Increase your Quantity Now to 50 Cards and Pay Only</span> <span class="style91">$1.38 each </span><span class="style76 style54">!</span><br />
<span class="style76 style54">or get 100 Cards for Only</span> </span><span class="style91">$1.17 each </span><span class="style54 style76"><em>!</em></span></strong><br />
<span class="style33 style114">Discounts apply to same card purchases only. </span><br />
<span class="style81">(Change quantity and click on the &quot;Update Cart&quot; button)</span></span>


Sorry for all the rookie questions but I just haven't gotten my head around this PHP yet.

Thanks,

Grant

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...