Solved

Toogle price, show price on/off

Posted on 2008-06-09
1
155 Views
Last Modified: 2013-12-24
I have a website for a restaurant. There is an admin area in which the client can add menu items, special items and events.

They want to make a change where they have the option of not showing their beverage prices. I would like to set up a toogle where Price is shown or not, based on a check box.

I would like it so after the menu item is added, the admin can view the inserted record and then turn it on/off for the website.

Is there an easy solution?

0
Comment
Question by:meechp123
1 Comment
 
LVL 25

Accepted Solution

by:
dgrafx earned 500 total points
ID: 21751330
yes there is an easy solution
1) just create a new database column and name it for example showPrice - datatype bit with a default of whichever you want 1 (which shows price or 0 which hides price)

2) then in the output query that displays these database items you need to add it to your list of columns (of course)

3) in the output query you may have something like
#itemname# #dollarformat(itemprice)#
just change it to
#itemname# <cfif showPrice>#dollarformat(itemprice)#</cfif>

4) in the admin section just create a checkbox (or selectbox) for the admin to set this item to show price or not

good luck ...
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question