Jump to content

Email template issue


wildsong

Recommended Posts

Hi

 

Hoping someone can help on an issue I'm having with the Cart: digital downloads email template.

 

The template is set like this:

 

And it produces an email like this:

 

It seems the download name is missing. Maybe it should be the product name?

Does anyone have a suggestion for putting this right?

 

Many thanks, Geoff.

Link to comment
Share on other sites

Hi Geoff, I'd suggest taking a look at the source code as the macro may be corrupt. When you view source it MUST be {$download.name}. You may fid that it has been broken with HTML tags. The source should look something like this:

<p>Hi {$DATA.first_name},</p>
<p>
Your digital files are now ready for download. Please use the links provided below to access them below:</p>
<p>
{foreach from=$DOWNLOADS item=download}</p>
<p>
<strong>{$download.name}:</strong> (Link expires on {$download.expire}<strong>)</strong><br />
{$download.url}</p>
<p>
{/foreach}</p>
<p>
If the links above don&#39;t work, please try copy and pasting them it into your browser address bar. You can also find access to these files from your the customer area of our website.</p>
<p>
&nbsp;</p>
Link to comment
Share on other sites

wildsong,

 

It appears that you edited the template (specifically, Please use the links provided below to access them below: to Please use the links provided below to access them:).

 

It is an unfortunate side-effect that editing the template may cause problems if certain Smarty statements are not wrapped in HTML comment tags.

 

Please use the editor's Source mode to make these changes:

{foreach from=$DOWNLOADS item=download} to <!-- {foreach from=$DOWNLOADS item=download} -->

{/foreach} to <!-- {/foreach} -->

 

Please make these edits to the HTML content of this template using the Source mode of the editor and Save.

 

Let us know how the next test goes.

Link to comment
Share on other sites

Maybe I'm missing something here, but I don't think so.

 

There is a product name and a file name. The variable (if that's the right term) {$download.name} should pick up the product name, it seems. Is this the problem - that the download itself doesn't have a name? Sorry - I'm OK with a bit of html, but not php.

 

The item name appears in the order OK.

Link to comment
Share on other sites

Thanks for your advice bsmither. Mind, I don't think my text change lost any comment tag, as you can see from Al's suggestion of what the source code should be.

 

Anyway, I tried your suggestion so this is now the source code:

 

<p>

Hi {$DATA.first_name},</p>

<p>

Your digital files are now ready for download. Please use the links provided below to access them:</p>

<p>

<!-- {foreach from=$DOWNLOADS item=download} --></p>

<p>

<strong>{$download.name}:</strong> (Link expires on {$download.expire}<strong>)</strong><br />

{$download.url}</p>

<p>

<!-- {/foreach} --></p>

<p>

If the links above don&#39;t work, please try copy and pasting them into your browser address bar. You can also find access to these files from your customer area of our website.</p>

<p>

&nbsp;</p>

 
I thought this would do it. But no, there's still a blank in the resulting email. 
 
Is it a problem with being inside paragraph tags?
Link to comment
Share on other sites

From the point of view of the application you are using to read the email received (the screenshot in post#1), can you:

* Have the email reader show the text-based component of the email? (CubeCart sends both components: plain-text and HTML)

* Have the email reader show the raw contents of the email? That is to say, the HTML component is most often seen as an attachment to the plain-text component.

 

We would like to know if {$download.name} is, in fact, getting replaced with the product's name, but for some reason, the HTML is not showing it. Such as perhaps, the product name has < or > as part of the name.

 

What is the entirety of the product's name?

 

No, the <!-- {x} --> inside <p> tags do not matter.

Link to comment
Share on other sites

I'm using Mail on a Mac. Going to Raw Source for the email, I think this is the relevant part:

 

<p>

Your digital files are now ready for download. Please use the links provided below to access them:</p>

<p>

<!--  --></p>

<p>

<strong>:</strong> (Link expires on 20 Nov 2013, 17:36<strong>)</strong><br />

http://www.wildsong.co.uk/store/index.php?_a=download&accesskey=9bf3dc2b2b5cdf1632db559ad86a11a2</p>

<p>

<!--  --></p>

<p>

If the links above don&#39;t work, please try copy and pasting them into your browser address bar. You can also find access to these files from your customer area of our website.</p>

<p>

&nbsp;</p>

 
Thanks for sticking with this. I need multiple digital downloads to be user-friendly, before I can make some progress with my site.
Link to comment
Share on other sites

Excellent. Another variable has been eliminated as a possible cause of the problem.

 

Now we would like for you to use a utility, such as phpMyAdmin, to look at your Cubecart database directly.

 

In the table CubeCart_downloads, find the record that has the accesskey of '9bf3dc2b2b5cdf1632db559ad86a11a2'. Take note of the values in the cart_order_id and order_inv_id columns.

 

In the table CubeCart_order_inventory, find the record that has as 'id' the value noted for order_inv_id.

 

For this record, note the values in the cart_order_id and name columns.

 

Do the cart_order_id values match? What is the exact contents of the name column?

 

(The next step, if necessary) will involve adding some diagnostic code to CubeCart. Are you comfortable with editing files?)

Link to comment
Share on other sites

Thanks again bsmither.

 

Delving into the mySQL database is unknown territory for me. Scary.

I'll explore it this morning and see if I can make any progress. I have to leave for a conference this afternoon, so if not sorted by then, will have to pick up on this again later.

Link to comment
Share on other sites

OK -starting to get somewhere now.

 

For all (looks like all) the test orders I've been making for digital products, looking into the database in the table CubeCart_downloads,

the value in order_inv_id is 0 (zero). So going to the table CubeCart_order_inventory: there are no records with id 0.

 

It looks to me like customer orders do get a valid id. Which implies to me that it is something to do with how I am making these test orders, which is as follows:

I've set up a coupon for the value of the download. Then used that coupon in checkout, so no actual financial transaction takes place.

I'm going to do some more tests and will keep you posted.

Link to comment
Share on other sites

I don't think this is a browser issue but a deeper problem in your stores code/database. If you have support credits please submit a ticket and we will debug/fix this issue for you. I think this issue needs an experienced CubeCart programmer to investigate. 

 

Can we assume no 3rd party modifications or code changes have been made?

Link to comment
Share on other sites

Looking into the database further I can see that records for all my test orders yesterday do exist in the Cubecart_order_inventory table with ids from 165 to 184.

 

But in the Cubecart_download table the values for these items in order_inv_id are all 0.

 

Any suggestions?

Link to comment
Share on other sites

Al 

 

Yes I think we're at that point. I do have support credits. 

The only modification is to get the WorldPay and credit card logos into the header.

 

I'm going to be on the road driving this afternoon, then busy tomorrow, so it might be best to leave it till next week.

 

At least I've now got the experience of examining the database. Not so scary now.

Link to comment
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.

×
×
  • Create New...