My next project (which is to be done at some point before the end of the coming weekend) is to implement a system of "related products". There are loads of already made addons that can relate one product to another and so on…
But none of them are good enough to put into my clients site. So I determined to code a "related products" module that better fits the needs of the Site Owner.
Requirements
Each product needs the ability to be related to a small number of any products, in 3 categories;
- "Worse" products. These are products that are similar to the product being looked at, but may be less expensive.
- "Better" products. The inverse of the above.
- "Related" products. Products that have a very close alternative, but don't really class as "worse" or "better".
Special handling of the better/worse products
If a product (blue widget) has a better version (blue turbo widget), and this is assigned, then also assigned must be the blue widget as a "worse" product than the turbo widget. Hope that makes sense ?
A fairly straightforward system, that won't take very long to code up
The general idea is to (somewhat) replicate the 2.3.1 larger images system and add 3 more similarly coded pieces to categories.php to add the relationships between products. In the shop side, I will then create three new modules based on products_id, and grab the "better", "worse" and "related" products and show them in appropriate places.
I'll update the post over the weekend as I get bits and pieces of this coded up.

