Microsoft
Software
Hardware
Network
Question : PHP Statement that shows a percentage of a price
I am trying to display a price in my magento php site that would be charged to customers after a discount coupon is applied. The coupon will give 10% off the original RRP that is stored in the stores database and the only code that I have access to is <?php echo $this->getPriceHtml($_prod
uct, true) ?>
What do I need to add to this code to display the price to two decimal places that they would pay with a 10% discount please.
I.e
RRP
£100.00
(this is the database price)
With coupon discount
£90.00
(new price from PHP statement)
I can do the text bit but the PHP bit has me stuck
Answer : PHP Statement that shows a percentage of a price
Change
$discprice = 0.9 * $match[0];
to
$discprice = sprintf("%.2f", 0.9 * $match[0]);
Random Solutions
Crystal report file as resource?
How do I setup "completely" Unsolicited Remote Assistance Requests in Windows 7 for remote support? - Replacing free VNC
Windows 7 domain firewall settings
E-Machines EL1200 BSOD at Startup - Windows XP SP2
Need to update my Windows
FTP.EXE
client to do secure FTP
Adding additional server ito SBS2003 system - cannot see shared files on additional server
In .net C# how do you read a INI file
Using Modal Popup Extender with Master Page
SATA Hard Drive Does Not Recognize
Is there a way to make “ShellExecuteEx()” work from a Windows Service application?