ThisSmart Posted January 18, 2018 Share Posted January 18, 2018 (edited) Good afternoon! I have e-mails from Mail alerts module, but in e-mails links are only to products, not to atribute (if product have atributes). How to edit file mailalerts.php to have links to product's atributes from Mail alerts e-mails? I found this code in mailalerts.php: $items_table = ''; foreach ($order_return_products as $key => $product) { $url = $context->link->getProductLink($product['product_id']); $items_table .= '<tr style="background-color:'.($key % 2 ? '#DDE2E6' : '#EBECEE').';"> <td style="padding:0.6em 0.4em;">'.$product['product_reference'].'</td> <td style="padding:0.6em 0.4em;"> <strong><a href="'.$url.'">'.$product['product_name'].'</a> </strong> </td> <td style="padding:0.6em 0.4em; text-align:center;">'.(int)$product['product_quantity'].'</td> </tr>'; } I see, that it is link to product $url = $context->link->getProductLink($product['product_id']); How to create a condition to make a link to atribute, if it is not only product, but product's atribute? Edited January 18, 2018 by ThisSmart (see edit history) Link to comment Share on other sites More sharing options...
Rayna Butler Posted February 1, 2018 Share Posted February 1, 2018 Try: $url = $context->link->getProductLink($product['product_id'], null, null, null, null, null, $product['product_attribute_id'], false, false, true); 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