Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Alex Lindgren 159 posts 356 karma points
    Oct 21, 2014 @ 18:43
    Alex Lindgren
    1

    Email notifications

    Hi Merchelloists,

    I'm starting to work on email notifications and have run into a couple issues/questions. Currently running Merchello 1.4.1 on Umbraco 7.1.8. I've configured the SMTP notification provider with valid SMTP settings. Beyond that, I find the notifications settings UI a little confusing.

    First, I'm a little unclear on the "Add a Notification" link and what it is supposed to do.

    enter image description here

    When I click on it and complete the side form, I get an error. It POSTs to http://localhost:5554/umbraco/backoffice/Merchello/NotificationGatewayApi/AddNotificationMethod with the following:

    {"key":"","name":"Email","providerKey":"5f2e88d1-6d07-4809-b9ab-d4d6036473e9","description":"test","serviceCode":"Email","notificationMessages":[],"resources":[],"selection":[]}
    

    The response is 500 Server error: "Object reference not set to an instance of an object."

    Second question, maybe I'm missing something but is it possible to edit the subject line of a message? It seems to use the name of the Message that I created by clicking the green "+ Message" button but when I go to edit the message I can't edit the name. I would prefer to see a separate text field above the body field for editing the subject but will need someway to edit the subject line.

    Finally, I copied the following from http://our.umbraco.org/projects/collaboration/merchello/merchello/53865-Merchello-120-Release:

    {{BillToName}}
    <p><b>Your address</b><br />
    {{BillToAddress1}}<br />
    {{BillToAddress2}}<br />
    {{BillToLocality}},{{BillToRegion}}{{BillToPostalCode}}</p>
    <p>Email:{{BillToEmail}}<br />
    Phone:{{BillToPhone}}</p>
    <p>InvoiceNumber:{{InvoiceNumber}}</p>
    <p><b>ItemsPurchased:</b></p>
    <table>
    {{IterationStart[Invoice.Items]}}
    <tr>
    <td>{{Item.Name}}</td>
    <td>{{Item.Sku}}</td>
    <td>{{Item.UnitPrice}}</td>
    <td>{{Item.Quantity}}</td> 
    <td>{{Item.TotalPrice}}</td>
    </tr>
    {{IterationEnd[Invoice.Items]}}
    </table>   
    <p>Thanks for the order.</p>
    

    into the body for the order shipped message. When I fulfill an order, it sends the message but the body is empty.

    Any insights and comments will be greatly appreciated!

    Thanks,

    Alex

  • Carsten Fallesen 35 posts 154 karma points
    Oct 21, 2014 @ 20:25
    Carsten Fallesen
    0

    Hi Alex,

    I have been struggling with the notifications as well. What I have learned so far is that the BillTo information is not available in the order shipped message. You have to use the ShipTo information instead. I have not been able to outout the items shipped yet.

    I have also had some problems using the RTE to edit the message, for now I put the message directly into the DB.

    I hope to learn more about the notifications in this thread.

    Carsten

  • Alex Lindgren 159 posts 356 karma points
    Oct 21, 2014 @ 21:24
    Alex Lindgren
    0

    Thanks Carsten!

    I had only tried order shipped before and it seems like that one is a problem. Order placed notification kind of works. I think I may be experiencing the problem with the RTE that you mentioned. I had kind of foolishly, but also fortuitously, pasted the HTML into the RTE as rich text. This meant that the email displayed the HTML tags. When I tested it, it worked, and I was able to display billing info and the list of orders although I could see the HTML tags because I had pasted it in via the RTE. When I went into fix the HTML by pasting the code in as code and not as rich text, the email sent no longer included the order items. It appears that there is a problem with iterating when there are HTML tags.

    Alex

  • Carsten Fallesen 35 posts 154 karma points
    Oct 21, 2014 @ 21:44
    Carsten Fallesen
    1

    The problem I had with the RTE was that the editor "cleans up" the code. This means that the iterator tags are moved around. The only solution if have found so far is to paste the code directly into the bodyText field in the merchNotificationMessage table. When I do that I can the the item list in the order confirmation notification, but notthe order shipped notification.

    Carsten

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Oct 23, 2014 @ 19:02
    Rusty Swayne
    0

    Alex

    That looks like a bug in the UI. The Add notification method should not display after you have added email since the SmtpNotificationProvider only has one method. Add message should work.

    For the second part, can you post the Notification.Trigger call you made in your controller?

  • Jason Prothero 422 posts 1243 karma points MVP c-trib
    Oct 23, 2014 @ 19:38
    Jason Prothero
    1

    I've also been having issues with the mapping.  Some fields I would expect to be available, aren't and just end up blank on my notification emails. I haven't had a chance to dig in as to why, but its an issue.

     

    -Jason

  • Peter Gregory 408 posts 1614 karma points MVP 3x admin c-trib
    May 20, 2015 @ 09:13
    Peter Gregory
    0

    Just hit the code clean up bug as well with the notifications. I will try the direct paste into the DB but its seems like a bit of a problem.

    I may modify the Angular view to use a Textarea instead.

    Peter

  • Peter Gregory 408 posts 1614 karma points MVP 3x admin c-trib
    May 24, 2015 @ 07:16
    Peter Gregory
    2

    For those having the issue with it stripping the repeats in tables I found if you wrap the repeat up in an HTML comments and it repeats as expected.

    <table>
    <tbody>
    <!--{{IterationStart[Invoice.Items]}}-->
    <tr>
    <td>{{Item.Name}}</td>
    <td>{{Item.Sku}}</td>
    <td>{{Item.UnitPrice}}</td>
    <td>{{Item.Quantity}}</td>
    <td>{{Item.TotalPrice}}</td>
    </tr>
    <!-- {{IterationEnd[Invoice.Items]}} -->
    </tbody>
    </table>
    
  • Biagio Paruolo 1618 posts 1910 karma points c-trib
    Sep 14, 2015 @ 11:33
    Biagio Paruolo
    0

    I've the same problem that Merchello send email as text

Please Sign in or register to post replies

Write your reply to:

Draft