Jump to content

Add product link in order_conf.html


Recommended Posts

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

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

  • 8 months later...

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

  • 1 year later...

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

  • 4 months later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...