Validating product attributes via Json

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

I was wondering if there was a way for me to take the product attributes form and pass it to a controller so that it could validate the product attributes and return the error message or a success message using Ajax?

Thanks
6 years ago
nickbrowne.primegroup wrote:
Hi all

I was wondering if there was a way for me to take the product attributes form and pass it to a controller so that it could validate the product attributes and return the error message or a success message using Ajax?

Thanks


Yes possible. You have to create a Action method that will call by Ajax. And this method will do necessary work.

You can see how nopcommerce OnePageCheckout work CheckoutController.cs, here will find lot of Actions that call by Ajax from View

And also you see how dynamic price update work in product details page it is also use Ajax.
6 years ago
Thank you for replying.

I cannot seem to spot the bit of coding that you may be referring to. What i wanted is just to have a method where i pass a product, the FormCollection form passed and it just spits out a list of errors (if any). Does such a function currently exist and if so can you point me in its direction?

Thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.