[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] RE: mv_ib and overriding default catalog
Folks,
I have two products tables in a single catalog and system requirements
are such that the catalog a person is able to search and order from is
determined by a flag in their userdb record.
Searches work because I use the fi=<product table name> to limit the
search based on the type of user that is logged in. No problem here.
The checkout and backend systems work because I pull product attributes
from the correct by using things like [item-data <table> price] instead
of [item-price], and so, on.
There is one exception and that is the basket page which loads the
'cart' component by default. I've modified the cart component to permit
adding a sku and quantity to an existing or empty cart.
If a user enters a sku from their permitted catalog everything is fine.
If a user enters a sku that doesn't exist in either catalog everything
is fine.
If a user enters a sku from the catalog they are not permitted to use
there is a problem.
When the page refreshes the item is added to the cart using data from
the other products table, but of course since I only pull data from the
catalog the user can see, the result is a basket entry with blank values
except for the quantity field.
Using [dump] and combing the docs and archives, I believe that this is
caused by the value of mv_ib="products" (the other products table is
called spot_products) which is set internally by Interchange.
Basically, if the cart gets refreshed with mv_order_item set to a valid
sku from the unauthorized catalog, it gets added to the cart anyway
because mv_ib="products".
How can I override this behavior to tell Interchange to only add items
from a specific product table?
Any help would be appreciated.
- Jerry
- References:
- [ic] Barlink
- From: interchange-users@icdevgroup.org (Chris Bartholomew)