MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

RE: i need help with a pricing scheme



At 01:16 PM 9/2/99 , kenshin wrote:
>> "kenshin" <kenshin@planetanime.com> WROTE -
[snip]
>> >
>> >Here is the situation:
>> >products in our database are divided by categories.  e.g.
>> VHS, DVD, CD, etc.
>> >I want to be able to discount various categories independent
>> of each other.
>> >e.g. all DVD is 20% off.  All VHS is 30% off. etc.
>> >
>> >What i have so far:
>> >Get the discounts in the basket and thru the check out is no
>> problem.  I use
>> >the [discount] tag and some if/then magic it all works like
>> it should.
>> >
>> >My problem:
>> >I want those discounts to show up on other pages, i.e.
>> flypage, results,
>> >browse.
>> >
>> >My current work around:
>> >I have hard coded the regular price and discounted price in
>> my products
>> >database and if a discounted price exists then show it
>> instead but with some
>> >extra indication that the particular item is being
>> discounted (e.g. the
>> >price in red instead of black).
>> >
>> >What i would like to do:
>> >I would be nice if i could just check the category of the
>> current item and
>> >if it matches one that should be discounted to discount it
>> and show the new
>> >price.
>> >I've tried this using minivend's if/then statements but i
>> haven't been able
>> >to make it work correctly.

[if explicit]
[condition]
	$currently = '[loop-field category]';
	return 1 if $currently eq "apparel";
	return 0;
[/condition]
<TABLE WIDTH="80%"><TR BGCOLOR="blue"><TD ALIGN=CENTER><BR><FONT
COLOR="white"><H2>Apparel</H2></FONT></TD></TR></TABLE>
[/if]

This is something I use on my browse1 page to print a fancy header when the
current category is 'apparel'.  Hopefully you can mold this [if] for use in
your own circumstances.



Ryan Hertz                                              tel  800-645-BAIT
Webmaster                                               fax  520-645-2588
Advertising Director                            http://www.insideline.net
Gary Yamamoto Custom Baits, Inc.            http://www.yamamoto.baits.com


Search for: Match: Format: Sort by: