Jump to content

Can I increase the number of "Customers also bought"...?


Guest

Recommended Posts

Is it possible to increase the number of products shown at the bottom of a product listing where it says "Customers who bought this also bought…"

It seems to default to 3, but I can't find anything in the admin sections to increase it? It looks like five would fit across a standard page?

i.e. here -

custalsobought.jpg

Link to comment
Share on other sites

Go to

Includes/content/viewProd.inc.php and find

$query = sprintf("SELECT DISTINCT O.productId, I.name, I.image, I.price, I.sale_price FROM %1\$sCubeCart_order_inv AS O, %1\$sCubeCart_inventory AS I WHERE I.disabled = 0 AND I.productId = O.productId AND O.cart_order_id IN (SELECT DISTINCT cart_order_id FROM %1\$sCubeCart_order_inv WHERE productId = %2\$d) AND O.productId <> %2\$d LIMIT 3;", $glob['dbprefix'], $db->MySQLSafe($_GET['productId'], ''));

And change LIMIT 3 to LIMIT whatever you feel like,

Think that should do the trick, haven't tested it though.

Link to comment
Share on other sites

Go to

Includes/content/viewProd.inc.php and find

$query = sprintf("SELECT DISTINCT O.productId, I.name, I.image, I.price, I.sale_price FROM %1\$sCubeCart_order_inv AS O, %1\$sCubeCart_inventory AS I WHERE I.disabled = 0 AND I.productId = O.productId AND O.cart_order_id IN (SELECT DISTINCT cart_order_id FROM %1\$sCubeCart_order_inv WHERE productId = %2\$d) AND O.productId <> %2\$d LIMIT 3;", $glob['dbprefix'], $db->MySQLSafe($_GET['productId'], ''));

And change LIMIT 3 to LIMIT whatever you feel like,

Think that should do the trick, haven't tested it though.

Smashing! Thanks "LastWolf" !!!! :D Will try that later and report back...

Regards

Dave, Bits4Vits

Link to comment
Share on other sites

Almost!

Thanks "LastWolf"... there's too "Limit 3" conditions in the code, one a few lines below... but got there in the end -

alsobought2.jpg

MANY THANKS :yeahhh: for that, it's a good selling tool, so why limit it to three products?

Cheers!

Dave, Bits4Vits

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...