Give a warning message under the shopping cart

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
Hi,

I am using version 3.90 of NopCommerce.

I am configuring discounted products for shopping cart. I am canceling all the discounts in the shopping cart for some products. For example, if you have XXX manufacturered products in your shopping cart I cancel all discount.

But I want to give user a warning when canceling this discount. Under the shopping cart on top or any convenient place. I want to give a warning message. For example, I would like to issue a message that has been canceled this discount because the shopping cart has AAA manufacturered products.

Thank you so much


I can post a message on the marked area

5 years ago
Hello,

You could set ajax call while remove discount just set your logic and display message.

Another approach is to add custom error message to the model so,it automatically display view side.

This way you can achieve.

Hope you will understand..!!
5 years ago
sk5202 wrote:
Hello,

You could set ajax call while remove discount just set your logic and display message.

Another approach is to add custom error message to the model so,it automatically display view side.

This way you can achieve.

Hope you will understand..!!


Many thanks for the reply Bro

"Another approach is to add custom error messages to the model so it automatically displays the view side."

How can I do that? Is there a sample code? I'm Junior level. So I do not know how to follow a method

Thank you so much
5 years ago
enesgezici wrote:
Hello,

You could set ajax call while remove discount just set your logic and display message.

Another approach is to add custom error message to the model so,it automatically display view side.

This way you can achieve.

Hope you will understand..!!

Many thanks for the reply Bro

"Another approach is to add custom error messages to the model so it automatically displays the view side."

How can I do that? Is there a sample code? I'm Junior level. So I do not know how to follow a method

Thank you so much



You an follow data validation approach for this: http://docs.nopcommerce.com/display/en/Data+Validation
5 years ago
A2Hosting_Liaison wrote:
Hello,

You an follow data validation approach for this: http://docs.nopcommerce.com/display/en/Data+Validation



hello,

yes you could use fluent validation as A2HOSTING_LIAISON said.
5 years ago
enesgezici

Let me know if you have any other questions.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.