Jump to content
creationata

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 !

Share this post


Link to post
Share on other sites

It is too old, but you can try to play with the /classes/PDF.php file, the ProdTab method, around "if (isset($customizedDatas..." code.

Share this post


Link to post
Share on other sites

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");

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More