Jump to content

How to get customized text with rows?


Recommended Posts

Hi,

I'm using prestashop 1.7.4.3.
When a customer buys a customized product, with their text on it, is there a way I can receive their text exactly as they wrote it? Either in the BO when clicking in on the order or with the email I get when a new order is placed? Best would be if it could be done for the order confirmation email sent to the customer as well.

Like this:
John Smith
123 Main Street
New York, NY 12345

instead of:
John Smith 123 Main Street New York, NY 12345

Edited by Jenetic (see edit history)
Link to comment
Share on other sites

There is, but it involves changing the templates.
For the back office, in the admin folder, themes\default\template\controllers\orders
_customized_data.tpl

You have to find $type == Product::CUSTOMIZE_TEXTFIELD
And below that add |nl2br to $data['value'], like

$data['value']|nl2br

Link to comment
Share on other sites

43 minutes ago, NemoPS said:

There is, but it involves changing the templates.
For the back office, in the admin folder, themes\default\template\controllers\orders
_customized_data.tpl

You have to find $type == Product::CUSTOMIZE_TEXTFIELD
And below that add |nl2br to $data['value'], like

$data['value']|nl2br

Works perfectly! 😍 Thank you so much Nemo!! Do you know how to make that change to the order confirmation email and also for the customization preview popup box in the cart?

Thanks again!
 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...