Bonzo Posted February 28, 2005 Share Posted February 28, 2005 I would like to replace the "also-purchased-products" -module with a "products from same Manufacturer"-module, so when a customer looks at product_info.php he can see other products from same manufacturer in the box arranged at the bottom. I already did some changes, but have no idea what the sql-database query has to be like, anyone can help ? This is the "orders_query" that has to be replaced with a "product_by_same_manufacturer_query": if (isset($HTTP_GET_VARS['products_id'])) { $orders_query = tep_db_query("select p.products_id, p.products_image from " . TABLE_ORDERS_PRODUCTS . " opa, " . TABLE_ORDERS_PRODUCTS . " opb, " . TABLE_ORDERS . " o, " . TABLE_PRODUCTS . " p where opa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and opa.orders_id = opb.orders_id and opb.products_id != '" . (int)$HTTP_GET_VARS['products_id'] . "' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit " . MAX_DISPLAY_ALSO_PURCHASED); $num_products_ordered = tep_db_num_rows($orders_query); if ($num_products_ordered >= MIN_DISPLAY_ALSO_PURCHASED) { ?> Link to comment Share on other sites More sharing options...
Applied Posted February 28, 2005 Share Posted February 28, 2005 I'm interested in this as well. Hope someone can help. Link to comment Share on other sites More sharing options...
Applied Posted April 25, 2005 Share Posted April 25, 2005 can anyone help us here? Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted April 25, 2005 Share Posted April 25, 2005 do you want to show any products from the same manufacturer, or only the ones that have been ordered in the past ? KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
Applied Posted April 28, 2005 Share Posted April 28, 2005 I want it to show any products from the same manufacturer, or all of them. do you want to show any products from the same manufacturer, or only the ones that have been ordered in the past ? <{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.