How can I turn $ to # in the cgi created html ???

greenspun.com : LUSENET : S-Mart Shopping Cart : One Thread

Does anyone know how I can turn $ to # in the cgi created html sections of this script.

-- Mantra (cic@globalnet.co.uk), December 16, 1997

Answers

Give this a try. First make a backup of the S-Mart.cgi and then edit it and do a find & replace for $\ and replace it with #\ ...... make sure you search for both characters together though because if you just search for $ without the \ then you will render the script inoperable.

I think that should do the trick.

Cya,

Graham

-- Graham Jupp (gjupp@bayweb.com.au), December 16, 1997.


If your careful search on $ $ and replace # $ the $ references are quite easy to spot.

-- Bob Mallett (bobmallett@puresource.co.uk), July 15, 1999.

Sorry,can you help me please. :) I4ll try the shop-redicart. The shop is running,but I`am from Germany and so isn4t the currancy false. I did try your tip, but I havn4t the file S-Mart.cgi. I have only smart.cgi, smart.cfg, and valid.cgi. I did try to find any $\ but I haven4t found the $\ Where is the file where I can edit and replace for $\ with DM\ Please help me mfg Dieter Give this a try. First make a backup of the S-Mart.cgi and then edit it and do a find & replace for $\ and replace it with #\ ...... make sure you search for both characters together though because if you just search for $ without the \ then you will render the script inoperable.

-- Dieter (d_deutsch@mail.styria.com), July 31, 1999.

Instead of searching for $\ search for \$. Most of it appear in the section that display the calculation results and item listing.

Almost every special character has a meaning in Perl (e.g. ~ $ & ^ %). The \ (backslash) used within the PRINT command is to "force" Perl to display special character. It is known as the escape character.

\$ displays dollar sign \% displays percent sign

--- God bless!

-- Patrick Chan (patrickccf@hotmail.com), January 24, 2000.


Moderation questions? read the FAQ