Guest Posted March 9, 2004 Posted March 9, 2004 I've been trying to figure this out for a couple of days now. I've got a client that only has a few products and does not want to break them down into categories. How do I go about changing the name of the categories info box to Products and just listing product names in the box with the appropriate links to their pages? Is there a mod for this that I've missed? Thanks Bishop
OceanRanch Posted March 10, 2004 Posted March 10, 2004 Go to your Administration->Catalog->Categories/Products Do not open any of the Category Folders. Click on New Product and the product will be added to what is referred to as "Top". All of those products will now show up in the Categories box on your main page as seperate links as your stated you need. You might also want to change the text "Categories" to something like "Products". In catalog/includes/languages/english.php change english.php:define('BOX_HEADING_CATEGORIES', 'Categories'); to english.php:define('BOX_HEADING_CATEGORIES', 'Products'); HTH Tom
gawain Posted March 11, 2004 Posted March 11, 2004 I'm having the same problem. Adding a new product and placing it in the "Top" product category results in the product being visible in the Admin listing for products and categories as expected. However, the Categories list in the public side of the store does not show the newly added product. Any ideas?
Guest Posted March 12, 2004 Posted March 12, 2004 Hi. Having the same problem... Need it yesterday...(as usual) ANYBODY HEEEEEELP !!!!!!!!!!!!
OceanRanch Posted March 12, 2004 Posted March 12, 2004 It looks as if those products in the "Top Category" do not get included in the categories box. I also could not find a clean contribution that only did that. So I changed the categories.php code to display those products at the top with a double <br> between them so that longer product names will be seperated. In catalog/includes/boxes/categories.php around line 70 find this new infoBoxHeading($info_box_contents, true, false); $categories_string = ''; and replace it with new infoBoxHeading($info_box_contents, true, false); $categories_string = ''; // add links to products with no category $product_query = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = 0 and p.products_id = pd.products_id and pd.language_id ='" . (int)$languages_id . "' order by pd.products_name " ); while ($no_category = tep_db_fetch_array($product_query)) { $no_cat_product_id = $no_category['products_id']; $no_cat_products_name = $no_category['products_name']; $myref = "<a href=" . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $no_cat_product_id) . '">' . $no_cat_products_name . '</a><br><br>'; $categories_string .= $myref; } // end links to products with no category Have fun HTH Tom
OceanRanch Posted March 12, 2004 Posted March 12, 2004 You'll need to change above code...the additional " after the session id causes problems. Replacement code should be new infoBoxHeading($info_box_contents, true, false); $categories_string = ''; // add links to products with no category $product_query = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = 0 and p.products_id = pd.products_id and pd.language_id ='" . (int)$languages_id . "' order by pd.products_name " ); while ($no_category = tep_db_fetch_array($product_query)) { $no_cat_product_id = $no_category['products_id']; $no_cat_products_name = $no_category['products_name']; $myref = "<a href=" . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $no_cat_product_id) . '>' . $no_cat_products_name . '</a><br><br>'; $categories_string .= $myref; } // end links to products with no category Tom
Guest Posted March 13, 2004 Posted March 13, 2004 THANK YOU It is worked, Details will change later, it is perfect for now. THANK YOU AGAIN
edtiger Posted September 23, 2004 Posted September 23, 2004 this was just the solution I was searching for THANKS!
kc0eks Posted March 19, 2005 Posted March 19, 2005 I would also like to say thanks. Exactly what I needed as well :)
dave20060312 Posted March 13, 2006 Posted March 13, 2006 I have posted elsewhere on this topic. Without success so far. So here goes once again! I have only 3 products, all of the same type, so I followed the advice in this thread to get rid of the mention of category entirely. The idea being to reduce the number of clicks that potential customers have to make. So now I have the 3 products listed in what was the Category Box. (This listing is actually irrelevant as I'll probably get rid of this box anyway, preferring to display my products in the Specials or new Products central display. But that's for after I solve the current problem). Problem is, the product options such as size and colour (multiple dropdown boxes) disappeared without trace at that point. I'm sure that somebody in the Community could help me with this. So here's hoping for an answer. Dave PS I have tried about 10(!) new installs, including adding my products without category, but leaving the default DVDs and Hardware/Software stuff from the initial Osc installation. I added size and colour options and option values to the Blade Runner DVD (which is in its category Science Fiction), and these showed up as expected in their dropdown boxes. But no dropdowns show up for my real products, when I enter them "at the top", i.e. without their being in a category. I'm sure this is just a small code edit, but where?? Thanks for any and all help.
ehong33234 Posted August 18, 2006 Posted August 18, 2006 Thanks Tom, your script helped tremendously... I've been searching for hours to remove the trees and replace them with direct links. Thank you!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.