This document describes the removal of product-to-product and category-to-product links via the product link unassignment bulk operation. The bulk operation allows the shop manager to unlink multiple target products or categories from multiple source products.
This diagram shows how the product links bulk unassignment operation can be triggered from the back office.
When the wizard is finished, a new batch job is created internally and the links are removed as part of that job.
Unlinking products from multiple source products is similar to removing a link of a single source product.
If one of the special link types (Warranty, Gift Wrap or Gift Message) is selected, only those target products can be selected that are linked to one of the source products via the specified link type.
If one of the special link types (Warranty, Gift Wrap or Gift Message) is selected, only those target categories can be selected that are linked to one of the source products via the specified link type.
Unassigning product and category links requires complex and costly evaluations on products. Also, you possibly have to deal with large amounts of data. It is essential to use database queries instead of evaluating business objects to ensure good performance .
If the sets of selected source and target products are retraceable from a search query (Simple or Advanced Search ["Edit All" also uses SimpleSearch]), the search parameters of these search queries are stored for further evaluation, not as an object UUID iterator.
Only if the user selects some product and uses "Edit Selected", the UUIDs of the concrete products are stored as an object iterator.
All the input parameters have to be combined in one database query to get the links and the count for unassignment.
This query is complex because all possibilities have to be considered. On the source side it is possible to have selected product UUIDs or search expressions to get source products.
Since it is possible to search within the target products too, the same aspects exist on the target side. Additionally, category UUIDs have to be considered here for the product-to-category links.
The picture shows a rough overview of the queries.