Customizing the Administrator Notification

  • Posts: 14
  • Thank you received: 0
12 years 10 months ago #43571

I would like to customize the email that the owner receives when an order is placed. She would like to add the product image and its item number. In addition she wants to have the pricing information removed.

Can you give me an idea of how to go about this? I'm guessing I have to work with the code in email > Order Administrator Notification.

Any help is appreciated - Mike

Please Log in or Create an account to join the conversation.

  • Posts: 83103
  • Thank you received: 13417
  • MODERATOR
12 years 10 months ago #43750

Adding the image of each product is quite complex as you first need to load the data from the database and then use it to construct the link to the image and display the proper HTML.

Removing the prices is more easy. Just remove the lines:
<td style="font-weight: bold;"><?php
echo JText::_('CART_PRODUCT_UNIT_PRICE');
?></td>

</td>
<td style="font-weight: bold; text-align: right;"><?php echo JText::_('HIKASHOP_TOTAL'); ?>
</td>


<td><?php echo $currencyHelper->format($item->order_product_price+$item->order_product_tax,$data->order_currency_id); ?></td>


<td style="text-align: right"><?php echo $currencyHelper->format($item->order_product_total_price,$data->order_currency_id); ?></td>


and the block:

if(bccomp($data->order_discount_price,0,5)){
								echo '<tr><td colspan="4" style="text-align:right">'.JText::_('HIKASHOP_COUPON').' : '.$currencyHelper->format($data->order_discount_price*-1,$data->order_currency_id).'</td></tr>';
							}
							if(bccomp($data->order_shipping_price,0,5)){
								echo '<tr><td colspan="4" style="text-align:right">'.JText::_('HIKASHOP_SHIPPING_METHOD').' : '.$currencyHelper->format($data->order_shipping_price,$data->order_currency_id).'</td></tr>';
							}
							if($data->cart->full_total->prices[0]->price_value!=$data->cart->full_total->prices[0]->price_value_with_tax){
								if($config->get('detailed_tax_display') && !empty($data->order_tax_info)){
									foreach($data->order_tax_info as $tax){
										echo '<tr><td colspan="4" style="text-align:right">'.$tax->tax_namekey. ' : '.$currencyHelper->format($tax->tax_amount,$data->order_currency_id).'</td></tr>';
									}
								}else{
									echo '<tr><td colspan="4" style="text-align:right">'.JText::sprintf('TOTAL_WITHOUT_VAT',$currencyHelper->format($data->cart->full_total->prices[0]->price_value,$data->order_currency_id)).'</td></tr>';
								}
								$text=JText::sprintf('TOTAL_WITH_VAT',$currencyHelper->format($data->cart->full_total->prices[0]->price_value_with_tax,$data->order_currency_id));
							}else{
								$text=JText::_('HIKASHOP_FINAL_TOTAL'). ' : '.$currencyHelper->format($data->cart->full_total->prices[0]->price_value_with_tax,$data->order_currency_id);
							}
							echo '<tr><td colspan="4" style="text-align:right;font-weight:bold;">'.$text.'</td></tr>';

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
12 years 10 months ago #43809

Thanks Nicolas. I'll give it a try

Please Log in or Create an account to join the conversation.

Time to create page: 0.054 seconds
Powered by Kunena Forum