Jump to content
Sign in to follow this  
Dirty Butter

6.2.5 edit email content goes crazy??

Recommended Posts

Confirmation Order email Source Code as saved:

<p><content type="html"> Thank You {$DATA.first_name}!</content></p>

<p>Your order {$DATA.custom_oid} has been received which was placed on {$DATA.order_date}. Please keep this email for your records. It is possible to view the status of your order online.</p>

<p><a href="{$DATA.link}">{$DATA.link}</a></p>
{if !empty($DATA.customer_comments)}

<p>Customer&#39;s Comments to USPS or to us:</p>

<p align="center">&quot;{$DATA.customer_comments}&quot;</p>
{/if}{if !empty($DATA.customer_message)}

<p>Customer&#39;s Message to Recipient:</p>

<p align="center">&quot;{$DATA.customer_message}&quot;</p>
{/if}

<table width="100%">
	<tbody>
		<tr>
			<td valign="top" width="50%"><strong>Billing address:</strong><br />
			{$BILLING.first_name} {$BILLING.last_name}<br />
			{if !empty($BILLING.company_name)}{$BILLING.company_name}<br />
			{/if} {$BILLING.line1}<br />
			{if !empty($BILLING.line2)}{$BILLING.line2}<br />
			{/if} {$BILLING.town}<br />
			{if !empty($BILLING.state)}{$BILLING.state
}<br />
			{/if}{$BILLING.postcode}<br />
			{$BILLING.country}<br />
			{$BILLING.phone}<br />
			<br />
			<strong>Email:</strong><br />
			{$BILLING.email}</td>
			<td valign="top" width="50%"><strong>Shipping address:</strong><br />
			{$SHIPPING.first_name} {$SHIPPING.last_name}<br />
			{if !empty($SHIPPING.company_name)}{$SHIPPING.company_name}<br />
			{/if}{$SHIPPING.line1}<br />
			{if !empty($SHIPPING.line2)}{$SHIPPING.line2}<br />
			{/if}{$SHIPPING.town}<br />
			{if !empty($SHIPPING.state)}{$SHIPPING.state}<br />
			{/if}{$SHIPPING.postcode}<br />
			{$SHIPPING.country}</td>
		</tr>
	</tbody>
</table>

<p>{if isset($product.prodDesc)}{/if}</p>

<table border="0" cellpadding="3" cellspacing="0" width="100%">
	<tbody>
		<tr>
			<td><strong>Item</strong></td>
			<td><strong>Quantity</strong></td>
			<td><strong>Cost</strong></td>
		</tr>
		{foreach from=$PRODUCTS item=product}
		<tr>
			<td>{$product.name}<br />
			{$product.product_options}</td>
			<td>{$product.quantity}</td>
			<td>{$product.price}</td>
		</tr>
		<tr>
			<td colspan="3">{$product.prodDesc}</td>
		</tr>
		{/foreach}
		<tr>
			<td>&nbsp;</td>
			<td>Shipping: {if $DATA.ship_method}({$DATA.ship_method}){/if}</td>
			<td>{$DATA.shipping}</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td>Discount:</td>
			<td>{$DATA.discount}</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td>Subtotal:</td>
			<td>{$DATA.subtotal}</td>
		</tr>
		{foreach from=$TAXES item=tax}
		<tr>
			<td>&nbsp;</td>
			<td>{$tax.tax_name}: ({$tax.tax_percent}%)</td>
			<td>{$tax.tax_amount}</td>
		</tr>
		{/foreach}
		<tr>
			<td>&nbsp;</td>
			<td><strong>Order Total: </strong></td>
			<td><strong>{$DATA.total}</strong></td>
		</tr>
	</tbody>
</table>

<p>&nbsp;</p>

BUT open it and then save and it changes to this:

<p><content type="html"> Thank You {$DATA.first_name}!</content></p>

<p>Your order {$DATA.custom_oid} has been received which was placed on {$DATA.order_date}. Please keep this email for your records. It is possible to view the status of your order online.</p>

<p><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">&quot;{$DATA.customer_comments}&quot;</a></p>

<p><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">{/if}{if !empty($DATA.customer_message)} </a></p>

<p><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">Customer&#39;s Message to Recipient:</a></p>

<p align="center"><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">&quot;{$DATA.customer_message}&quot;</a></p>

<p><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">{/if} </a></p>

