Contributions

Other (Category Index)
Search: 

Optimize also_purchased_products module

This module optimizes the also_purchased_products module.

Eliminates the (EXPLAIN) Use temporary, Use filesort.

Increases speed and performance on the product_info pages.

Includes screenshots of the explain query output.

Also, stock osC code is intact in this file and can be switch back and forth by a simple define at the top of the file.

Expand All / Collapse All

Super optimized also_purchased_products module scranmer 14 Oct 2005

--removed products that are not live--

I have rewritten the way the initial selections are done, this makes mySQL do all of the work and means there is no limit or penalty on very popular products. This now also only returns the number of items you would like to display (MAX_DISPLAY_ALSO_PURCHASED) and you can also change how this selects them by changing line 111&118 which currently selects the most popular products :-

Or
To select the most expensive products :-
111 - SELECT op2.products_id, p2.products_image, p2.products_price
118 - GROUP BY op2.products_id, p2.products_image, p2.products_price

Or
To select by the newest products :-
111 - SELECT op2.products_id, p2.products_image, p2.products_date_added
118 - GROUP BY op2.products_id, p2.products_image, p2.products_date_added

Or
To select by the products you have the most of :-
111 - SELECT op2.products_id, p2.products_image, p2.products_quantity
118 - GROUP BY op2.products_id, p2.products_image, p2.products_quantity

…. And the list goes on ….

The zip should be the complete install.

HTH

Si.

Super optimized also_purchased_products module scranmer 13 Oct 2005
Optimize also_purchased_products module v1.0a Chemo 11 Jan 2005
Optimize also_purchased_products module Chemo 7 Jan 2005
Optimize also_purchased_products module Chemo 6 Jan 2005

Note: Contributions are used at own risk.