Kryptronic Software Support Forum

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.

#1 07-26-2004 07:31:31

niactive
Member
From: Northern Ireland
Registered: 04-11-2004
Posts: 12
Website

Price Display Addition

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

 

#2 08-13-2004 12:32:33

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Price Display Addition

In that file, edit the routine 'ste_prod_show_price'.  Replace:

Code:


if ($display_price eq "Y") {

if ($display_sale eq "Y") {

With:

Code:


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.


Nick Hendler

Offline

 

#3 08-23-2004 18:41:10

niactive
Member
From: Northern Ireland
Registered: 04-11-2004
Posts: 12
Website

Re: Price Display Addition

Thanks Nick.

That's just the info I needed.


smile


Many Thanks again


Randal

Offline

 

#4 03-28-2005 16:45:40

sethshannon
Banned
From: Paris, France
Registered: 02-15-2004
Posts: 97
Website

Re: Price Display Addition

AM I MISSING SOMETHING ???

I'm trying to do the same but to show tax amount and price without taxes.

So i made :

Code:

#########
######### 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 !!!


THIS USER HAS BEEN BANNED FROM THIS FORUM.

If this post contains any language related to
code samples, advice, etc., please read this
entire thread before making a decision to use
this post as a basis for any change to your
software installation.

Offline

 

#5 03-28-2005 18:19:54

dtwg
Member
From: California
Registered: 11-15-2004
Posts: 1339
Website

Re: Price Display Addition

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

 

#6 03-30-2005 14:20:53

myfunkyshop
Member
From: I Live In The Computer
Registered: 12-28-2004
Posts: 152
Website

Re: Price Display Addition

Hi there,

How can i change the size of the price font on my website: (So it appears smaller)




Miss George Clooney



Offline

 

#7 03-31-2005 14:37:06

myfunkyshop
Member
From: I Live In The Computer
Registered: 12-28-2004
Posts: 152
Website

Re: Price Display Addition

Bump


Miss George Clooney



Offline

 

#8 04-21-2005 10:06:47

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Price Display Addition

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>


Nick Hendler

Offline

 

Board footer