pette Posted June 28, 2015 Share Posted June 28, 2015 Hi, I'm using prestashop 1.6.0.14 I want to add the product link in the order confirmation for customer. How can I? In the admin email the link there is, but in the customer confirmation there isn't Thanks Link to comment Share on other sites More sharing options...
tuk66 Posted June 29, 2015 Share Posted June 29, 2015 See how links work in /mail/en/*.html templates and try to imitate it. Link to comment Share on other sites More sharing options...
pette Posted June 29, 2015 Author Share Posted June 29, 2015 Hi, there isn't the product url in the template Link to comment Share on other sites More sharing options...
tuk66 Posted June 29, 2015 Share Posted June 29, 2015 There are product data in the order_conf_product_list.tpl template. Those data are stored in the $product_var_tpl_list array in the /classes/PaymentModule.php file. Add the link there. Link to comment Share on other sites More sharing options...
pette Posted June 29, 2015 Author Share Posted June 29, 2015 Hi, but in the /classes/PaymentModule.php file there isn't the product link. how can I add it? Thanks Link to comment Share on other sites More sharing options...
pette Posted July 5, 2015 Author Share Posted July 5, 2015 There are product data in the order_conf_product_list.tpl template. Those data are stored in the $product_var_tpl_list array in the /classes/PaymentModule.php file. Add the link there. Hi, how can I add the url? thanks Link to comment Share on other sites More sharing options...
levout Posted March 17, 2016 Share Posted March 17, 2016 In 1.6.0.8 in Classes/PaymentModule.php: $link = $this->context->link->getProductLink($product['id_product']); 'name' =>'<a href="'.$link.'">'.$product['name'].(isset($product['attributes']) ? ' - '.$product['attributes'] : '').'</a>', After this, in confirmation mail to customer by bankwire the name of product is a link to the product. For me works... Link to comment Share on other sites More sharing options...
pette Posted January 25, 2018 Author Share Posted January 25, 2018 Hi, it doesn't work Link to comment Share on other sites More sharing options...
pette Posted January 25, 2018 Author Share Posted January 25, 2018 I try to add in /Classes/PaymentModule.php $product_var_tpl = array( 'reference' => $product['reference'], 'name' => $product['name'].(isset($product['attributes']) ? ' - '.$product['attributes'] : ''), 'unit_price' => Tools::displayPrice($product_price, $this->context->currency, false), // begin 'id_product_url' => $link->getProductLink($product['id_product']), 'product_url' => $this->context->link->getProductLink($product['id_product']), // END 'price' => Tools::displayPrice($product_price * $product['quantity'], $this->context->currency, false), 'quantity' => $product['quantity'], 'customization' => array() ); but if in order_conf_product_list.tpl I add {$product['product_url']} there is an error thanks Link to comment Share on other sites More sharing options...
Caleydon Posted June 20, 2018 Share Posted June 20, 2018 Open /classes/PaymentModule.php file and find 'name' template variable: 'name' => $product['name'].(isset($product['attributes']) ? ' - '.$product['attributes'] : ''), and replace by: 'name' => '<a href="'.$this->context->link->getProductLink($product['id_product']).'">'.$product['name'].(isset($product['attributes']) ? ' - '.$product['attributes'] : '').'</a>', Tested on PS 1.6.1.x 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