[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] Variable/Attribute Pricing
"Nathan Wiger" <nate@nateware.com> writes:
> What I did was make it so that fields that were going to modify the price
> (i.e, like color and size) would be sensitive to a colon. All of this
> happens in the main products db, no other external tables are used.
>
> So, when creating/editing an item, a person would say:
>
> Price: 25.00
> Size: S, M: -$5, L: +$10, XL: +$15
> Color: Blue, Green, Red: +$35
>
> The builtin [item-attributes] tag would then ignore this (since there's
> nothing special about a colon to Akopia) and would make select lists like:
> _____________
> Size: | S |
> | M: -$5 |
> | L: +$10 |
> | XL: +$15 |
> -------------
> _____________
> Color: | Blue |
> | Green |
> | Red: +$35 |
> -------------
>
> Then, I wrote a simple UserTag routine called "nw_modprice" which was
> sensitive to the colon, and added/subtracted the appropriate values from the
> base price. The part that caught me was I had to set the following variables
> in catalog.cfg:
>
> CommonAdjust [nw_modprice] ;:price
> PriceField no_price
>
This is probably the nicest solution I've seen to this problem.
Congratulations.
--
(__) Doug Alcorn (mailto:doug@lathi.net http://www.lathi.net)
oo / PGP 02B3 1E26 BCF2 9AAF 93F1 61D7 450C B264 3E63 D543
|_/ If you're a capitalist and you have the best goods and they're
free, you don't have to proselytize, you just have to wait.