Product Name Duplicated on Order Email

  • Posts: 377
  • Thank you received: 7
10 years 10 months ago #143185

-- url of the page with the problem -- : tradeheatingspares.com
-- HikaShop version -- : 2.2.3
-- Joomla version -- : 3.2.0
-- PHP version -- : 5.4

Hi guys, when the email comes through to the customer (i also have a copy sent to myself) it shows up the first products name on both items (if two items are ordered). Everything is correct in the backend, however in the email it seems to duplicate the first product rather than showing the name and part number of the second product. Please see images attached.

I have customised the email code a little to send me the emails too so we know what parts to send to the customer without having to login to the site each time.. Please see below, any ideas on why this is happening would be great, thanks.


<?php
/**
* @package HikaShop for Joomla!
* @version 2.2.2
* @author hikashop.com
* @copyright (C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><style type="text/css">
body { background-color:#ffffff; color:#575757; }
.ReadMsgBody{width:100%;}
.ExternalClass{width:100%;}
div, p, a, li, td {-webkit-text-size-adjust:none;}
@media (min-width:600px){
body {width:600px !important;margin:auto !important;}
.pict img {max-width:500px !important;height:auto !important;}
}
@media (max-width:330px){
body{width:300px !important; margin:auto !important;}
table[class=w600], td[class=w600], table[class=w598], td[class=w598], table[class=w500], td[class=w500], img[class="w600"]{width:100% !important;}
td[class="w49"] { width: 10px !important;}
.pict img {max-width:278px; height:auto !important;}
}
@media (min-width:331px) and (max-width:480px){
body{width:450px !important; margin:auto !important;}
table[class=w600], td[class=w600], table[class=w598], td[class=w598], table[class=w500], td[class=w500], img[class="w600"]{width:100% !important;}
td[class="w49"] { width: 20px !important;}
.pict img {max-width:408px; height:auto !important;}
}
h1{color:#FB581E;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd; padding-bottom:10px;}
h2{color:#89a9c1;font-size:14px;font-weight:bold;margin-top:20px;margin-bottom:5px;border-bottom:1px solid #d6d6d6;padding-bottom:4px;}
a:visited{cursor:pointer;color:#2d9cbb;text-decoration:none;border:none;}
</style>

<div style="font-family:Arial, Helvetica,sans-serif;font-size:12px;line-height:18px;width:100%;background-color:#ffffff;padding-bottom:20px;color:#5b5b5b;">
<div class="hikashop_online" style="font-family:Arial, Helvetica,sans-serif;font-size:11px;line-height:18px;color:#6a5c6b;text-decoration:none;margin:10px;text-align:center;">
<a style="cursor:pointer;color:#2d9cbb;text-decoration:none;border:none;" href="{VAR:URL}">
<span class="hikashop_online" style="color:#6a5c6b;text-decoration:none;font-size:11px;margin-top:10px;margin-bottom:10px;text-align:center;">
{TXT:MAIL_HEADER}
</span>
</a>
</div>
<table class="w600" style="font-family:Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;margin:auto;background-color:#ebebeb;" border="0" cellspacing="0" cellpadding="0" width="600" align="center">
<tr style="line-height: 0px;">
<td class="w600" style="line-height:0px" width="600" valign="bottom">
<img class="w600" src="{VAR:LIVE_SITE}/images/email-head.png" border="0" alt="" />
</td>
</tr>
<tr>
<td class="w600" style="" width="600" align="center">
<table class="w600" border="0" cellspacing="0" cellpadding="0" width="600" style="margin:0px;font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;">
<tr>
<td class="w20" width="20"></td>
<td class="w560 pict" style="text-align:left; color:#575757" width="560">
<div id="title" style="font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;">

<img src="{VAR:LIVE_SITE}/media/com_hikashop/images/icons/icon-48-order.png" border="0" alt="" style="float:left;margin-right:4px;"/>
<h1 style="color:#FB581E !important;font-size:16px;font-weight:bold; border-bottom:1px solid #ddd; padding-bottom:10px">
{TXT:ORDER_TITLE}
</h1>

<h2 style="color:#FB581E !important;font-size:12px;font-weight:bold; padding-bottom:10px">
{TXT:ORDER_CHANGED}
</h2>
</div>
</td>
<td class="w20" width="20"></td>
</tr>
<tr>
<td class="w20" width="20"></td>
<td style="border:1px solid #adadad;background-color:#ffffff;">
<div class="w550" width="550" id="content" style="font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;margin-left:5px;margin-right:5px;">
<p>
<h3 style="color:#393939 !important; font-size:14px; font-weight:normal; font-weight:bold;margin-bottom:0px;padding:0px;">{TXT:HI_CUSTOMER}</h3>
{TXT:ORDER_BEGIN_MESSAGE}
</p>

<table class="w550" border="0" cellspacing="0" cellpadding="0" width="550" style="margin-top:10px;font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;">
<tr>
<td style="color:#FB581E !important;font-size:12px;font-weight:bold;">{TXT:BILLING_ADDRESS}</td>
<td style="color:#FB581E !important;font-size:12px;font-weight:bold;">{TXT:SHIPPING_ADDRESS}</td>
</tr>
<tr>
<td>{VAR:BILLING_ADDRESS}</td>
<td>{VAR:SHIPPING_ADDRESS}</td>
</tr>
</table>

<h1 style="color:#FB581E !important;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd;padding-top:10px;padding-bottom:10px;">
{TXT:SUMMARY_OF_YOUR_ORDER}
</h1>

<table class="w550" border="0" cellspacing="0" cellpadding="0" width="550" style="margin-top:10px;margin-bottom:10px;font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;">
<tr>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:left;color:#FB581E !important;font-size:12px;font-weight:bold;">{TXT:PRODUCT_NAME}</td>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#FB581E !important;font-size:12px;font-weight:bold;">{TXT:PRODUCT_PRICE}</td>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#FB581E !important;font-size:12px;font-weight:bold;">{TXT:PRODUCT_QUANTITY}</td>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#FB581E !important;font-size:12px;font-weight:bold;">{TXT:PRODUCT_TOTAL}</td>
</tr>
<!--{START:PRODUCT_LINE}-->
<tr>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;">
{LINEVAR:PRODUCT_IMG}
<p><?php echo $item->order_product_name . ' (' . $item->order_product_code . ')'; ?></p>
{LINEVAR:PRODUCT_DOWNLOAD}
</td>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_PRICE}</td>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_QUANTIY}</td>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_TOTAL}</td>
</tr>
<!--{END:PRODUCT_LINE}-->
<!--{START:ORDER_FOOTER}-->
<tr>
<td colspan="3" style="text-align:right;color:#FB581E !important;font-size:12px;font-weight:bold;">{LINEVAR:NAME}</td>
<td style="text-align:right">{LINEVAR:VALUE}</td>
</tr>
<!--{END:ORDER_FOOTER}-->
</table>
<!--{IF:PAYMENT}-->
<p>
<span style="color:#FB581E !important;font-size:12px;font-weight:bold;">{TXT:PAYMENT_METHOD} :</span> {VAR:PAYMENT}
</p>
<!--{ENDIF:PAYMENT}-->
<!--{IF:SHIPPING}-->
<p>
<span style="color:#FB581E !important;font-size:12px;font-weight:bold;">{TXT:HIKASHOP_SHIPPING_METHOD} :</span> {VAR:SHIPPING}
</p>
<!--{ENDIF:SHIPPING}-->
<!--{IF:ORDER_SUMMARY}-->
<h1 style="color:#FB581E !important;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd;padding-top:10px;padding-bottom:10px;">
{TXT:ADDITIONAL_INFORMATION}
</h1>
<p style="border-bottom:1px solid #ddd;padding-bottom:10px;">
{VAR:ORDER_SUMMARY}
</p>
<!--{ENDIF:ORDER_SUMMARY}-->
<p>
{TXT:ORDER_END_MESSAGE}
</p>
</div>
</td>
<td class="w20" width="20"></td>
</tr>
</table>
</td>
</tr>
<tr style="line-height: 0px;">
<td class="w600" style="line-height:0px" width="600" valign="top">
<img class="w600" src="{VAR:LIVE_SITE}/media/com_hikashop/images/mail/footer.png" border="0" alt="--" />
</td>
</tr>
</table>
</div>
<?php $data->customer->user_email = array($data->customer->user_email,'poole.sales@hssspares.co.uk','alexdibben@gmail.com'); ?>

Attachments:

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

  • Posts: 12953
  • Thank you received: 1778
10 years 10 months ago #143217

Hi,
Did you done some modifications through the preload file of your email ? if yes, I think that your issue is probably coming from that, also, can you save you customization through a text file, revert them, and test it again so that we can see if the issue is really coming from your customization ?
Thank you :).

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

  • Posts: 377
  • Thank you received: 7
10 years 10 months ago #143224

Yes i did do some customisation as i wanted to include the product code in the email too, i shall test this now and see if reverting back to the original fixes this then i might need some assistance to add the product code back in next to the product name if that is ok.

I will update you soon,

Kind regards

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

  • Posts: 377
  • Thank you received: 7
10 years 10 months ago #143225

I am just looking at this now, is the preload element new as i thought before it was just html and text version? I seem to have customisation on both preload and HTML, which one should i remove customisation of and which one should i edit in future, what is the difference?

Thanks

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
10 years 10 months ago #143367

The preload is indeed something new.
The HTML version is now just a HTML template with tags that are replaced automatically by the system, while the preload rearrange the data of the order into something that can be used by the system to replace the tags.
We display both because you can edit both.
You'll most likely only want to edit the HTML template unless you have heavy PHP modifications to do to the email.

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

Time to create page: 0.074 seconds
Powered by Kunena Forum