Jump to content

[SOLVED] Adding Manufacturers and Supplier Info to Product Page


Recommended Posts

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)).')';

  • Like 1
Link to comment
Share on other sites

  • 5 months later...

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

  • 1 year later...
×
×
  • Create New...