Multiple Pricing Levels
Although cf_ezcart has always had the ability to set percentage discounts on a per customer
level, we have often had requests to have actual pricing levels. While the former is fine if you
want to give Customer A 10% off of all items and Customer B 15% off of all items, our new scheme
allows for more flexibility by allowing you to create as many Price Levels as you like, and
assigning any customer to any level.
Administration
Depending upon your situation, you may wish to add your products first, then create your
additional Price Levels. The reason for this is, when creating a new Price Level, you will first
duplicate an existing Price Level. You may then edit the Price Level, which allows you to multiply
and/or divide the Regular Price and/or Sale Price to globally reset prices. So, you may duplicate
your main pricing structure, then, as an example, lower all prices by 10% and lower all sale prices
by 5%. You may then go in and tweak the prices for the new level as you desire.
- Set attributes.multiprice to "1" in Application.cfm under the Discount and Pricing section.
- From Store Administration, click Edit Prices in the black menu.
- To delete a Price Level, select the Level from the menu and click Delete Price Level. Level 1 may not be deleted.
- To add a Price Level, click Add New Price Level. You will then be prompted for the Price Level to duplicate, a
numeric ID to assign, and a name. The name is not required, but may be used so you may identify the different levels.
Note that the ID may not be changed later. The IDs do not have to be in any specific order. Note also that should
you have so many items that duplicating a Level causes the application to time out before all the prices are added,
or if for any other reason you end up having products with missing prices in a Price Level, choose to add a Price Level,
ENTER THE SAME ID and CHOOSE THE SAME LEVEL TO DUPLICATE. This will fill in the missing prices.
- To edit a Price Level, select the Level from the menu and click Edit Price Level. You may then change the name of the
Level and globally increase or decrease the prices.
- When adding or editing products, all Price Levels will show.
- Any customer may be set to use any Price Level. All applicable discount will still be applied.
Implementation
There are 2 ways to activate a Price Level.
- By default, you don't have to do anything. When a customer logs in, their Price Level will be
set as "client.pricelevel". Note that a customer MUST be logged in before
the prices at their level will be in effect. So, if your additional Price Levels are all used
as a discounting feature, you will need to inform your customers to log in before shopping. More
imperative, if ANY of your prices at ANY Price Level are HIGHER than the default Price Level, you
will want to FORCE your customers to log in. Once client.pricelevel is set, that will be their price level
for the rest of the session.
- Set the local variable "variables.pricelevel" at the top of the cartpage template or anywhere else
that is set BEFORE the following cf_ezcart templates ("page" values) are accessed:
list.cfm, cart.cfm, details.cfm, search.cfm, checkout.cfm
Usage Notes:
- If variables.pricelevel is set on the pages listed above, client.pricelevel will not be set.
- If variables.pricelevel is set on the pages listed above, it will take precedence over client.pricelevel
if client.pricelevel has been set.
- For a new customer, you may set client.pricelevel at the entry point, or by setting it based on a code or password. This will enable that price level
immediately and will also set this as their permanent Price Level PROVIDED THAT IT IS ACCESSIBLE
BY CHECKOUT.CFM.
- If you wish to be a little creative, you could use a Price Level on a temporary basis or
only activate it if they enter at a certain point or enter a special code. To do this with a Price Level of 10, you
could set a temporary client or session variable, such as client.temp_price_level. Then, at the top of each page
EXCEPT CHECKOUT.CFM you would check for the existence of that variable...
<CFIF isDefined('client.temp_price_level')>
<cfset variables.pricelevel = client.temp_price_level>
</CFIF>
This would give the customer these prices for this session. As long as you do not put the CFIF statement
above when checkout.cfm is being loaded, the customer will be set with the default Price Level of 1.