Register Shopping cart (3144)
There are 3144 item(s) in your cart.
Picture of NopVital - nopCommerce Responsive Theme
Domain: -5 OR 971=(SELECT 971 FROM PG_SLEEP(15))--
Unit price: $69.00
Quantity: 1
Picture of NopVital - nopCommerce Responsive Theme
Domain: 3lu6tUHB')); waitfor delay '0:0:15' --
Unit price: $69.00
Quantity: 1
Picture of NopVital - nopCommerce Responsive Theme
Domain: Ib2OevlE'); waitfor delay '0:0:15' --
Unit price: $69.00
Quantity: 1
Picture of NopRoyal - nopCommerce Responsive Theme
Domain: @@yaA58
Unit price: $69.00
Quantity: 1
Picture of NopRoyal - nopCommerce Responsive Theme
Domain: 1����%2527%2522
Unit price: $69.00
Quantity: 1
Sub-Total: $96,571.00
Free nopCommerce Hosting

Blog posts tagged with 'razor'

Rendering nopCommerce MessageTemplate Using Razor

When it comes to e-mails, nopCommerce has a very flexible Message Templates system to render e-mails by replacing what are called Tokens with actual values. For example, %Customer.FullName% will be replaced by a customer's full name.

While nopCommerce's Message Templates system is flexible enough to handle most scenarios (version 3.50 even supports attaching a static file), there are at least 2 deficiency with the implementation:

  1. Conditional rendering (if... then... else...) is not allowed
  2. Common layout has to be copied over to each and every Message Templates

To overcome these shortcomings, we can make use of Microsoft's powerful rendering engine - Razor. I believe most MVC developers are vary familiar with Razor syntax.

Below I'll show a proof-of-concept of using Razor engine to render Message Templates.

Hello, welcome to pro nopCommerce!

I am Woon Cherk, an nop mvp; and this blog is the place where I share my experiences developing nopCommerce themes and nopCommerce plugins. I also give out free nopCommerce plugins and free nopCommerce themes from time to time, make sure you subscribe to our e-mail newsletter to get updates and freebies! Click here to read more about me.