cedazzaro Posted November 17, 2020 Share Posted November 17, 2020 Version 1.7.6.8 Bonjour, Je cherche à permettre à mes clients de cliquer sur le nom des produits depuis la confirmation de commande qu'ils reçoivent après leur paiement. Après des recherches, il apparaît que les éléments sont générés depuis "PaymentModule.php" qui se trouve dans le dossier classes Je pense que la partie qui génère les informations du mail est ici... Mais comment ajouter ce lien cliquable? Merci // Insert new Order detail list using cart for the current order //$orderDetail = new OrderDetail(null, null, $this->context); //$orderDetail->createList($order, $this->context->cart, $id_order_state); // Construct order detail table for the email $products_list = ''; $virtual_product = true; $product_var_tpl_list = array(); foreach ($order->product_list as $product) { $price = Product::getPriceStatic((int) $product['id_product'], false, ($product['id_product_attribute'] ? (int) $product['id_product_attribute'] : null), 6, null, false, true, $product['cart_quantity'], false, (int) $order->id_customer, (int) $order->id_cart, (int) $order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}, $specific_price, true, true, null, true, $product['id_customization']); $price_wt = Product::getPriceStatic((int) $product['id_product'], true, ($product['id_product_attribute'] ? (int) $product['id_product_attribute'] : null), 2, null, false, true, $product['cart_quantity'], false, (int) $order->id_customer, (int) $order->id_cart, (int) $order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}, $specific_price, true, true, null, true, $product['id_customization']); $product_price = Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt; $product_var_tpl = array( 'id_product' => $product['id_product'], 'reference' => $product['reference'], 'name' => $product['name'] . (isset($product['attributes']) ? ' - ' . $product['attributes'] : ''), 'price' => Tools::displayPrice($product_price * $product['quantity'], $this->context->currency, false), 'quantity' => $product['quantity'], 'customization' => array(), ); if (isset($product['price']) && $product['price']) { $product_var_tpl['unit_price'] = Tools::displayPrice($product_price, $this->context->currency, false); $product_var_tpl['unit_price_full'] = Tools::displayPrice($product_price, $this->context->currency, false) . ' ' . $product['unity']; } else { $product_var_tpl['unit_price'] = $product_var_tpl['unit_price_full'] = ''; } $customized_datas = Product::getAllCustomizedDatas((int) $order->id_cart, null, true, null, (int) $product['id_customization']); if (isset($customized_datas[$product['id_product']][$product['id_product_attribute']])) { $product_var_tpl['customization'] = array(); foreach ($customized_datas[$product['id_product']][$product['id_product_attribute']][$order->id_address_delivery] as $customization) { $customization_text = ''; if (isset($customization['datas'][Product::CUSTOMIZE_TEXTFIELD])) { foreach ($customization['datas'][Product::CUSTOMIZE_TEXTFIELD] as $text) { $customization_text .= '<strong>' . $text['name'] . '</strong>: ' . $text['value'] . '<br />'; } } if (isset($customization['datas'][Product::CUSTOMIZE_FILE])) { $customization_text .= $this->trans('%d image(s)', array(count($customization['datas'][Product::CUSTOMIZE_FILE])), 'Admin.Payment.Notification') . '<br />'; } $customization_quantity = (int) $customization['quantity']; $product_var_tpl['customization'][] = array( 'customization_text' => $customization_text, 'customization_quantity' => $customization_quantity, 'quantity' => Tools::displayPrice($customization_quantity * $product_price, $this->context->currency, false), ); } } $product_var_tpl_list[] = $product_var_tpl; // Check if is not a virutal product for the displaying of shipping if (!$product['is_virtual']) { $virtual_product &= false; } } // end foreach ($products) Link to comment Share on other sites More sharing options...
cedazzaro Posted November 17, 2020 Author Share Posted November 17, 2020 Ici il y avait une piste mais j'ai tenté toutes les modifications proposées sans succès, particulièrement la dernière qui génère une erreur 500 lors de la commande. Je sèche complétement. 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