Street Lit Books Posted May 24, 2010 Share Posted May 24, 2010 1. How do I add the manufacturer and supplier info to the product page?also2. Is there a way to increase the short description from 400 characters to 500? Link to comment Share on other sites More sharing options...
rocky Posted May 24, 2010 Share Posted May 24, 2010 Which manufacturer information did you want on the product page? The name only or the description too?To increase the maximum size of the short description field from 400 to 500 characters, change lines 401-405 of classes/Product.php from: if (Tools::strlen(strip_tags($value)) > 400) { if ($die) die (Tools::displayError().' ('.get_class($this).'->description: length > 400 for language '.$k.')'); return $errorReturn ? get_class($this).'->'.Tools::displayError('description: length > 400 for language').' '.$k : false; } to: if (Tools::strlen(strip_tags($value)) > 500) { if ($die) die (Tools::displayError().' ('.get_class($this).'->description: length > 500 for language '.$k.')'); return $errorReturn ? get_class($this).'->'.Tools::displayError('description: length > 500 for language').' '.$k : false; } and lines 719-720 of admin/tabs/AdminProducts.php from: if (Tools::strlen(strip_tags($value)) > 400) $this->_errors[] = $this->l('the field').' '.call_user_func(array($className, 'displayFieldName'), 'description_short').' ('.$language['name'].') '.$this->l('is too long').' : 400 '.$this->l('chars max').' ('.$this->l('count now').' '.Tools::strlen(strip_tags($value)).')'; to: if (Tools::strlen(strip_tags($value)) > 500) $this->_errors[] = $this->l('the field').' '.call_user_func(array($className, 'displayFieldName'), 'description_short').' ('.$language['name'].') '.$this->l('is too long').' : 500 '.$this->l('chars max').' ('.$this->l('count now').' '.Tools::strlen(strip_tags($value)).')'; 1 Link to comment Share on other sites More sharing options...
Street Lit Books Posted May 24, 2010 Author Share Posted May 24, 2010 Wow.. thanks a lot.. it's appreciated?As for the manufacturer and supplier info.... I only need the names... Link to comment Share on other sites More sharing options...
rocky Posted May 24, 2010 Share Posted May 24, 2010 Use {$product->manufacturer_name} and {$product->supplier_name} wherever you want in product.tpl in your theme's directory to display the manufacturer and supplier name. Link to comment Share on other sites More sharing options...
Street Lit Books Posted May 24, 2010 Author Share Posted May 24, 2010 Thanks a lot.. worked perfectly! Link to comment Share on other sites More sharing options...
rocky Posted May 24, 2010 Share Posted May 24, 2010 If your issues are resolved, please edit your first post and add [sOLVED] to the front of the title. Link to comment Share on other sites More sharing options...
Kalastudio Posted November 19, 2010 Share Posted November 19, 2010 Hi Rocky, I try to display the Manufacturer name with your code in my product-list.tpl, but this does not work for me.May you please tell if there is a way to display Manufacturer Name and Reference Value in product-list.tpl...?Thanks a lot..!! Link to comment Share on other sites More sharing options...
rocky Posted November 19, 2010 Share Posted November 19, 2010 What version of PrestaShop are you using? The code $product.manufacturer_name and $product.reference should work in the foreach loop in product-list.tpl. Older versions of PrestaShop might not include those variables. Link to comment Share on other sites More sharing options...
Kalastudio Posted November 19, 2010 Share Posted November 19, 2010 the last one version... do you think this new code works with this...? Link to comment Share on other sites More sharing options...
rocky Posted November 19, 2010 Share Posted November 19, 2010 If you are using v1.3.2, then it should work. Note that the syntax is different though. In product.tpl, you must use {$product->manufacturer_name} and {$product->reference} but in product-list.tpl you must use {$product.manufacturer_name} and {$product.reference} Link to comment Share on other sites More sharing options...
Kalastudio Posted November 19, 2010 Share Posted November 19, 2010 thankyou..!!! works 100%you are the master... no dude..about Link to comment Share on other sites More sharing options...
LeGhe Posted December 12, 2011 Share Posted December 12, 2011 Wow.. thanks a lot.. it's appreciated? As for the manufacturer and supplier info.... I only need the names... Hi, And if I want to add the supplier description ? Link to comment Share on other sites More sharing options...
Recommended Posts