mmier Posted October 5, 2005 Share Posted October 5, 2005 thanks, only one other question, what code am i looking for to change?? is it this?? and if yes, how would i alter it as you mentioned above??? I'm a little lost here.. for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_text = TABLE_HEADING_MODEL; $lc_align = ''; break; case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; $lc_align = ''; break; case 'PRODUCT_LIST_PRICE': $lc_text = TABLE_HEADING_PRICE; $lc_align = ''; break; case 'PRODUCT_LIST_QUANTITY': $lc_text = TABLE_HEADING_QUANTITY; $lc_align = ''; break; case 'PRODUCT_LIST_WEIGHT': $lc_text = TABLE_HEADING_WEIGHT; $lc_align = ''; break; case 'PRODUCT_LIST_IMAGE': $lc_text = TABLE_HEADING_IMAGE; $lc_align = ''; break; case 'PRODUCT_LIST_BUY_NOW': $lc_text = TABLE_HEADING_BUY_NOW; $lc_align = ''; break; } Quote Miz --------------------- Contributions New Fields with Easy Populate Remove Category Images Link to comment Share on other sites More sharing options...
Guest Posted October 6, 2005 Share Posted October 6, 2005 thanks, only one other question, what code am i looking for to change?? is it this?? and if yes, how would i alter it as you mentioned above??? I'm a little lost here.. for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_text = TABLE_HEADING_MODEL; $lc_align = ''; break; ..................................................... } I have the same problem and same question. I've looked at the page until I'm squint but understand too little of how the layout actually works to try to change anything. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 6, 2005 Share Posted October 6, 2005 I think will be better to start a new thread (probably in the general forum) for the layout question as it is not related with the contribution. Quote Link to comment Share on other sites More sharing options...
jeeperz Posted October 10, 2005 Share Posted October 10, 2005 (edited) Hoping for a bit of help here. I've installed the short_desc mod and can't get the short description to display unless I select a manufacturer. So, I've narrowed it down to this: case 'PRODUCT_LIST_NAME': $lc_align = ''; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a><br>' . $listing['short_desc'] . '?'; } else { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a><br>' . $listing['short_desc'] . '?'; } It's somewhere in the "else" code. For some reason it's not retrieving the short description from the database but it will if you select a manufacturers id. I've searched for answers and can find none. My computer is just about broken from me beating my head against it. I'd appreciate any help! Edited October 10, 2005 by jeeperz Quote Link to comment Share on other sites More sharing options...
Guest Posted October 11, 2005 Share Posted October 11, 2005 Could be some other code you have somewhere further down. Does the products name being displayed? Here is the line I used is pretty much the same like yours: $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a><br>' . $listing['short_desc']; Quote Link to comment Share on other sites More sharing options...
jeeperz Posted October 11, 2005 Share Posted October 11, 2005 Could be some other code you have somewhere further down. Does the products name being displayed? Here is the line I used is pretty much the same like yours: $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a><br>' . $listing['short_desc']; Yes, the products are shown with the Model, Manufacturer, Name, Price, and Buy Now columns (I don't currently have images associated the products). To test, I put extra text just before the anchor tag and it prints out in front of the product name. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 11, 2005 Share Posted October 11, 2005 (edited) ok can you post a url to see it? I would like to see how it displays the short description when the product has a manufacturer assigned. Edited October 11, 2005 by enigma1 Quote Link to comment Share on other sites More sharing options...
jeeperz Posted October 14, 2005 Share Posted October 14, 2005 ok can you post a url to see it? I would like to see how it displays the short description when the product has a manufacturer assigned. Sorry for the delay, I had an unfortunate hard drive crash.... The URL to see the short description with manufacturer assigned is Short Desc Working The URL that should show it is Short Desc Not Working Thanks! Quote Link to comment Share on other sites More sharing options...
Guest Posted October 14, 2005 Share Posted October 14, 2005 Newbie here, so I apologize if this has been answered here previously. I have successfully installed the short description contribution, but would like the short description to appear on the home page for each product listed under "New for [this month name]" Currently I have the default page where the new products table shows an image, product name, and price. My store is not live at this time. Thanks in advance for any tips. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 14, 2005 Share Posted October 14, 2005 Sorry for the delay, I had an unfortunate hard drive crash.... The URL to see the short description with manufacturer assigned is Short Desc Working The URL that should show it is Short Desc Not Working Thanks! Ok the catalog\index.php should have the code to get the short_desc column from the dbase. There is an if/else statement in that file. Here is part of that code so should be easy to locate it. // show the products of a specified manufacturer if (isset($HTTP_GET_VARS['manufacturers_id'])) { if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only a specific category Below you will see the variable $listing_sql that is set with the sql query strings. There are 4 case there within the if/else statements. Make sure each one of them includes the short_desc field. For example the manufacturer has a line like this: $listing_sql = "select " . $select_column_list . " p.products_id, p.short_desc, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; Check on all 4 of those the p.short_desc is present. Quote Link to comment Share on other sites More sharing options...
jeeperz Posted October 17, 2005 Share Posted October 17, 2005 Check on all 4 of those the p.short_desc is present. You are a GENIUS! :thumbsup: I remember reading in the install about 4 spots to add that too, and I remember doing it but maybe it wasn't that file.... Problem solved, thank you very much! Quote Link to comment Share on other sites More sharing options...
jeeperz Posted October 21, 2005 Share Posted October 21, 2005 What would be excellent is if there was a way to import the short_desc field into the database through EP. I was looking through the file modifications made for the short_desc mod but I'm not familiar enough to start coding away but it seems to me that the short_desc field should not have been added to the products table but instead to the products_description or products_to_categories tables. (?) Any pointers? Quote Link to comment Share on other sites More sharing options...
Guest Posted October 21, 2005 Share Posted October 21, 2005 Hello Kevin, you need to keep the short description in the products or products_descirption sql tables. Because the products_to_categories is a mapping table so you may end up with duplicates of the short description text in the table thus taking more space on the server (when you set links for products to multiple categories). But I haven't deployed EP on my end to see the necessary mods. Can you ask the EP thread if one wants to add an extra column what needs to be done? They may have something there that could be applied for the a column like the short_desc. Quote Link to comment Share on other sites More sharing options...
jeeperz Posted October 22, 2005 Share Posted October 22, 2005 Hello Kevin, you need to keep the short description in the products or products_descirption sql tables. Because the products_to_categories is a mapping table so you may end up with duplicates of the short description text in the table thus taking more space on the server (when you set links for products to multiple categories). But I haven't deployed EP on my end to see the necessary mods. Can you ask the EP thread if one wants to add an extra column what needs to be done? They may have something there that could be applied for the a column like the short_desc. I hate to say it, but I removed the short_desc contribution (after all that work!) and installed the "Products Short Descriptions" contribution (1.03, I think). This puts the short description into the products_descriptions sql table. I then went through EP and made the same modifications that were made in some of the other files to see if I could get it to work. And I did! I can now import/export the "products_info" data through EP. I reallly liked the product listing display with the short_desc much better than this one, but I can work around that. Thanks again for the help before! Quote Link to comment Share on other sites More sharing options...
HSMagic Posted November 2, 2005 Share Posted November 2, 2005 I installed "Short_Description_v2" and at first it "broke" my admin catalog with a tep stop reference to p.products_pdfupload: 8/ ################# SEARCH FOR #################// if (isset($HTTP_GET_VARS['search'])) { $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, pd.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_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"); } #################### REPLACE WITH #######################// if (isset($HTTP_GET_VARS['search'])) { $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_pdfupload, pd.short_desc, pd.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_quantity, p.products_image, p.products_pdfupload, pd.short_desc, 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"); } I removed the reference to p.products_pdfupload and things were usable again, but with 2 noticeable problems: 1. Short decriptions are not in the standard product lisings, but are fine in new products or results of a product search. 2. If a manufacturer is selected from the manufactures info box instead of showing the products it instead opens an advanced search with the highlighted error: At least one of the fields in the search form must be entered. If a manufactuer is selected when on the Manufacturer Info infobox, then all the products display properly. Any suggestions are appreciated. Quote Link to comment Share on other sites More sharing options...
HSMagic Posted November 2, 2005 Share Posted November 2, 2005 (edited) I read this thread a dozen times and figured out the missing info in index.php so now I have short descriptions everywhere I want them. I cannont figure out why my manufactures infobox no longer works properly. When a manufacturer is selected it points to: http://www.hotshotmagic.com/catalog/advanc...facturers_id=12 and that brings up: Advanced Search At least one of the fields in the search form must be entered. And it never did that before... :( Edited November 2, 2005 by HSMagic Quote Link to comment Share on other sites More sharing options...
jeeperz Posted November 3, 2005 Share Posted November 3, 2005 I read this thread a dozen times and figured out the missing info in index.php so now I have short descriptions everywhere I want them. I cannont figure out why my manufactures infobox no longer works properly. When a manufacturer is selected it points to: http://www.hotshotmagic.com/catalog/advanc...facturers_id=12 and that brings up: Advanced Search At least one of the fields in the search form must be entered. And it never did that before... :( I don't even see a manufacturers infobox on your site so I can't really help. Quote Link to comment Share on other sites More sharing options...
HSMagic Posted November 3, 2005 Share Posted November 3, 2005 My quick fix was to remove it from column left... I'll put it back up for the masses to see. :) Quote Link to comment Share on other sites More sharing options...
mre Posted November 28, 2005 Share Posted November 28, 2005 I installed Product Short Description v.2 which is mod by josh modified by aviveros. It is working on product_listing page, but I found difficulties with module new_products. I've added pd.short_desc to sql query and received error "Unknown table 'pd' in field list". I'm not familiar with sql queries, hopping someone will help. The query code, modified by SPPC, is as follow: if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $new_products_query = tep_db_query("select p.products_id, p.products_image, pd.short_desc, p.products_tax_class_id, p.products_price as products_price from " . TABLE_PRODUCTS . " p where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, pd.short_desc, p.products_tax_class_id, p.products_price as products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit ". MAX_DISPLAY_NEW_PRODUCTS); } Chris Quote Link to comment Share on other sites More sharing options...
jeeperz Posted November 28, 2005 Share Posted November 28, 2005 I installed Product Short Description v.2 which is mod by josh modified by aviveros.It is working on product_listing page, but I found difficulties with module new_products. I've added pd.short_desc to sql query and received error "Unknown table 'pd' in field list". I'm not familiar with sql queries, hopping someone will help. Did you add the "short_desc" to the database? Quote Link to comment Share on other sites More sharing options...
Guest Posted November 28, 2005 Share Posted November 28, 2005 The short desc field should be inserted under the TABLE_PRODUCTS, (not under TABLE_PRODUCTS_DESCRIPTION). so it should been p.short_desc Quote Link to comment Share on other sites More sharing options...
mre Posted November 28, 2005 Share Posted November 28, 2005 Thanks for reply. Mark, I'm little confused. Some time ago you wrote here that the table for short_desc could be products or products_description. You are my guru and I'm going to change the code, but could you please describe shortly the difference? Chris Quote Link to comment Share on other sites More sharing options...
Guest Posted November 29, 2005 Share Posted November 29, 2005 if you follow the instructions for the contribution that includes the short_desc field (there are 2 contributions for short description both point to this thread) then the short_desc field is under the TABLE_PRODUCTS with v2 they moved it to the TABLE_PRODUCTS_DESCRIPTION to support multiple languages. This is because this description table has the language_id field included. So scratch what I said earlier that was valid for v.1 Using the default catalog\pproducts_new.php file the query for v2 should be: $products_new_query_raw = "select p.products_id, pd.products_name, pd.short_desc, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"; I just added the pd.short_desc after the pd.products_name. The pd table is defined and points to TABLE_PRODUCTS_DESCRIPTION. Quote Link to comment Share on other sites More sharing options...
Sliper Posted December 6, 2005 Share Posted December 6, 2005 I really screwed it up! I followed the instructions and added the sql code into the database. Then I update the browser and get this: ---------------------------------------------------------------- 1064 - You have an error in your SQL syntax near ' p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, ' at line 1 select p.products_image, pd.products_name, pd.products_description,, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '59' order by pd.products_name [TEP STOP] --------------------------------------------------------------- Does anyone know what is wrong? I need to fix this fast cos im knee deep in it now that the site is down :-( Quote Link to comment Share on other sites More sharing options...
Sliper Posted December 6, 2005 Share Posted December 6, 2005 Somehow the first time when i replaced the edited files with my backups they didn?t get replaced. I don?t know why but I decided to overwrite them again, just in case, and guess what. The site is back up. Still I have the above 1064 error code with this contrib. Anyone have any suggestions? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.