ZC version 1.5.7
I encountered a problem with the section Customers who bought this product also purchased... It does not get filled automatically on product pages and stays blank. The problem seems to arise from a change in the file includes\modules\also_purchased_products.php in the new 1.5.7 version of ZC. The solution was to change line 15 of also_purchased_products.php from:
Code:
$also_purchased_products = $db->ExecuteRandomMulti(sprintf(SQL_ALSO_PURCHASED, (int)$_GET['products_id'], (int)$_GET['products_id'], (int)MAX_DISPLAY_ALSO_PURCHASED));
To:
Code:
$also_purchased_products = $db->ExecuteRandomMulti(sprintf(SQL_ALSO_PURCHASED, (int)$_GET['products_id'], (int)$_GET['products_id'], (int)MAX_DISPLAY_ALSO_PURCHASED), MAX_DISPLAY_ALSO_PURCHASED);
The sprintf function takes one additional argument in the last ZC version, namely MAX_DISPLAY_ALSO_PURCHASED but the $db->ExecuteRandomMulti method still requires the value of MAX_DISPLAY_ALSO_PURCHASED otherwise it defaults to zero and nothing gets displayed in the section.