1 (edited by PopaRob 2010-01-19 21:59:12)

Topic: Suggestion: Create Attribute First, Then Assign To Each Product.

When adding a long list of products with each product requiring the same exact attribute selection, for example T-shirts where the size selection is Small/Medium/Large/XL/XXL for perhaps 50 or more individual products, or where there are hundreds of different products and every one of them has the exact same attribute selector, the current method of adding one attribute at a time to one product at a time is tedious and limiting. It takes a long time to add each attribute manually through the AShop admin panel and the redundant entries appear to be inefficient use of database resources.

It is possible to bypass the admin panel by creating tables using Excel, export to CSV, and then import to mySQL through phpMyAdmin, however this would still create a lot of redundant rows in the parametervalues table. One way to get around this might be to remove the primary key/auto increment from the parameterid column in the parameters table and then set parameterid same for all products that require the same select options (from the parametervalues table). The obvious trouble with removing the primary key/auto increment is that manual entry of attributes through AShop admin would then be broken since it depends on the autoincrement, which can't exist without also being a primary key.

Suggestion: Make it possible to create each attribute independently and then assign it to each product individually. Remove the mySQL primary key/auto increment from parameters.parameterid table and increment new attributes through PHP programming instead. Then add a method in AShop admin to assign more than one productid to each parameterid. Also, it seems like the caption and buybuttons fields could be moved from the parameters table to the parametervalues table since they can be easily related through PHP. This change will improve the AShop admin panel and it will also make it easier to import long lists of products with simiple attributes using Excel and the CSV import. It will also simplify usage of Order-Link code within third-party scripts. For example the attribute can then be set with one attribute (parameterid) for many productid; shipping.php?productid=$row[productid]&attribute1=$value (instead of having to look up a different set of values for each attribute/parameter).