<table width="100%">
	<tbody>
		<tr>
			<td valign="top" width="50%"><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align="><strong>Billing address:</strong><br />
			{$BILLING.first_name} {$BILLING.last_name}<br />
			{if !empty($BILLING.company_name)}{$BILLING.company_name}<br />
			{/if} {$BILLING.line1}<br />
			{if !empty($BILLING.line2)}{$BILLING.line2}<br />
			{/if} {$BILLING.town}<br />
			{if !empty($BILLING.state)}{$BILLING.state }<br />
			{/if}{$BILLING.postcode}<br />
			{$BILLING.country}<br />
			{$BILLING.phone}<br />
			<br />
			<strong>Email:</strong><br />
			{$BILLING.email}</a></td>
			<td valign="top" width="50%"><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align="><strong>Shipping address:</strong><br />
			{$SHIPPING.first_name} {$SHIPPING.last_name}<br />
			{if !empty($SHIPPING.company_name)}{$SHIPPING.company_name}<br />
			{/if}{$SHIPPING.line1}<br />
			{if !empty($SHIPPING.line2)}{$SHIPPING.line2}<br />
			{/if}{$SHIPPING.town}<br />
			{if !empty($SHIPPING.state)}{$SHIPPING.state}<br />
			{/if}{$SHIPPING.postcode}<br />
			{$SHIPPING.country}</a></td>
		</tr>
	</tbody>
</table>

<p><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">{if isset($product.prodDesc)}{/if}</a></p>

<table border="0" cellpadding="3" cellspacing="0" width="100%">
	<tbody>
		<tr>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align="><strong>Item</strong></a></td>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align="><strong>Quantity</strong></a></td>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align="><strong>Cost</strong></a></td>
		</tr>
		<!--{foreach from=$PRODUCTS item=product}-->
		<tr>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">{$product.name}<br />
			{$product.product_options}</a></td>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">{$product.quantity}</a></td>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">{$product.price}</a></td>
		</tr>
		<tr>
			<td colspan="3"><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">{$product.prodDesc}</a></td>
		</tr>
		<!--{/foreach}-->
		<tr>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">&nbsp;</a></td>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">Shipping: {if $DATA.ship_method}({$DATA.ship_method}){/if}</a></td>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">{$DATA.shipping}</a></td>
		</tr>
		<tr>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">&nbsp;</a></td>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">Discount:</a></td>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">{$DATA.discount}</a></td>
		</tr>
		<tr>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">&nbsp;</a></td>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">Subtotal:</a></td>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">{$DATA.subtotal}</a></td>
		</tr>
		<!--{foreach from=$TAXES item=tax}-->
		<tr>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">&nbsp;</a></td>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">{$tax.tax_name}: ({$tax.tax_percent}%)</a></td>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">{$tax.tax_amount}</a></td>
		</tr>
		<!--{/foreach}-->
		<tr>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">&nbsp;</a></td>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align="><strong>Order Total: </strong></a></td>
			<td><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align="><strong>{$DATA.total}</strong></a></td>
		</tr>
	</tbody>
</table>

<p><a center="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--{cke_protected}%7Bif%20!empty(%24DATA.customer_comments)%7D--&gt;

&lt;p&gt;Customer's Comments to USPS or to us:&lt;/p&gt;

&lt;p align=">&nbsp;</a></p>

AND I get an error message - Syntax error on Line 5

SO - is this due to some line of code I have in my email, an error in code somewhere in the admin folder, or is it a 6.2.5 issue? I didn't discover this problem until I tried to edit an email in the Email Log and then resend.

Share this post


Link to post
Share on other sites

I think the only thing that is different is that the editor has been given a new pattern to recognize as what must not be messed with when editing the template. The pattern more narrowly makes sure that there is no space between the left brace and Smarty code, and between Smarty code and the right brace.

That pattern has been tested and this didn't happen.

To restore, you will need to manually paste the the following from the /language/email_definitions.xml file, near line 46, directly into the database table CubeCart_email_content, the record of Cart: Order Confirmed with language as en-US, into the content_html column:

Near line 44, find:

  <email name="cart.order_confirmation">
    <subject><![CDATA[Order Confirmation #{$DATA.cart_order_id}]]></subject>
    <content type="html"><![CDATA[<p>Thank You {$DATA.first_name|capitalize}!</p>

Near line 46, identify:

<content type="html"><![CDATA[

About 80 lines later, find:

</table>
{if !empty($DATA.note_to_customer)}
<p>&quot;{$DATA.note_to_customer}&quot;</p>
{/if}]]></content>

Identify:

]]></content>

You will want to copy/paste only that which is between, but not including, what was identified.

I notice in the code you posted above that line 1 has <content type="html">. This leads me to believe that some illegal content got INSERTed into the database.

As a guess, somehow the entire XML node, including the <content> node tag, was erroneously manually pasted into the database. You may need to examine other data cells in the database table CubeCart_email_content. If the mess is widespread, you may need to visit admin, Email Templates, Import tab, and reinstall the content templates.

However, I do not know if this is the direct cause of your issue.

Share this post


Link to post
Share on other sites

The <content type=:html"> crept in because I was using Notepad++ to trouble shoot and copy/pasted. So that part is fixed.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...