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

rating

Discount Rate Not Showing Properly

Thread began 5/22/2012 10:33 am by Magega49 | Last modified 5/22/2012 1:09 pm by Magega49 | 638 views | 9 replies |

Magega49

Discount Rate Not Showing Properly

Hello,

Can you please help me on how to correct my discount cart I have create..

My discount is showing at all the time in my shopping cart it is suppose to show only when discount is applied.

Here you can see an example, ecart_shopping_cart.php

Sign in to reply to this post

Jason ByrnesWebAssist

I'm assuming that you mean the line that shows the discount amount:

Discounts Free Domain Registration ( Starter Package )... -$0.00


is always showing?


for this you would add an if statement:

php:
<?php if ($yourCart->GetDiscounts() > 0) { ?>
Discounts  Free Domain Registration ( Starter Package )...         -$0.00
<?php ?>



where yourCart is the name of your eCart object.

Sign in to reply to this post

Magega49

Discount

Yess, you got it man, but now I dont know where to place those code you just sent me... After I place than my page look broken?

Sign in to reply to this post

Magega49

Error

Jason this is the error Im getting...

Fatal error: Call to a member function GetDiscounts() on a non-object in /home/magega49/public_html/ecart_shopping_cart.php on line 236

Sign in to reply to this post

Jason ByrnesWebAssist

did you change "$yourCart" to use the name of your cart object?


I'll need a copy of the ecart_shopping_cart.php page to see the code.

Sign in to reply to this post

Magega49

Name

O yes I just saw that.. I change the ecart_host name and is working fine... Thanks...

But there is one more thing that is not showing 100% the amount is not showing but the total amount has been applied a discount rate... please look at it..

ecart_shopping_cart.php

Sign in to reply to this post

Jason ByrnesWebAssist

i dont follow. how is a discount supposed to apply?

I will still need a copy of the ecart_shopping_cart.php page to look at the code.

Sign in to reply to this post

Magega49

Page codes

Here is a copy of my page...

Attached Files
ecart_shopping_cart.zip
Sign in to reply to this post

Jason ByrnesWebAssist

change this code:

php:
<?php if ($Hosting_Services->GetDiscounts() > 0) { ?>

<span class="Gree_18Pts">Discounts  Free Domain Registration </span> <span class="Green_16_pts">-<?php echo WA_eCart_DisplayMoney($Hosting_Services$Hosting_Services->RuleLooperValue("Discounts")); ?></span><?php ?>




to:

php:
<?php if ($Hosting_Services->GetDiscounts() > 0) { ?>

<span class="Gree_18Pts">Discounts  Free Domain Registration </span> <span class="Green_16_pts">-<?php echo WA_eCart_DisplayMoney($Hosting_Services->GetDiscounts()); ?></span><?php ?>
Sign in to reply to this post

Magega49

Re:

Great thank you...

Sign in to reply to this post
loading

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