[ic] how to model parameterized item in ic
Ed LaFrance (New Media E.M.S.)
ic_users at newmediaems.com
Tue Jul 13 11:24:54 EDT 2004
At 11:13 PM 7/12/2004, you wrote:
>hi,
>
>we are on ic 5.2.0 - foundation based catalog.
>
>our site sells art materials and items are modeled without any kind of
>options/variants. this works fine for our main requirement, but now there
>is a requirement to add a "sample" for each item that we sell. this sample
>is common for all of the items and so i was wondering, if there is a way to
>
>- model the item as a parameterized item - meaning create one item
>"generic sample" with the amount, weight etc. and change the item's
>description when placing the order (as part of order button/link), so that
>the item ordered is the "generic sample" item with the description as the
>sku of the item for which the sample has been requested.
>
>in our catalog.cfg
> MaxQuantityField is set to inventory:quantity to prevent ordering more
> than stock
> SeparateItems configuration is set to default value - No.
>
>Is it possible to achieve this ? Any pointers, suggestions would be
>appreciated.
>
>thx.
>- Akash
Sure, it is possible. If I were to do this, I would just forget about the
products/options/variants table and push this 'virtual' item directly on
the cart, something like this (on flypage.html):
<form action="[process]" method=post>
<input type=hidden name=mv_todo value=refresh>
<input type=hidden name=mv_nextpage value=ord/basket>
<input type=hidden name=item_sku value="[item-code]">
<input type=submit name=mv_click value="Order A Sample">
</form>
[set Order A Sample]
[calc]
push @{$Items}, {
code => 'SAMPLE',
quantity => 1,
description => "Sample of item $CGI->{item_sku}",
mv_price => 1.50
};
return;
[/calc]
[/set]
You'll need to have:
DescriptionField description
In your catalog.cfg, but otherwise this should work, I think. I'm assuming
the price for the sample is the same for all items, since you did not say
anything about that. The code is not tested, so caveat emptor.
Good Luck!
- Ed
===============================================================
New Media E.M.S. Technology Solutions for Business
11630 Fair Oaks Blvd., #250 eCommerce | Consulting | Hosting
Fair Oaks, CA 95628 Ed.LaFrance at newmediaems.com
(916) 961-0446 http://www.newmediaems.com
(866) 519-4680 Toll-Free (916) 961-0447 Fax
===============================================================
More information about the interchange-users
mailing list