Hi,
I hope someone with good will can help me;
I added the variable {$product.url} to the order_conf_product_list.tpl file
However, the order confirmation email leaves the variable space empty, like unknow or not recognized.
Do I also have to change something in the PaymentModule.php file to make it recognized?
Thanks
below the code from an order_conf email with empy href
<td> <font size="2" face="Open-sans, sans-serif" color="#555454"> <strong><a href="" target="_blank">CALZINI ARGENTO - ED50002 - Colore: GRIGIO VANISE' - Taglia: S-35/38</a></strong> </font> </td>
It seems to me that I should declare the variable in PaymentModule.php but I don't understand where (and how).
somewhere around line 423
// 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; $product_var_tpl = [ 'id_product' => $product['id_product'], 'id_product_attribute' => $product['id_product_attribute'], 'reference' => $product['reference'], 'name' => $product['name'] . (isset($product['attributes']) ? ' - ' . $product['attributes'] : ''), 'price' => Tools::getContextLocale($this->context)->formatPrice($product_price * $product['quantity'], $this->context->currency->iso_code), 'quantity' => $product['quantity'], 'customization' => [], ];
Millethanks
Ps: (prestashop 1.7.8)