Contributions
Variation to cross sell module
This is a variation to the original xsell module.
If a product has xsell products, those will be picked first. However, if the number of xsell products is below the maximum, random products from the same category will be selected to fill the rest. If NO xsell products exist, the box is filled with all random products from the same directory.
Why? well, I wanted to force some xsell products to come up but not all of them so I let the system fill the rest at random. To keep the recommendations a little rational, the random selection is forced from the same category.
zip only contains the xsell_products.php which will have to go into the catalog/includes/modules directory.
Expand All / Collapse All
There was another image error that improperly displayed xsell's that were manually added, I fixed it.
Also, I made the install file a little clearer on where to add the file.
Great contribution! Thanks to the predecessors!
v1.2.2 - Added install.txt file to package
v1.2.2 - Made slight modifications to line 93 so pictures would display properly
You also have to delete the PRODUCT in line 52 and 93.
Then all the pictures are shown.
Thanks for this great contrib.
The product images were not showing up in the cross sell box.
Line 145:
tep_image(DIR_WS_PRODUCT_IMAGES
Should be changed to
tep_image(DIR_WS_IMAGES
Without the PRODUCT in the code.
I have updated the package and reuploaded.
Rationality !!!
ofcourse you do not want the product you are looking at to come up in the random recommendations so the random selects need an additional condition :
p.products_id != '" . $HTTP_GET_VARS['products_id'] . "' and
I have corrected it in the new zip.
This is a variation to the original xsell module.
If a product has xsell products, those will be picked first. However, if the number of xsell products is below the maximum, random products from the same category will be selected to fill the rest. If NO xsell products exist, the box is filled with all random products from the same directory.
Why? well, I wanted to force some xsell products to come up but not all of them so I let the system fill the rest at random. To keep the recommendations a little rational, the random selection is forced from the same category.
zip only contains the xsell_products.php which will have to go into the catalog/includes/modules directory.
Note: Contributions are used at own risk.