wyzzkid Posted May 20, 2008 Posted May 20, 2008 hi, I wish to add the product info description (or part of it) under the product name my experimentation didnt work, and I searched but did not find what I needed, so I would appreciate some help the list should look like: model# item ... image desc adding the <br> was easy :) but so far all I can get for the description is: 1165 Helmold Bender http://www.MYSTORESURL.com/catalog/product_info.php?cPath=61_113&products_id=192"> which means that I have something wrong,, any ideas ? I tried adding: . <br> . stripslashes($listing['products_description']) . '</a> '; and then tried: . <br> . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . stripslashes($listing['products_description']) . ' '; thanx for any help, in advance :)
dmnalven Posted May 20, 2008 Posted May 20, 2008 Does $listing['products_description'] exist? You do not explain what file you are looking to modify, where and the associated query, but the product description is stored in a table separate from other products data. For ALL problems, please review this link first -> osCommerce Knowledge Base
wyzzkid Posted May 20, 2008 Author Posted May 20, 2008 hi, thanx for your quick reply; I was modifying catalog/includes/modules/product_listing.php (I've never done anything like this before, and am still pouring through the php and mysql manuals, while trying to understand everything, and help someone else along the way.) I tried to use addons.oscommerce.com/info/5421 as a guideline, but so many things are referenced in other files, that it is still awkward for me; but I do learn quickly, appreciate help, and return help whenever I can :) if it is not too much trouble, would you be able to provide the query to the data in the other table? thanx in advance
dmnalven Posted May 20, 2008 Posted May 20, 2008 Why make it two queries? Either point me to the location in product_listing.php where you would like to generate the html or post the query that you are using that populates $listing. For ALL problems, please review this link first -> osCommerce Knowledge Base
wyzzkid Posted May 20, 2008 Author Posted May 20, 2008 thanx, (line numbers refer to the original file) first, around line 38: I didnt know if I needed an extra column, since I want both displayed under the one column case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; break; // wyzz: adding TABLE_PRODUCTS_DESCRIPTION - do I need this here ? case 'PRODUCT_LIST_DESCRIPTION': $lc_text = TABLE_HEADING_DESCRIPTION; $lc_align = ''; break; // second, around line 95: 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>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> '; } break; I tried adding the code just after the '</a> before the closing '; I also tried as a separate case label what I dont see, and I guess is part of my confusion; is where the query gets built to pull the information to display thanx again
dmnalven Posted May 21, 2008 Posted May 21, 2008 Whoa. Where did that come from? Anyway... It appears that the query you want to modify is in index.php . Starting at about line #175 there are 4 queries in a control structure. I am not able to determine your conditions, but you need to add pd.products_description to one of them. Near the beginning, after $select_column_list is called and within the double quote mark should be fine. The first switch structure sets up the table heading and the second the content. $listing['products_description'] should have contents at this point. For ALL problems, please review this link first -> osCommerce Knowledge Base
Recommended Posts
Archived
This topic is now archived and is closed to further replies.