close ad
Databridge V2 with MySQLi support IS Now Available!
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 | 13396 views | 26 replies

grantr281040

I had the word OR in there to begin with and it didn't seem to work then either. I'll keep working on it and see if I can get it worked out

I really appreciate your help.

In my initial problem I placed in the code and changed the cart name and it seemed to be happy but I am still having a problem with it. As I remember I had this problem when I first made it in CFM and somehow worked it out (Likely with your help)

The TotalDiscount that it is calculating for the "Congratulations!!! Your Volume Discount Savings is..$..." is only being calculated for the first item in the cart. I need it to be the total of all items in the cart.

On my PHP page it looks like this....

<?php
if ($GCcart->TotalColumn("TotalDiscount") > 0) {
?> <span class="style1 style1 style88"><em><strong>Congratulations!!! Your Volume Discount Savings</strong></em><strong></strong><em><strong> is..<span class="style124"></strong></em></span><span class="style133"> <?php echo WA_eCart_DisplayMoney($GCcart, $GCcart->DisplayInfo("TotalDiscount")); ?></span> <span class="style124">
<?php
} else {?> </span><span class="style52 style64 style58"><strong><span class="style78"><br />
<span class="style129">BUY MORE & SAVE!</span></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="style126"><br />
Discounts apply to same card purchases only. </span><span class="style125"><br />
<span class="style127">(Change quantity and click on the &quot;Update Cart&quot; button)</span></span></span>
<span class="style125">
<?php
}
?>
</span>




On my Old but working ColdFusion page it looks like this...

<cfif WA_eCart_TotalColumn(CardCart, "TotalDiscount") GT 0>
<br />
<span class="style75 style64"><span class="style54 style76">Congratulations!!! Your Volume Discount <strong>Savings</strong> is... </span></span> <span class="style91">$<cfoutput>#LSCurrencyFormat(WA_eCart_TotalColumn(CardCart, "TotalDiscount"),'none')#</cfoutput>
</span>
<p>
<cfelse>
</p>
<p 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 />
Discounts apply to same card purchases only. <br />
<span class="style81">(Change quantity and click on the &quot;Update Cart&quot; button)</span></p>
</cfif>

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...