lsd_se Posted April 29, 2008 Posted April 29, 2008 I'm trying to lengthen the amount of characters allowed in my product description on the product listing page. In my product_listing.php file there is this code: $product_query = tep_db_query("select products_description, products_id from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$listing['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); $product = tep_db_fetch_array($product_query); $p_desc = substr($product['products_description'], 0, MAX_DESCR_1); $p_id = $product['products_id']; /* $list_box_contents[$cur_row][] = array('align' => $lc_align, 'params' => '', 'text' => $lc_text); */ } If I change the 0 in line 6 above, it still uses the same length of description, but offsets it (for example if I put 6, it starts the description at the 6th character. If anyone knows how to do this please let me know! Thanks!
FIMBLE Posted April 29, 2008 Posted April 29, 2008 Yes you need to change it in your database. Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
lsd_se Posted April 29, 2008 Author Posted April 29, 2008 ah, I see, I'll give it a try, thanks very much!!
lsd_se Posted April 30, 2008 Author Posted April 30, 2008 I've checked out my database, and I'm not sure this is where it is done. I need to change the product description length in the Product Listing Page not the Product Info Page. Thanks!
dmnalven Posted April 30, 2008 Posted April 30, 2008 The value of 'MAX_DESCR_1' needs to be increased as this is the length of the string that is returned from the offset, however, I find no such value in the default installation of 2.2rc2a. If there is no option to set it in your configuration panel, either contact your template supplier or mod author or change the named value definition to an integer. 1000 should give you about a screenfull. An absurdly high number will return all up to the database table definition limit of 64k. For ALL problems, please review this link first -> osCommerce Knowledge Base
lsd_se Posted May 1, 2008 Author Posted May 1, 2008 if I change the number in 'MAX_DESCR_1' to anything other then 1, no description at all is inserted. Very odd indeed.
dmnalven Posted May 2, 2008 Posted May 2, 2008 This is the problem with us attemtping to help you with an installation modified from the original. Something else is happening in code that I am not aware of. This is not the way that the 'substr' function should behave. Please see the second sentence of my previous reply. For ALL problems, please review this link first -> osCommerce Knowledge Base
lsd_se Posted May 7, 2008 Author Posted May 7, 2008 thanks dmnalven, I'll ask the template designer what is going on with the code then, thanks or all your help/ Also a word to the wise, don't buy Template Monster templates if you plan on changing anything, a lot of the coding is messed up and only leads to endless headaches.
FIMBLE Posted May 7, 2008 Posted May 7, 2008 Thats history not news!! Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
Recommended Posts
Archived
This topic is now archived and is closed to further replies.