[Erp5-dev] how to use variations in products and sale supplies

Romain Courteaud romain at nexedi.com
Wed Jun 21 13:28:55 CEST 2006


Le Mardi 20 Juin 2006 22:24, Bartek Gorny a écrit :
> Hi

Hi Bartek,

> I need help - spend many hours trying to figure it out: how to
> properly assign base categories to product and sales supply, so as to
> be able to use variations?
>
> When I create a product and a sale supply related to it, then "price
> variation axes" boxes are empty. If I manually
> setVariationBaseCategoryList on a product, then I can choose "price
> variation axes" in both the product and its related sale supply, but
> pricing matrixboxes do not show up, and the predicate subobjects are
> not created. Whereas setting quantity step works as expected -
> predicates are created and matrixboxes are in place.
>
> Is it a bug, or is this feature turned off, or am I doing something wrong?

If you want to use variations in the system, you have to:
 - define the variations axes on the resource level, by using 
setVariationBaseCategoryList on your product (example: 
product.setVariationBaseCategoryList([colour]) )
 - then, define the available variations on the resource level (example: 
product.setSizeList(['blue', 'red'])
 - finally, on sale supply line, the matrixbox will now display 'blue' and 
'red' in its range if you select 'size' as a price variation axe.

Romain



More information about the Erp5-dev mailing list