cw75116 Posted March 16, 2011 Share Posted March 16, 2011 Bonjour à tous, La boutique est prête au lancement mais il ne me reste plus que ce petit détail..Je souhaiterai comme beaucoup je crois, pouvoir ajouter sur l'email order_conf.html de nouveaux champs de trouvant sur la table ps_message.Je sais qu'il faut modifier le fichiers classes/PaymentModule.php mais je n'y arrive pas. Le smarty me fait un peu tourner la tête !Le point de départ est à la ligne 318 : // Send an e-mail to customer if ($id_order_state != _PS_OS_ERROR_ AND $id_order_state != _PS_OS_CANCELED_ AND $customer->id) { $invoice = new Address(intval($order->id_address_invoice)); $delivery = new Address(intval($order->id_address_delivery)); $carrier = new Carrier(intval($order->id_carrier)); $delivery_state = $delivery->id_state ? new State(intval($delivery->id_state)) : false; $invoice_state = $invoice->id_state ? new State(intval($invoice->id_state)) : false; $data = array( '{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{delivery_company}' => $delivery->company, '{delivery_firstname}' => $delivery->firstname, '{delivery_lastname}' => $delivery->lastname, '{delivery_address1}' => $delivery->address1, '{delivery_address2}' => $delivery->address2, '{delivery_city}' => $delivery->city, '{delivery_postal_code}' => $delivery->postcode, '{delivery_country}' => $delivery->country, '{delivery_state}' => $delivery->id_state ? $delivery_state->name : '', '{delivery_phone}' => $delivery->phone, '{delivery_other}' => $delivery->other, '{invoice_company}' => $invoice->company, '{invoice_firstname}' => $invoice->firstname, '{invoice_lastname}' => $invoice->lastname, '{invoice_address2}' => $invoice->address2, '{invoice_address1}' => $invoice->address1, '{invoice_city}' => $invoice->city, '{invoice_postal_code}' => $invoice->postcode, '{invoice_country}' => $invoice->country, '{invoice_state}' => $invoice->id_state ? $invoice_state->name : '', '{invoice_phone}' => $invoice->phone, '{invoice_other}' => $invoice->other, '{order_name}' => sprintf("#d", intval($order->id)), '{date}' => Tools::displayDate(date('Y-m-d H:i:s'), intval($order->id_lang), 1), '{carrier}' => (strval($carrier->name) != '0' ? $carrier->name : Configuration::get('PS_SHOP_NAME')), '{payment}' => $order->payment, '{products}' => $productsList, '{discounts}' => $discountsList, '{total_paid}' => Tools::displayPrice($order->total_paid, $currency, false, false), '{total_products}' => Tools::displayPrice($order->total_paid - $order->total_shipping - $order->total_wrapping + $order->total_discounts, $currency, false, false), '{total_discounts}' => Tools::displayPrice($order->total_discounts, $currency, false, false), '{total_shipping}' => Tools::displayPrice($order->total_shipping, $currency, false, false), '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $currency, false, false)); if (is_array($extraVars)) $data = array_merge($data, $extraVars); J'aimerai ajouter un champs '{nouveauchamps}' => nouveauchamps sur la table ps_message, Quelqu'un saurait m'aider ?Merci d'avance Link to comment Share on other sites More sharing options...
Broceliande Posted March 17, 2011 Share Posted March 17, 2011 tu as essayé $messages = Message::getMessagesByOrderId($order->id_order, false); ?cela te retourne un tableau des messages concernant la commande.PS: Ici ce n'est pas smarty qui est utilisé. Link to comment Share on other sites More sharing options...
cw75116 Posted March 18, 2011 Author Share Posted March 18, 2011 Bonsoir, Merci de ta réponse, j'ai essayé mais ça m'affiche "Array"Bon au moins ça m'affiche quelque chose, c'est toujours mieux que la page blanche ... Link to comment Share on other sites More sharing options...
Broceliande Posted March 18, 2011 Share Posted March 18, 2011 Ah ben oui c'est ce que je t'ai dit : cela te retourne un tableau des messages concernant la commande. Tableau = Array()tu peux faire un foreach dessus , ou encore prendre le premier élément $messages[0]->nomduchamp , à moins que ce ne soit $messages[0]["nomduchamp"] selon le type retourné , je n'ai pas testé Link to comment Share on other sites More sharing options...
cw75116 Posted March 18, 2011 Author Share Posted March 18, 2011 Bon finalement j'ai opté pour la "facilité" j'ai mis les infos sur le compte client, et le mail reste classique, ils ont le lien pour le détail... Merci en tout cas 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