rgauci Posted June 15, 2009 Share Posted June 15, 2009 In the customization I need to widen the box of the Text Field because I would like the client to put some comments in it.I have tried the product.tpl file but could not sort it outany clues where to enlarge the Text box width and height? Link to comment Share on other sites More sharing options...
rgauci Posted June 16, 2009 Author Share Posted June 16, 2009 Can anyone help me how to enlarge the size of teh Customization Text Box that I have created for customers to put some comments and save them? Link to comment Share on other sites More sharing options...
rgauci Posted June 17, 2009 Author Share Posted June 17, 2009 I hope this time someone will tell me how to enlarge the Text box as I am enclosing an image Link to comment Share on other sites More sharing options...
rocky Posted June 18, 2009 Share Posted June 18, 2009 Hi rgauci,The customizable text field was only designed to handle a short message up to 255 characters. It is not designed for customers to enter comments. There is a text area on the third (address) step when checking out for customer comments.If you wanted to do this, you would need to modify the database field value in ps_customized_data, changing the type from varchar(255) to text. You would then need to change the customizable text fields in product.tpl in your theme directory to text areas. For example: <input type="text" name="textField{$field.id_customization_field}" id="textField{$customizationField}" value="{if isset($textFields.$key)}{$textFields.$key|stripslashes}{/if}" class="customization_block_input" /> to something like: <textarea name="textField{$field.id_customization_field}" id="textField{$customizationField}" class="customization_block_input">{if isset($textFields.$key)}{$textFields.$key|stripslashes}{/if}</textarea> Note that I haven't tested this code.Rocky Link to comment Share on other sites More sharing options...
rgauci Posted June 18, 2009 Author Share Posted June 18, 2009 Thanks RockyIt worked perfectly. Exactly what I wanted.....I just added rows="6" cols="85" before the class="customization_block_input" just to make it a little bit wider similar to the Comments box of the contact formmany thanks again Link to comment Share on other sites More sharing options...
caparuni Posted June 1, 2010 Share Posted June 1, 2010 Hi rgauci,--- deleted --- hi rocky... ive try this trick but theres some problemwhen user submit data from textarea the script will stripslashes the data, this will cause a problem to end-of-line.after the page refreshed all end-of-line will become rn if you using windows or nif submitinghello world after the page refreshed will become hellornworld ok ive try to trace the problem ive found out that addTextFieldToProduct on Cart.php handle this public function addTextFieldToProduct($id_product, $index, $textValue) { global $cookie; $cookie->{'textFields_'.intval($id_product).'_'.intval($index)} = pSQL($textValue); return true; } ive try to remove pSQL() function public function addTextFieldToProduct($id_product, $index, $textValue) { global $cookie; $cookie->{'textFields_'.intval($id_product).'_'.intval($index)} = $textValue; return true; } well this is work, all end-of-line didnt get stripslashesbut now a now an error comes up (pop-up) when click add to cart button. the error message on snapshootbtw even there is an error popup comes the product will go to cart after we reload or go to cart detailyou can try it @ http://kartunama.biz/anyone can help me out... ty Link to comment Share on other sites More sharing options...
shacker Posted November 25, 2010 Share Posted November 25, 2010 you have solved it? Link to comment Share on other sites More sharing options...
popo559 Posted December 10, 2010 Share Posted December 10, 2010 you have solved it? caparuni Link to comment Share on other sites More sharing options...
stefanosm Posted December 18, 2010 Share Posted December 18, 2010 hi! i am also interested in this to be solved Link to comment Share on other sites More sharing options...
shacker Posted December 18, 2010 Share Posted December 18, 2010 Change line 38 and 39 of modules/blockcart/blockcart-json.tpl'value': '{$data.value|addslashes|replace:"\r\n":''}','truncatedValue': '{$data.value|truncate:28|addslashes|replace:"\r\n":''}' Link to comment Share on other sites More sharing options...
stefanosm Posted December 20, 2010 Share Posted December 20, 2010 thanks! everything is fine now! i only need to combine the save button with the add to cart one and to move the textarea above the add to cart button.i hope i will find a solution. anyway, thanks! 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