?
Solved

Toogle price, show price on/off

Posted on 2008-06-09
1
Medium Priority
?
163 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 25

Accepted Solution

by:
dgrafx earned 2000 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

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

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

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

771 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