dropdeadred Posted July 28, 2004 Posted July 28, 2004 Would it be a simple thing to get another field displayed in the Catgories / Products view in admin? Using 'model' and butchering the 'manufacturer' option along with using Master Products (thankyaverymuch Galen), the front end of the store looks pretty comprehensive now. The only thing now is, my Categories/Products page would be perfect if I could just get it to display on more field so I could identify the differences in my master/slave products. e.g. I have Test Product 001, it is a CD. I create the product, the model is "CD" - no problem. I also have this product in Cassette and LP, so I create two more products and make the the CD's slave. Great! On the front end it works perfectly. However, as I don't want to be writing "CD" or "Cassette Tape" in great honking letters in the title, my admin end looks something like this--- http://www.dropdeadred.net/images/osc_screenshot.jpg Is there any way I could have this table show me an extra field, so I can differentiate at this level between which is the CD, Cassette and LP? Cheers! Melanie
craigglawson Posted July 28, 2004 Posted July 28, 2004 What you can do is have one product, but three options, cd lp, and cassette, and different pricing options. If you go into Product Attributes, you can set it there, so you'd have one product, one image, 3 options for purchase ... Too close for missiles, I'm switching to guns ...
dropdeadred Posted July 28, 2004 Author Posted July 28, 2004 I did try that in my first outing with the store, and it wasn't precisely suitable. I need for the customer to be able to search by format, but without having three of everything. Thus the master products is perfect for my requirements. The lack of extra info in admin is the one tiny thing that's a difficulty :) Also, every now and then, the LP has tracks that the CD doesn't, or the CD was remastered and has bonus tracks, but is still basically the same product. The attributes thing is great and I thought it would solve everything for me, but somehow the master products is just more intuitive in this case. Melanie
dropdeadred Posted July 28, 2004 Author Posted July 28, 2004 Man I am so darn proud of myself hehe... If anybody cares this is how I got the Model to show in the Categories/Products table in admin/categories.php... in admin/includes/languages/english/categories.php added underneath the existent table heading definitions... define('TABLE_HEADING_PMODEL', 'Format'); in admin/categories.php Around line 800 you get the HTML for the table - added a table cell to hold the Model data (third cell) and inserted title as defined above: <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CATEGORIES_PRODUCTS; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PMODEL; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> Further down in the same file (around line 850), modify the appropriate SQL query to include the products_model data (all this required was adding `p.products_model,` to the query in both the `if` and `else` stages... if (isset($HTTP_GET_VARS['search'])) { $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and pd.products_name like '%" . tep_db_input($search) . "%' order by pd.products_name"); } else { $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by pd.products_name"); Then finally (around line 880), put `products_model` into your table: <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $products['products_name']; ?></td> <td class="dataTableContent" align="center"><?php echo $products['products_model'];?></td> <td class="dataTableContent" align="center"> >>Happy Dance<<
besheer Posted September 25, 2004 Posted September 25, 2004 Nice. I always thought this should be there by default. Drive it like you stole it.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.