lowriderchris Posted August 14, 2010 Share Posted August 14, 2010 last question this week I promise!we sell personalised embroidered baby gifts and id like customers to leave there personalisation details at the checkout in the comments box at the moment the commnets box saysIf you want to leave us comment about your order, please write it belowbut I want to change that to something more suitable for personalised products likeplease leave all you personalisation details here thread colour ect.where will I find that text to edit it?many many thanks Chris Link to comment Share on other sites More sharing options...
rocky Posted August 15, 2010 Share Posted August 15, 2010 You can go to Tools > Translations > Front office translations > "prestashop - order-address" section to change that text, though it sounds like in your case, it would be better to enable the customisation options on the individual products. For example, you can go to the "5. Customization" tab of the product editor and add a text field that lets customers enter the text they want to appear on your product. You can add a file field if you want customers to be able to upload an image to personalise your product. You could also add a "Thread colour" attribute to the product that lets customers choose which colour they want from the product page. Link to comment Share on other sites More sharing options...
lowriderchris Posted August 15, 2010 Author Share Posted August 15, 2010 Thankyou rocky, ive tried the customisation field but dont like where it puts it and the fact the customer has to save it before they can add stuff to the cart, is there any way of making the comments box at the checkout a required field that way it would be perfect if it made the customer write something in there atleast Link to comment Share on other sites More sharing options...
rocky Posted August 16, 2010 Share Posted August 16, 2010 It can't be done without modifying code, which is why I suggested using the features already in PrestaShop. To make the order message field required, change lines 184-202 order.php (in PrestaShop v1.3.1) from: if (Tools::isSubmit('message') AND !empty($_POST['message'])) { if (!Validate::isMessage($_POST['message'])) $errors[] = Tools::displayError('invalid message'); elseif ($oldMessage = Message::getMessageByCartId(intval($cart->id))) { $message = new Message(intval($oldMessage['id_message'])); $message->message = htmlentities($_POST['message'], ENT_COMPAT, 'UTF-8'); $message->update(); } else { $message = new Message(); $message->message = htmlentities($_POST['message'], ENT_COMPAT, 'UTF-8'); $message->id_cart = intval($cart->id); $message->id_customer = intval($cart->id_customer); $message->add(); } } to: if (Tools::isSubmit('message') AND !empty($_POST['message'])) { if (!Validate::isMessage($_POST['message'])) $errors[] = Tools::displayError('invalid message'); elseif ($oldMessage = Message::getMessageByCartId(intval($cart->id))) { $message = new Message(intval($oldMessage['id_message'])); $message->message = htmlentities($_POST['message'], ENT_COMPAT, 'UTF-8'); $message->update(); } else { $message = new Message(); $message->message = htmlentities($_POST['message'], ENT_COMPAT, 'UTF-8'); $message->id_cart = intval($cart->id); $message->id_customer = intval($cart->id_customer); $message->add(); } } else $errors[] = Tools::displayError('Please enter personalisation information'); This will display the error message "Please enter personalisation information" if the order message field is left blank.You can go to Tools > Translations > Front Office translations > "prestashop - order-address" to change the label of the order message field. Link to comment Share on other sites More sharing options...
outlet.ee Posted November 6, 2010 Share Posted November 6, 2010 Is there a way to have the customization answers other than text, like check-boxes and radio buttons etc? I am doing a shop selling just one product so I could perhaps hard-code them in the product.tpl, but will they passed on to the cart and later to the order? Any help greatly appereciated! Link to comment Share on other sites More sharing options...
Gerd1704 Posted March 5, 2015 Share Posted March 5, 2015 hi Rocky, It can't be done without modifying code, which is why I suggested using the features already in PrestaShop. To make the order message field required, change lines 184-202 order.php (in PrestaShop v1.3.1) from...... Where whould I find the file in Prestashop 1.5.4.1 ? I did not find the file to do the changes... Thanks in advance for your answer. Gerd 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