Wait a minute... This content is very very old. We no longer sell or support this theme version. New Topics
Version 9
-G Heban
0 points
Beginner
Hi Everyone,
Has anyone tried some basic MATH with Custom Field short codes related to PRICES and DISCOUNTS or any other numbers within CONTENT PAGE under Page Setup?
I attempted to display how much discount is applied or what BUY NOW price is using short codes I created in the CUSTOM FIELD under Page Setup. For example: I created custom field [price] for the price of the item and [pricecut] for the discount applied. Then I headed over to the CONTENT PAGE under PAGE SET UP to do a little math to test if the system works with basic math operations. Here is simple example.
YOUR DISCOUNTED PRICE IS:
<?php
$price = [price];
$priceCut = [pricecut];
// Now subtracting PRICE from PRICE CUT.
$finalSaleprice = $price – $priceCut;
echo $finalSaleprice;
// OR apply simply direct subtraction.
echo [price]-[pricecut];
?>
This is simple math for illustration purpose only, but if php works within CONTENT PAGE area, any advanced math that contains charts, bars, graphs and statistics with combinations of html can be applied within this small spot resulting in a lot more dynamic custom page for each product.
The system displays [price] and [pricecut] values correctly, but it does not do the math. Does this mean CONTENT PAGE works only with HTML, but not PHP?
Hi Everyone,
Has anyone tried some basic MATH with Custom Field short codes related to PRICES and DISCOUNTS or any other numbers within CONTENT PAGE under Page Setup?
I attempted to display how much discount is applied or what BUY NOW price is using short codes I created in the CUSTOM FIELD under Page Setup. For example: I created custom field [price] for the price of the item and [pricecut] for the discount applied. Then I headed over to the CONTENT PAGE under PAGE SET UP to do a little math to test if the system works with basic math operations. Here is simple example.
YOUR DISCOUNTED PRICE IS:
<?php
$price = [price];
$priceCut = [pricecut];
// Now subtracting PRICE from PRICE CUT.
$finalSaleprice = $price – $priceCut;
echo $finalSaleprice;
// OR apply simply direct subtraction.
echo [price]-[pricecut];
?>
This is simple math for illustration purpose only, but if php works within CONTENT PAGE area, any advanced math that contains charts, bars, graphs and statistics with combinations of html can be applied within this small spot resulting in a lot more dynamic custom page for each product.
The system displays [price] and [pricecut] values correctly, but it does not do the math. Does this mean CONTENT PAGE works only with HTML, but not PHP?
Any clue?
Thanks
Members Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login Now