Generate Reference June 15, 2020, 01:12:34 PM Hello guys,Maybe someone could give me a little help.I've this tablescategoryid_categorynamecode_categorysubcategoryid_subcategoryid_categorynamecode_subcategoryproductid_productid_categoryid_subcategorynamecode_productWhen I'm creating a new product, what I do is that I select a category, then a subcategory (filtered from categories), then give it a name.What I'd like to do is to have an autogenerated product code with like this (category code + subcategory code + autoincrement number), them pass it to the databaseAny Idea about how to achieve this?Many thanks Quote Selected
Re: Generate Reference Reply #1 – June 15, 2020, 01:22:25 PM @xela05 please use the action before add to write the code for generating your code and pass the value to $modeldata['fieldname']. E.gCode: [Select]$modeldata['code_product'] = "GRD001"; Quote Selected
Re: Generate Reference Reply #2 – June 15, 2020, 01:25:20 PM Thanks for the answer, my problem is, how do I retrieve the category and subcategory code that I selected on the dropdown? Quote Selected
Re: Generate Reference Reply #3 – June 15, 2020, 03:05:47 PM @xela05 by doing a query for category and subcategory using the id_category and id_subcategory to get category and subcategory code. Note: There are code snippets in the Page Events configuration you can modify and use. Quote Selected