misantropo, on 13 May 2010, 22:32, said:
Hi,
Can I disable also purchased products only for gifts?
thanks!
Hello misantropo.
Yes you can.
It's just like it for any other module.
includes/modules/also_purchased_products.php
Just before "products_status = '1'" add "p.products_carrot = '0'".
In my case I had:
$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);
and now I have this:
$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_carrot = '0' and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit " . MAX_DISPLAY_ALSO_PURCHASED);
______
Hola Misantropo... si que puedes yo lo acabo de hacer.
Supongo que a estas alturas ya lo tendrás resuelto pero si no arriba indico como tienes que hacerlo... espero que te sirva de ayuda.
Un saludo...
Edited by 2 estilos, 09 July 2010, 11:08.