DKServices Posted November 4, 2011 Share Posted November 4, 2011 I want to modify the built-in category list display to include description for OSC v. 2.3.1. Right now, it only shows image, product name, price, and buy now button. I do not want to sort by description so just need to know which part of the existing code generates each line in the table. I can probably track down the variable definitions myself once I am looking at the correct files and code to make sure I get the variables correct. Link to comment Share on other sites More sharing options...
multimixer Posted November 4, 2011 Share Posted November 4, 2011 The query is in catalog/index.php The output comes from catalog/includes/modules/product_listing.php that is getting included into index.php My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
DKServices Posted November 5, 2011 Author Share Posted November 5, 2011 OK, I found where to add the information I want on lines 106 and 108 in product_listing.php as noted below: At the end of the lines I changed ...'</a></td>'; to '</a> - <i>'. $listing['products_description'] .'</i></td>'; I have to populate $listing['products_description'] so need to find where $listing['products_name'] was populated from the database and add the description. I see that $product_info_query is used in catalog/product_info.php and includes the description but need to figure it out for the category list display... Link to comment Share on other sites More sharing options...
multimixer Posted November 6, 2011 Share Posted November 6, 2011 I told you, the queries are in file index.php My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
DKServices Posted November 27, 2011 Author Share Posted November 27, 2011 I ended up adding the description by modifying the /catalog/includes/modules/product_listing.php file as I noted above but I simply added the products_description to be retrieved from the database by adding one line before line 13 of existing code: . . . $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); The code I added before that above is: . . . $pieces=explode('select ',$listing_sql);$listing_sql='select pd.products_description, '.$pieces[1]; /* Added */ This may not be the most graceful solution but it populates the $listing['products_description'] variable (I added for lines 106, 108 as noted above) maintaining the same variable name conventions without an additional database query. Basically, $listing_sql is the variable that contains the list of product information query definitions that will be extracted from the database and I simply added the products_description information (defined on line 45 of catalog/includes/database_tables.php) to the beginning of the list. Link to comment Share on other sites More sharing options...
surrfman Posted November 28, 2011 Share Posted November 28, 2011 how do we go about getting the "buy it now" button a bit smaller in size? Thanks, Timmy C Link to comment Share on other sites More sharing options...
♥kymation Posted November 28, 2011 Share Posted November 28, 2011 How to change the button size. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.