[ic] Matrix options with no price differential from master item

interch at ready2run.com interch at ready2run.com
Tue Feb 24 15:26:37 EST 2004

Hello all,

My first post here :-)

Is there any easy way to set up Matrix options with the variant's prices coming from the main sku in the the products table, rather than a price column in the variants table?

To elaborate...
(Also, if anyone is looking for information on how to set up products with several variants, and needs to maintain inventory by variant, the information below should also be of help to you).

I have the following in my catalog.cfg:

Options Matrix  variant_table  variants
Options Matrix  table          variants
OptionsEnable    option_type
ProductFiles     products variants

Extract from my "variants" table (incidently the "options" table is not used at all in this scenario):

code		sku	description		price
A0123-12	A0123	widget A0123 - size 12	120.00
A0123-14	A0123	widget A0123 - size 14	120.00

This works a treat - bring up the flypage for item A0123, and the tag [item-options inventory=inventory:quantity] creates a select box for A0123-12 and A0123-14 (provided both variants are in stock).  [variant skus are added to the inventory alongside the product skus that have no variants]

The select box sets mv_sku="A0123-12" or "A0123-14", depending on the user's selection.  Then when the form is posted (e.g. the Buy button is clicked), this has the effect of adding the relevant variant sku to the cart.

Back to my question:

In the example above, I have had to include both a "description" and "price" for each of the variants in the variant table.  However, the variants are always the same price, and I would rather avoid this duplication - extra work, and risk of error.  I would also have to add a "sale_price" field to the variants table to take care of items on sale (and again take care to ensure the sale_price is the same as the sale_price input in the "products" table for the parent sku).

What I would like to be able to do is leave the "description" and "price" column blank, and let this information come from the entry for A0123 in the main products table.  As it is, if I delete the contents of the "price" field in the variants table the variant is given a price of nil.

Am I missing something...is there an easy fix??  

If I understood correctly how options are working, then I think it would be great if the Interchange pricing routine could check for the existence of a price for the parent sku in the main "products" table whenever the "variant" price is nil (or the price column is missing altogether from the variant table).  Indeed, it would be good if this logic were applied for all fields.  i.e.  If field is nil or doesn't exist in the variants table, then look up corresponding field in products table for the parent sku.



More information about the interchange-users mailing list