Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Gemperle authored and Benjamin Gemperle committed Oct 2, 2014
1 parent 23a1676 commit 9c4afec
Showing 1 changed file with 81 additions and 3 deletions.
84 changes: 81 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,84 @@
nopCommerce Razor MessageService
===============================
=========

Extend the core nopCommerce Message Template Engine with Razor-Support (by RazorEngine)
Works with nopCommerce 3.40
This Plugin extends the core nopCommerce Message Template Engine with Razor-Support (by [RazorEngine]).

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.

Example of "OrderPlaced.CustomerNotification"

```
Hello %Order.CustomerFullName%,
Thanks for buying from %Store.Name%. Below is the summary of the order.
...
@{
if (Model.Order.PaymentMethodSystemName == "Payments.CheckMoneyOrder")
{
<text>We will send you an Invoice ...</text>
}
else if (Model.Order.PaymentMethodSystemName == "Payments.PayPalStandard")
{
<text>You ordered with PayPal. ToDo: Add payment notes here</text>
}
}
...
Order Number: %Order.OrderNumber%
```

Any Message Template has the related Objects available in the Model. E.g. Model.Order, Model.Customer, Model.Vendor etc.


Known Issues
-------
##### TinyMCE Editor removes <text> Tags and Linebreaks
###### Workaround:
Adapt "/Administration/Views/Shared/EditorTemplates/RichEditor.cshtml"
```
tinyMCE.init({
...
extended_valid_elements: "text",
forced_root_blocks: false
});
```


Supported Message Templates
----
* Blog.BlogComment
* Customer.BackInStock
* Customer.EmailValidationMessage
* Customer.NewOrderNote
* Customer.NewPM
* Customer.PasswordRecovery
* Customer.WelcomeMessage
* Forums.NewForumPost
* Forums.NewForumTopic
* GiftCard.Notification
* NewCustomer.Notification
* NewReturnRequest.StoreOwnerNotification
* News.NewsComment
* NewsLetterSubscription.ActivationMessage
* NewVATSubmitted.StoreOwnerNotification
* OrderCancelled.CustomerNotification
* OrderCompleted.CustomerNotification
* OrderPaid.StoreOwnerNotification
* OrderPlaced.CustomerNotification
* OrderPlaced.StoreOwnerNotification
* OrderPlaced.VendorNotification
* Product.ProductReview
* QuantityBelow.StoreOwnerNotification
* RecurringPaymentCancelled.StoreOwnerNotification
* ReturnRequestStatusChanged.CustomerNotification
* Service.EmailAFriend
* ShipmentDelivered.CustomerNotification
* ShipmentSent.CustomerNotification
* Wishlist.EmailAFriend



Version
----
###1.00
#### Works with nopCommerce 3.40

[RazorEngine]:https://github.com/Antaris/RazorEngine

0 comments on commit 9c4afec

Please sign in to comment.