Email templates need a lot of work (as of 4.60.04)

7 meses atrás
In the final mile to releasing my first nopCommerce site coming from AbleCommerce 7.x. Phenomenal architecture - great job. Really enjoy the plugin architecture allowing me to minimally touch the code and do all of my customizations in a plugin.

I mentioned in another post the shipping system is a bit lacking and a concern I still have to work through. I just completed the design of all of the email templates, understandably some grammar issues but everyone should go through all of those. The email templates are all very basic with no theming integrated which is unfortunate. I built a design and implemented it, not a big deal. The token system is a bit lacking coming from AbleCommerce and is hard to understand and probably could use a better system such as AbleCommerce uses, or not sure what to help with logic, iterations, etc.

The products grid needs to be moved out of code and into the template system. I see there is a way to specify three colors used per code review but this really needs again to be integrated into the template itself there the table design is controlled, the content is controlled much better, etc.

Hopefully in the future versions both shipping and email can get more attention. Both are vital to a great ecommerce experience and not lose revenue from lacking functionality.

Thank you...back to work.
7 meses atrás
As discussed in other posts, we need the option to add our own custom message templates. I learned the process is copy one, go into the database and rename it. Not how it should be working. And we should be able to refer to a template in code by ID and not name, a much safer way to be loading and using templates.
7 meses atrás
What if your ID's for the core templates are different to mine - then how do you find the correct template ?
Plus given that you can not use a new template without changing the code then ...

You can add a new template with your plugin

            var messageTemplates = new List<MessageTemplate>
            {
                new MessageTemplate
                {
                    Name = "OrderPlaced.CustomerNotification.Test",
                    Subject = "Test Order receipt from %Store.Name%.",
                    Body = $"<p>{Environment.NewLine}<a href=\"%Store.URL%\">%Store.Name%</a>{Environment.NewLine}<br />{Environment.NewLine}<br />{Environment.NewLine}Hello %Order.CustomerFullName%,{Environment.NewLine}<br />{Environment.NewLine}Thanks for buying from <a href=\"%Store.URL%\">%Store.Name%</a>. Below is the summary of the order.{Environment.NewLine}<br />{Environment.NewLine}<br />{Environment.NewLine}Order Number: %Order.OrderNumber%{Environment.NewLine}<br />{Environment.NewLine}Order Details: <a target=\"_blank\" href=\"%Order.OrderURLForCustomer%\">%Order.OrderURLForCustomer%</a>{Environment.NewLine}<br />{Environment.NewLine}Date Ordered: %Order.CreatedOn%{Environment.NewLine}<br />{Environment.NewLine}<br />{Environment.NewLine}<br />{Environment.NewLine}<br />{Environment.NewLine}Billing Address{Environment.NewLine}<br />{Environment.NewLine}%Order.BillingFirstName% %Order.BillingLastName%{Environment.NewLine}<br />{Environment.NewLine}%Order.BillingAddress1%{Environment.NewLine}<br />{Environment.NewLine}%Order.BillingCity% %Order.BillingZipPostalCode%{Environment.NewLine}<br />{Environment.NewLine}%Order.BillingStateProvince% %Order.BillingCountry%{Environment.NewLine}<br />{Environment.NewLine}<br />{Environment.NewLine}<br />{Environment.NewLine}<br />{Environment.NewLine}%if (%Order.Shippable%) Shipping Address{Environment.NewLine}<br />{Environment.NewLine}%Order.ShippingFirstName% %Order.ShippingLastName%{Environment.NewLine}<br />{Environment.NewLine}%Order.ShippingAddress1%{Environment.NewLine}<br />{Environment.NewLine}%Order.ShippingCity% %Order.ShippingZipPostalCode%{Environment.NewLine}<br />{Environment.NewLine}%Order.ShippingStateProvince% %Order.ShippingCountry%{Environment.NewLine}<br />{Environment.NewLine}<br />{Environment.NewLine}Shipping Method: %Order.ShippingMethod%{Environment.NewLine}<br />{Environment.NewLine}<br />{Environment.NewLine} endif% %Order.Product(s)%{Environment.NewLine}</p>{Environment.NewLine}",
                    IsActive = true,
                    EmailAccountId = eaGeneral.Id
                }
            };
            await _messageTemplateRepository.InsertAsync(messageTemplates);
7 meses atrás
Thanks for your feedback.
6 meses atrás
The other problem as I see it, for nopCommerce devs to be aware, is you're loading email templates by name. If you COPY a template, the name is identical to the source. Therefore the name column in the database is not unique and now you have two templates with the same name. There really should be a popup form/dialog for the copy process for a name (must be unique and validated as such), etc. Otherwise save the new name as "Copy of X".