Solved

Toogle price, show price on/off

Posted on 2008-06-09
1
153 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 24

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

758 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now