Good day. Given the task of creating a module. The essence of the module is to identify similar products and write links to all similar products in the product. In the title itself there is the text “Add a plural field“ Similar goods ”to the“ Goods ”information block to store references to similar products. It is necessary to analyze the“ goods ”information block to identify similar goods by name. Why add a multiple field to the information block? How to analyze the information block ? I see that there is written about storing links, but it does not give answers :)
1 answer
You should study the courses on Bitrix judging by the question you don’t even understand basic concepts, it will be very difficult further.
Plural property. is a property of any type (string, date, binding to information block elements, etc.) that can store not one, but several values. In the form of adding properties there is a special daw for this "Plural". If you approach your task literally “to store links to similar products”, this is the type of string, if it is more correct to do it - Binding to the information block elements.
To analyze. To bypass all the products on the element and find similar to the specified criteria. For training purposes, you may need the PHP function similar_text . And take at what value (returned by this function) consider the goods the same.
- Many thanks - Anton Polezhanin