You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
Hi all,
I am creating a shopping cart for a tile company. On the product detail display page I need the price to show normally as it does with an individual unit price (ie price per tile). However I need a Square Metre Price to display beside the unit price. It's a simple calculation as all the tiles are the same size, requiring 4 to make a square metre. My formula is therefore the unit price times 4 with the words "per sq mtr" appearing after it.
I have a identified the necessary .pl file to modify (I think) ! as :
cgi-bin/library/modules/ste_prod.pl
But I am not sure of how to include the correct formula etc.
Any help would be appreciated.
Thanks in advance.
Randal
Offline
In that file, edit the routine 'ste_prod_show_price'. Replace:
if ($display_price eq "Y") { if ($display_sale eq "Y") {
With:
if ($display_price eq "Y") { $square_reg = ($product_regprice * 4); $square_reg = sprintf("%.2f", $square_reg); $square_sale = ($product_saleprice * 4); $square_sale = sprintf("%.2f", $square_sale); if ($display_sale eq "Y") {
Then, edit the HTML Site Elements for the price displays, using the following as variables:
(CGIVAR)square_reg(/CGIVAR)
(CGIVAR)square_sale(/CGIVAR)
In addition to the price variables displayed there already.
Offline
AM I MISSING SOMETHING ???
I'm trying to do the same but to show tax amount and price without taxes.
So i made :
######### ######### Print the price display, if we can. ######### if ($display_price eq "Y") { $price_ht_reg = ($product_regprice / 1.196); $price_ht_reg = sprintf("%.2f", $price_ht_reg); $price_tva = ($product_regprice * .196); $price_tva = sprintf("%.2f", $price_tva); if ($display_sale eq "Y" && $sale > "0") { $price_ht_sale = ($product_saleprice / 1.196); $price_ht_sale = sprintf("%.2f", $price_ht_sale);
The price are displayed on produit page but the values are so wrong :
for a test product which cost 100 USD with a country tax of 19,6% I should have :
Amount of tax : 19,60 USD
Price without tax : 80,40 USD right ?
So can someone tell me WHY i get this :
Amount of tax : 19,60 USD
Price without tax : !!!!
For me 83.61 + 19.60 = 103,21 and NOT 100 !!!
Please help !!!
Offline
Yes, you're missing something...
For me, 100 divided by 1.196 = 83.61 -- which is probably what you're missing.
Jeez I'm in a cranky mood today. Sorry.
Maybe $price_ht_reg = ($product_regprice - ($product_regprice * .196)); would provide the result you need?
HTH,
Dave
Offline
Hi there,
How can i change the size of the price font on my website: (So it appears smaller)
Offline
Bump
Offline
Wrap a font tag around the tag:
(CGIGET TYPE="SUB" VALUE="ste_prod_show_price" PARAMS="(CGIVAR)product_pricestatus(/CGIVAR)|(CGIVAR)product_regprice(/CGIVAR)|(CGIVAR)product_saleprice(/CGIVAR)|(CGIVAR)product_volprice(/CGIVAR)|(CGIVAR)product_voltext(/CGIVAR)|(CGIVAR)product_usecatdisc(/CGIVAR)|(CGIVAR)product_useinv(/CGIVAR)|(CGIVAR)product_inv(/CGIVAR)|(CGIVAR)product_recurprice(/CGIVAR)|(CGIVAR)product_recurstatus(/CGIVAR)")<BR><BR>
Offline