Page 1 of 1

Validation on Category

Posted: Tue Feb 10, 2015 4:27 am
by gvsrini
Hi,

I need a validation on View Category/View Product page to first select a warehouse (as Inventory/Stock is dependent on the warehouse). I have written the necessary logic in the Controllers (ProductController and CategoryController) to throw an Exception when the warehouse is not selected. Now, I want to display the message nicely before/after redirecting to the Home Page. How do I handle the same in my product.hml/category.html and what is the relevant portion of JS that gets called on Page Load.

Also, stock availabilty seems to be getting called from BLC_SKU entity directly (in the product.html page). How can I change it get called from my new Entity (which holds the map of Warehouse-wise-SKU Inventory position) instead.

Regards

Re: Validation on Category

Posted: Tue Feb 10, 2015 11:12 am
by gvsrini
I got the second part of the question working with inventory from my extended entity.

The only thing I need help on now is displaying the validation message on Category/Product screen as mentioned in my question earlier.

Re: Validation on Category

Posted: Thu Feb 12, 2015 12:00 am
by phillipuniverse
@gvsrini are you talking about in the admin? If so, you probably want http://www.broadleafcommerce.com/docs/c ... alidations