I want to sort products by manufacturer, but also allow store manager to override this easily.
My first idea was to use category-product position and set it while creating product programmatically, but I couldn't find any appropriate method (it used to be possible in 1.9 with assignProduct - Set Category Product Position of Products ).
My new idea is to use SQL to update all products with position 0 based on manufacturer name. Manufacturer name can be found in eav_attribute_option_value and position is in catalog_category_product_index, but how can I join them?
Thank you in advance for any hints on either approach to the task