Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Toogle price, show price on/off

Posted on 2008-06-09
1
Medium Priority
?
165 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

636 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