IBICO Posted October 27, 2010 Share Posted October 27, 2010 Is it possible to set a default text that would be when I create a product.. I am soo tired of writing each of these texts in 4 different languages when they are supposed to be exactly the same on all products.So are there any hidden buttons I have not seen yet? or maybe some place in php, tpl, sql I could do some editing after or before?Displayed text when in-stock:Displayed text when allowed to be back-ordered:When out of stock:Same is when adding pictures or video on a product. why can`t they just copy themselves like the text for a product when I create them?.. Could I also there edit something in a php,tpl,sql to make this happen? Link to comment Share on other sites More sharing options...
rocky Posted October 27, 2010 Share Posted October 27, 2010 You could edit admin/tabs/AdminProducts.php and set up a default value in the text field. It is the following code on lines 1798-1819 that you would need to change: '.$this->l('Displayed text when in-stock:').' '; foreach ($this->_languages as $language) echo ' <input size="30" type="text" id="available_now_'.$language['id_lang'].'" name="available_now_'.$language['id_lang'].'" value="'.stripslashes(htmlentities($this->getFieldValue($obj, 'available_now', $language['id_lang']), ENT_COMPAT, 'UTF-8')).'" /> '.$this->l('Forbidden characters:').' <>;=#{} '; echo ' '.$this->l('Displayed text when allowed to be back-ordered:').' '; foreach ($this->_languages as $language) echo ' <input size="30" type="text" id="available_later_'.$language['id_lang'].'" name="available_later_'.$language['id_lang'].'" value="'.stripslashes(htmlentities($this->getFieldValue($obj, 'available_later', $language['id_lang']), ENT_COMPAT, 'UTF-8')).'" /> '.$this->l('Forbidden characters:').' <>;=#{} '; echo ' to something like: '.$this->l('Displayed text when in-stock:').' '; foreach ($this->_languages as $language) echo ' <input size="30" type="text" id="available_now_'.$language['id_lang'].'" name="available_now_'.$language['id_lang'].'" value="'.(stripslashes(htmlentities($this->getFieldValue($obj, 'available_now', $language['id_lang']), ENT_COMPAT, 'UTF-8')) == '' ? 'Default in-stock text' :stripslashes(htmlentities($this->getFieldValue($obj, 'available_now', $language['id_lang']), ENT_COMPAT, 'UTF-8'))) .'" /> '.$this->l('Forbidden characters:').' <>;=#{} '; echo ' '.$this->l('Displayed text when allowed to be back-ordered:').' '; foreach ($this->_languages as $language) echo ' <input size="30" type="text" id="available_later_'.$language['id_lang'].'" name="available_later_'.$language['id_lang'].'" value="'.(stripslashes(htmlentities($this->getFieldValue($obj, 'available_later', $language['id_lang']), ENT_COMPAT, 'UTF-8')) == '' ? 'Default back-ordered text' : stripslashes(htmlentities($this->getFieldValue($obj, 'available_later', $language['id_lang']), ENT_COMPAT, 'UTF-8'))).'" /> '.$this->l('Forbidden characters:').' <>;=#{} '; echo ' Change 'Default in-stock text' and 'Default back-ordered text' to the default text you want in those fields. 1 Link to comment Share on other sites More sharing options...
IBICO Posted October 29, 2010 Author Share Posted October 29, 2010 hmm.. Would it be possible to make it pull the text from external files that are named instock_en / outofstock_en.php or .xml ??That way I could have one for each language and get a default text.Is it also possible to have it pull with it all text/media to all languages that is from Short description: and Description: when making a new product?.. just like it does for Name: Supplier Reference: and other.This would make it easy to make the products first, and then start translate each product after. This is because I get external people translate after I mad the product.what I need to do today is to copy/paste for each description field when making a new product. Link to comment Share on other sites More sharing options...
IBICO Posted November 5, 2010 Author Share Posted November 5, 2010 Not possible to pull in external text like that? Link to comment Share on other sites More sharing options...
rocky Posted November 5, 2010 Share Posted November 5, 2010 Just about anything's possible, but this isn't an easy thing to do. I don't have time to come up with a solution. 1 Link to comment Share on other sites More sharing options...
kjetil Posted August 6, 2011 Share Posted August 6, 2011 This dont work more..? Link to comment Share on other sites More sharing options...
davers44 Posted February 25, 2012 Share Posted February 25, 2012 This is really what I am looking for, but your text doesn't work anymore on 1.4 Hope someone can help Link to comment Share on other sites More sharing options...
von Papst Posted July 26, 2013 Share Posted July 26, 2013 I have the same problem. Is there someone that has corrected this in 1.5? I'm really getting frustrated to write this for all my product? It's really pain in the ass to do this manually! Link to comment Share on other sites More sharing options...
vekia Posted July 26, 2013 Share Posted July 26, 2013 check this thread: http://www.prestashop.com/forums/index.php?/topic/257380-solved-product-page-in-stock-is-not-translated/page__view__findpost__p__1311507 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now