Sitecore version: 9.0.2
Business scenario: If a customer leaves with items in cart, we have to send a mail with the details of the items in the cart. At max, we have to display only 4 items in the mail.
The HTML structure and the mail:
The HTML layout contains a table with 4 nested tables inside it for each item in the cart (considering the scenario for the maximum items to be displayed).
Way ahead: So, as the requirements are clear let's move to the implementation.
Given the different business dependencies, we are going for an automatic campaign with the inbuilt HTML as the template.
Approach and blockers:
We thought that we will use tokens to apply '
display: none' to the tables which we will have to hide. But the approach failed. More detail on it is here.
Post that we tried to apply the suggestions provided in the answer mentioned above. We tried it both ways, in-line as well as through the class. But the success evaded us whenever we checked the mails in our mailbox.
Mail-systems in question: Right now we are focusing on three mails system: 1. Gmail 2. Hotmail 3. Outlook
But yes the business has asked for all.
I believe that what I am trying to achieve is not something uncommon but there is something which we are missing.
Please help me to solve this puzzle.
Thanks in advance.