Jump to content

Problème écriture personnalisation dans le panier et la facture


Recommended Posts

Bonjour,

 

J'ai un petit soucis concernant la transmission de la personnalisation du produit :

 

Par exemple lors qu'enregistre le texte

Sur son petit nuage

un ange à fait rencontrer

Laetitia et Franck,

qui aujourd'hui

Vous invitent à fêter

"Le fruit de leur Amour"...

 

Cela me donne dans mon panier le texte :

 

Sur son petit nuage

un ange à fait rencontrer

Laetitia et Franck,

qui aujourd\'hui

Vous invitent à fêter

\"Le fruit de leur Amour\"...

 

Et dans la facture pdf :

 

Sur son petit nuage <br />un ange à fait rencontrer<br

/>Laetitia et Franck,<br />qui aujourd\'hui <br />Vous invitent à fêter<br />\"Le

fruit de leur Amour\"<br />

 

Pouvez vous me dire comment enlever les \ et <br /> qui se rajoutent ?

 

Merci d'avance !

Link to comment
Share on other sites

  • 3 years later...

So, for the bashslash before each apostrophe, i wrote "SetEnv MAGIC_QUOTES 0" in my .htaccess

 

But for invoice pdf, i still have <br /> for each return line

 

I guess it is somewhere here, i have to modify  "\n" but which one... :


if (isset($customizedDatas[$product['product_id']][$product['product_attribute_id']]))

                                                           {

                                                                          $custoLabel = '';

                                                                         

                                                                          foreach($customizedDatas[$product['product_id']][$product['product_attribute_id']] as $customizedData)

                                                                          {

                                                                                         $customizationGroup = $customizedData['datas'];

                                                                                         $nb_images = 0;

                                                                                        

                                                                                         if (array_key_exists(_CUSTOMIZE_FILE_, $customizationGroup))

                                                                                                       $nb_images = sizeof($customizationGroup[_CUSTOMIZE_FILE_]);

 

                                                                                         if (array_key_exists(_CUSTOMIZE_TEXTFIELD_, $customizationGroup))

                                                                                                        foreach($customizationGroup[_CUSTOMIZE_TEXTFIELD_] as $customization)

                                                                                                                      if(!empty($customization['name'])) $custoLabel .= '- '.$customization['name'].': '.$customization['value']."\n";

                                                                                                                     

                                                                                        

                                                                                         if ($nb_images > 0)

                                                                                                       $custoLabel .= '- '.$nb_images. ' '. self::l('image(s)')."\n";

                                                                                                      

                                                                                         $custoLabel .= "---\n";

                                                                          }

                                                                         

                                                                          $custoLabel = rtrim($custoLabel, "---\n");

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...