The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.
 
 
Thread Tools Display Modes
  #1  
Old 08-03-2015, 12:05 PM
paintthetown's Avatar
paintthetown is offline
 
Join Date: Jul 2015
Posts: 1
Default

Displaying visible and hidden attributes in confirmation email


I have tried all of the ideas in other threads for getting attributes (visible and hidden) for a specific product (or all products ordered) in the confirmation email, but so far nothing is working. At best I get some Russian characters.

Below is a screen shot of the attributes set up:


Below is an excerpt of the code which I've set up to test different options:

Code:
<!-- Order item: start -->
<#list order.items as orderItem>
<tr>

  	<td align="left" valign="top" style="text-align: left;font-family: Arial,sans-serif;font-size: 14px;line-height: 

150%;color: #FFFFFF;padding-top:2px;padding-left:10px">

      	<!-- Order item: start -->
      	${orderItem.name} <br>
    Test 1
	${orderItem.visibleattributes[0].name} ${orderItem.visibleattributes[0].value}
	${orderItem.visibleattributes[1].name} ${orderItem.visibleattributes[1].value}
	${orderItem.visibleattributes[2].name} ${orderItem.visibleattributes[2].value}
	${orderItem.visibleattributes[3].name} ${orderItem.visibleattributes[3].value}
      
    Test 2
    ${orderItem.attributes[0].name} ${orderItem.attributes[0].value}
    ${orderItem.attributes[1].name} ${orderItem.attributes[1].value}
    ${orderItem.attributes[2].name} ${orderItem.attributes[2].value}
    ${orderItem.attributes[3].name} ${orderItem.attributes[3].value}

    Test 3
    ${order.items[0].attributes[0].name} at ${order.items[0].attributes[0].value}
    ${order.items[0].attributes[1].name} at ${order.items[0].attributes[1].value}
    ${order.items[0].attributes[2].name} at ${order.items[0].attributes[2].value}
    ${order.items[0].attributes[3].name} at ${order.items[0].attributes[3].value}
      ${order.items[0].attributes[4].name} at ${order.items[0].attributes[4].value}
    ${order.items[1].attributes[4].name} at ${order.items[1].attributes[4].value}
    
    Test 4
    ${orderItem.attributes.name} ${orderItem.attributes.value}
    
    Test 7
    <#list orderItem.visibleAttributes as visibleAttribute>
	    ${visibleAttribute.name}: ${visibleAttribute.value}
	</#list>
    
    Test 8
    <#list orderItem.attributes as attribute>
	    ${attribute.name}: ${attribute.value}
	</#list>
    
    </td>
</tr>
</#list>
<tr><td align="left" valign="top" style="text-align: left;font-family: Arial,sans-serif;font-size: 14px;line-height: 

150%;color: #FFFFFF;padding-top:2px;padding-left:10px">    Test 5
    ${order.items[0].attributes[1].name} at ${order.items[0].attributes[1].value}</td></tr>
  
<!-- Order items : end -->
<!-- Order item: end -->
<#list orderItem.visibleAttributes as visibleAttribute>
 <tr>
  <td style="font-family: Arial,Helvetica,sans-serif;font-size: 14px;line-height: 20px; color: #FFFFFF; padding-top: 5px;">
    tEST 6
    ${visibleAttribute.name}: ${visibleAttribute.value}
  </td>
 </tr>
</#list>
What am I doing wrong?

Sorry here's the pic of the attributes set up:

Last edited by Wendy; 08-05-2015 at 09:22 AM.
  #2  
Old 08-05-2015, 11:26 AM
Wendy's Avatar
Wendy Wendy is offline
Ecwid Team
 
Join Date: Jun 2014
Posts: 1,122
Default

Hello,

Thank you for contacting Ecwid Customer Care Team.

As I understand, you'd like to add product attributes (visible and hidden) and their values in the "Order confirmation" email message.

In order to achieve this you should add the following code in the notification template:

Code:
<table border="0" cellpadding="0" cellspacing="0" style="table-layout: fixed;">
  <#list orderItem.visibleAttributes as visibleAttribute>
    <tr>
      <td style="font-family: Arial,sans-serif; font-size: 12px; color: #999999; padding-top: 9px;">
        ${visibleAttribute.name}: 
      </td>
      <td style="font-family: Arial,sans-serif; font-size: 12px; color: #999999; padding-top: 9px; padding-left:10px;">
        ${visibleAttribute.value}
      </td>
    </tr>
  </#list>
  <#list orderItem.attributes as attribute>
    <tr>
      <td style="font-family: Arial,sans-serif; font-size: 12px; color: #999999; padding-top: 9px;">
        ${attribute.name}: 
      </td>
      <td style="font-family: Arial,sans-serif; font-size: 12px; color: #999999; padding-top: 9px; padding-left:10px;">
        ${attribute.value}
      </td>
    </tr>
  </#list>                            
</table>
Please, go to your Ecwid control panel > Settings > Mail page and open the "Order Confirmation" template for editing. Then place the code between <!-- Order item: end --></td></tr> and </#list><!-- Order items : end -->

Please, see the screenshot: http://take.ms/QVeD7 Do not forget to save changes after editing.

Please, feel free to write me back if you have any further questions. I'll be glad to help.
__________________
Wendy
Ecwid Customer Care Team
Help Center


⬇ Please click Thanks if my reply helped you.
 
The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:19 PM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.