stampy Posted July 22, 2008 Share Posted July 22, 2008 HiI've got a few products where I am not able to add all the info I need to because it errors because the description is too big.Does anyone know how to increase the size of this?Thanks in advance.Stampy Link to comment Share on other sites More sharing options...
stampy Posted July 23, 2008 Author Share Posted July 23, 2008 Anyone at all able to help? Link to comment Share on other sites More sharing options...
gra Posted July 23, 2008 Share Posted July 23, 2008 You need to change the size of the field length checked. Do a search in files of the prestashop for short_description and you'll find the right place. Let me know if you can't find it and I'll search for the correct place for you. Can't do it right now however.- Graham Link to comment Share on other sites More sharing options...
stampy Posted July 23, 2008 Author Share Posted July 23, 2008 Thanks Graham, much appreciated.Is this the correct section (it was in Global CSS)?primary_block p.buttons_bottom_block{ margin:0; }#primary_block p.buttons_bottom_block a, #primary_block p.buttons_bottom_block input { margin:0.9em auto 0 auto; }#primary_block #short_description_content{ margin-bottom:0.5em; }#primary_block form#buy_block{ background: #f1f2f4 url('../img/product-buy-bg.gif') repeat-x top left; font-size:1.1em; padding:0.7em; color:#374853; border: 1px #d0d3d8 solid; Link to comment Share on other sites More sharing options...
stampy Posted July 23, 2008 Author Share Posted July 23, 2008 Hi Sorry to bump this again, but I've only got a few more products to add to my site, and I need this to do it!Can anyone confirm whether the above place is the right place to make the desription box bigger, and if so, how do I do it?Thanks in advance.Stampy Link to comment Share on other sites More sharing options...
shake Posted July 23, 2008 Share Posted July 23, 2008 /admin/tabs/Adminproducts.php /* Check description short size without html */ foreach ($languages AS $language) if ($value = Tools::getValue('description_short_'.$language['id_lang'])) 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)).')'; /* Check multilingual fields sizes */ foreach ($rules['sizeLang'] AS $fieldLang => $maxLength) foreach ($languages AS $language) if ($value = Tools::getValue($fieldLang.'_'.$language['id_lang']) AND Tools::strlen($value) > $maxLength) $this->_errors[] = $this->l('the field').' '.call_user_func(array($className, 'displayFieldName'), $fieldLang, $className).' ('.$language['name'].') '.$this->l('is too long').' ('.$maxLength.' '.$this->l('chars max').')'; if (isset($_POST['description_short'])) $_POST['description_short'] = $saveShort; i'm guessing you'll just have to change the values from 400 (not tested so backup the file first then have a play ) Link to comment Share on other sites More sharing options...
stampy Posted July 23, 2008 Author Share Posted July 23, 2008 Thanks Shake, very helpful, looks like I'm almost there!It's not actually the short description I'm trying to extent, it's the main one. Would that be this? <textarea cols="65" rows="20" id="description_'.$language['id_lang'].'" name="description_'.$language['id_lang'].'">'.htmlentities(stripslashes($this->getFieldValue($obj, 'description', $language['id_lang'])), ENT_COMPAT, 'UTF-8').'</textarea>'; $this->displayFlags($languages, $defaultLanguage, $divLangName, 'cdesc'); echo ''; echo ''.$this->l('Tags:').''; foreach ($languages as $language)And if so, which bit would I need to change? Thanks again. Link to comment Share on other sites More sharing options...
shake Posted July 23, 2008 Share Posted July 23, 2008 no that bit is really just the area size on the admin page, are you pasting in a lot of code? (save the description into a text file or something, just to see what sort of size description your talking abouthave you tried changing:protected $maxFileSize = 10000000;edit (re read your post ): could be .htmlentities(stripslashes($this->getFieldValue($obj, ‘description’, $language[‘id_lang’])), ENT_COMPAT, ‘UTF-8’).i'll have a browse through a few files see if i can see anything Link to comment Share on other sites More sharing options...
shake Posted July 23, 2008 Share Posted July 23, 2008 i've just added a repeated text line when adding a product on, totalled about 65kb of just text and it added the product with no probs, can you upload the description in html format that your trying to add, will see if it works on mine then, also is there an error that appears for the description bit? Link to comment Share on other sites More sharing options...
stampy Posted July 23, 2008 Author Share Posted July 23, 2008 Thanks for your help Shake, really appreciate it.I've added the text as a notepad attachment to the post. I assume it's the amount of text because if I delete a good chunk of it it works.I get a "1 error an error occured while updating product object" message when I try and do the full text.It's not HTML because it doesn't need to be pasting into the description box.Hope that makes sense! shake.txt Link to comment Share on other sites More sharing options...
shake Posted July 23, 2008 Share Posted July 23, 2008 ahh, i think it's the disallowed words error"triggers" is causing it i think GAMEPAD: Saitek P2900 Wireless Pad - Low power consumption, just 1 AA battery for up to 50 hours gameplay - Saitek Smart Technology software for advanced programming - 4 quick-fire shoulder triggers - 8-way D-pad - 6 responsive buttons - 2 analog joysticks with built-in buttons - FPS gaming button - Battery life indicator - USB connectivity take out triggers briefly and see if that updates ok Link to comment Share on other sites More sharing options...
shake Posted July 23, 2008 Share Posted July 23, 2008 http://www.prestashop.com/forums/viewthread/2586/ Link to comment Share on other sites More sharing options...
stampy Posted July 23, 2008 Author Share Posted July 23, 2008 Aaaaaaaaah - I was barking up the wrong tree completely!I replaced the word trigger with button, and it works fine.You're an absolute star Shake, thank you so much. Link to comment Share on other sites More sharing options...
Recommended Posts