Extending simple admin interface - How to?
Posted: 24 Aug 2016, 19:13
Hi, I would like to know how exactly one would extend the easy admin interface, e.g. adding customer groups to prices (in combination with the ai-customergroups extension).
I guess I would have to add a subpart via:
admin/jqadm/product/price/standard/subparts
Which implements the corresponding get, save, ... etc. methods and adds its own template.
That way I can then render the select box (multi-select) or via checkboxes for the available groups in my own template which is automatically appended via priceBody to the default template.
And get/save, etc. would would need to take care that the set values are stored correctly to database?
Anything else?
How would I retrieve data via ajax as I think is done for the languages?
Am I correct in assuming that I can retrieve options via the features already implemented in jsonadm, even for customer groups, like .e.g.:
Aimeos.getOptions(request, response, element, 'customer/group', 'customer.group.label', 'customer.group.id', criteria);
And by adding something like:
$(".product-customer-group .combobox").combobox({
getfcn: Aimeos.getOptionsCustomerGroups,
select: Aimeos.Product.CustomerGroup.select
});
and implementing the corresponding Aimeos.getOptionsCustomerGroups javascript method and the corresponding select method?
Anything else or anxthing to do differently?
I guess I would have to add a subpart via:
admin/jqadm/product/price/standard/subparts
Which implements the corresponding get, save, ... etc. methods and adds its own template.
That way I can then render the select box (multi-select) or via checkboxes for the available groups in my own template which is automatically appended via priceBody to the default template.
And get/save, etc. would would need to take care that the set values are stored correctly to database?
Anything else?
How would I retrieve data via ajax as I think is done for the languages?
Am I correct in assuming that I can retrieve options via the features already implemented in jsonadm, even for customer groups, like .e.g.:
Aimeos.getOptions(request, response, element, 'customer/group', 'customer.group.label', 'customer.group.id', criteria);
And by adding something like:
$(".product-customer-group .combobox").combobox({
getfcn: Aimeos.getOptionsCustomerGroups,
select: Aimeos.Product.CustomerGroup.select
});
and implementing the corresponding Aimeos.getOptionsCustomerGroups javascript method and the corresponding select method?
Anything else or anxthing to do differently?