elly63 Posted October 15 Share Posted October 15 hello everyone, I'm trying to modify PaymentModule.php to have in the order confirmation email to the customer the link to the product (a href ......) throung the product name in the table. I modified PaymentModule.php (studying on the forum) from line 423 as follows (//link evidence the mods) // Construct order detail table for the email $products_list = ''; $virtual_product = true; $product_var_tpl_list = []; 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, Context::getContext()->getComputingPrecision()) : $price_wt; //link $link = $this->context->link->getProductLink($product['id_product']); // END LINK $product_var_tpl = [ 'id_product' => $product['id_product'], 'id_product_attribute' => $product['id_product_attribute'], 'reference' => $product['reference'], //name ORIGINAL 'name' => $product['name'] . (isset($product['attributes']) ? ' - ' . $product['attributes'] : ''), //link 'name' => '<a href='.$link.'>'.$product['name'].(isset($product['attributes']) ? ' - '.$product['attributes'] : '').'</a>', //end link 'price' => Tools::getContextLocale($this->context)->formatPrice($product_price * $product['quantity'], $this->context->currency->iso_code), 'quantity' => $product['quantity'], 'customization' => [], ]; but the result is the following: in the confirmation email the html code is shown as text and does not work as a href tag. and the html is <font size="2" face="Open-sans, sans-serif" color="#555454"> <strong><a href=https://www.sensiline-shop.it/online/calzini/8-calzini-leggeri-ed50011.html>CALZINI LEGGERI - ED50011 - Colore: BIANCO - Taglia: S-35/38</a></strong> </font> Can someone help me? Thanks in advance 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