|
1 | 1 | nopCommerce Razor MessageService |
2 | | -=============================== |
| 2 | +========= |
3 | 3 |
|
4 | | -Extend the core nopCommerce Message Template Engine with Razor-Support (by RazorEngine) |
5 | | -Works with nopCommerce 3.40 |
| 4 | +This Plugin extends the core nopCommerce Message Template Engine with Razor-Support (by [RazorEngine]). |
6 | 5 |
|
| 6 | +Extend any nopCommerce Message Template with the full power of Razor. It works as a Post-Processor of the Token-Engine, so nothing must be changed. Token will continue to work. |
| 7 | + |
| 8 | +Example of "OrderPlaced.CustomerNotification" |
| 9 | + |
| 10 | +``` |
| 11 | +Hello %Order.CustomerFullName%, |
| 12 | +Thanks for buying from %Store.Name%. Below is the summary of the order. |
| 13 | +... |
| 14 | +@{ |
| 15 | + if (Model.Order.PaymentMethodSystemName == "Payments.CheckMoneyOrder") |
| 16 | + { |
| 17 | + <text>We will send you an Invoice ...</text> |
| 18 | + } |
| 19 | + else if (Model.Order.PaymentMethodSystemName == "Payments.PayPalStandard") |
| 20 | + { |
| 21 | + <text>You ordered with PayPal. ToDo: Add payment notes here</text> |
| 22 | + } |
| 23 | +} |
| 24 | +... |
| 25 | +Order Number: %Order.OrderNumber% |
| 26 | +``` |
| 27 | + |
| 28 | +Any Message Template has the related Objects available in the Model. E.g. Model.Order, Model.Customer, Model.Vendor etc. |
| 29 | + |
| 30 | + |
| 31 | +Known Issues |
| 32 | +------- |
| 33 | +##### TinyMCE Editor removes <text> Tags and Linebreaks |
| 34 | +###### Workaround: |
| 35 | +Adapt "/Administration/Views/Shared/EditorTemplates/RichEditor.cshtml" |
| 36 | +``` |
| 37 | +tinyMCE.init({ |
| 38 | + ... |
| 39 | + extended_valid_elements: "text", |
| 40 | + forced_root_blocks: false |
| 41 | +}); |
| 42 | +``` |
| 43 | + |
| 44 | + |
| 45 | +Supported Message Templates |
| 46 | +---- |
| 47 | +* Blog.BlogComment |
| 48 | +* Customer.BackInStock |
| 49 | +* Customer.EmailValidationMessage |
| 50 | +* Customer.NewOrderNote |
| 51 | +* Customer.NewPM |
| 52 | +* Customer.PasswordRecovery |
| 53 | +* Customer.WelcomeMessage |
| 54 | +* Forums.NewForumPost |
| 55 | +* Forums.NewForumTopic |
| 56 | +* GiftCard.Notification |
| 57 | +* NewCustomer.Notification |
| 58 | +* NewReturnRequest.StoreOwnerNotification |
| 59 | +* News.NewsComment |
| 60 | +* NewsLetterSubscription.ActivationMessage |
| 61 | +* NewVATSubmitted.StoreOwnerNotification |
| 62 | +* OrderCancelled.CustomerNotification |
| 63 | +* OrderCompleted.CustomerNotification |
| 64 | +* OrderPaid.StoreOwnerNotification |
| 65 | +* OrderPlaced.CustomerNotification |
| 66 | +* OrderPlaced.StoreOwnerNotification |
| 67 | +* OrderPlaced.VendorNotification |
| 68 | +* Product.ProductReview |
| 69 | +* QuantityBelow.StoreOwnerNotification |
| 70 | +* RecurringPaymentCancelled.StoreOwnerNotification |
| 71 | +* ReturnRequestStatusChanged.CustomerNotification |
| 72 | +* Service.EmailAFriend |
| 73 | +* ShipmentDelivered.CustomerNotification |
| 74 | +* ShipmentSent.CustomerNotification |
| 75 | +* Wishlist.EmailAFriend |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | +Version |
| 80 | +---- |
| 81 | +###1.00 |
| 82 | +#### Works with nopCommerce 3.40 |
| 83 | + |
| 84 | +[RazorEngine]:https://github.com/Antaris/RazorEngine |
0 commit comments