I’m looking to add some constrains when buying products on the website. I want to have a min, max, and step configuration per product. But I don’t know how to modify the product page.
My plan:
Add the (min, max, step) fields to each product. then modify the product and cart page, to make the + - widgets use the field values as constraints.
But I don’t know how to customize the product page properly. Without modifying ERPNext source code.
Hey! Thanks, sadly not good enough for what I need. I need to change the template, I wonder is there any way to inherit/expand it or just overwrite it. I’ve tried looking around but no dice.
If you have multiple sites in that bench environment then please specify the site when migrate. bench --site <sitename> migrate (basically this should compile your python files) and a bench restart should make it all effective.
i only have a single site, the other python files are working, but this index.py which i changed some code to override website products attributes is not working.
for checking i commented the following line, context.items = engine.query(attribute_filters, field_filters, search, start)
its supposed not to display items in the product page as i commented the line, but its still displaying.
i think its still reading the code from erpnext/www/all-products/index.py not from my custom app custom_app/www/all-products/index.py
in custom_app’s hooks.py i already added this line, template_apps = ['custom_app', 'erpnext']
in the result, index.html is working from custom_app, but not index.py