Jump to content

Mail alerts module's e-mail links to product's atribute


ThisSmart

Recommended Posts

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 by ThisSmart (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

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...