uvip Posted May 5, 2014 Share Posted May 5, 2014 I am wondering if there is a setting to disable the display of products purchased by a customer on his profile. I mean when I click on a customer's profile, and it will show up his carts, orders and products, but I do not want to see the products in his profile, then how to close this function? Thanks Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted May 5, 2014 Share Posted May 5, 2014 Hi, I can't recomend to you any module for this, but there is SQL-query for your purpose: SELECT od.product_id, pl.name FROM `ps_order_detail` od JOIN `ps_orders` o ON (o.`id_order` = od.`id_order`) JOIN `ps_customer` c ON (c.`id_customer` = o.`id_customer`) JOIN `ps_product_lang` pl ON (pl.`id_product` = od.`product_id`) WHERE 1 AND pl.id_lang = 1 AND c.`id_customer` = 777 Regards Link to comment Share on other sites More sharing options...
uvip Posted May 6, 2014 Author Share Posted May 6, 2014 Hi, I can't recomend to you any module for this, but there is SQL-query for your purpose: SELECT od.product_id, pl.name FROM `ps_order_detail` od JOIN `ps_orders` o ON (o.`id_order` = od.`id_order`) JOIN `ps_customer` c ON (c.`id_customer` = o.`id_customer`) JOIN `ps_product_lang` pl ON (pl.`id_product` = od.`product_id`) WHERE 1 AND pl.id_lang = 1 AND c.`id_customer` = 777 Regards Thanks for your information. I am wondering if there is a way to show up the products in multiple pages so the system will not pull up all the data together, and I think it will make the process faster if the customer had thousands of products on his profile. Thanks Link to comment Share on other sites More sharing options...
uvip Posted May 12, 2014 Author Share Posted May 12, 2014 Thanks for your information. I am wondering if there is a way to show up the products in multiple pages so the system will not pull up all the data together, and I think it will make the process faster if the customer had thousands of products on his profile. Thanks Anyone has ideas about how to do it? Thanks Link to comment Share on other sites More sharing options...
vekia Posted May 12, 2014 Share Posted May 12, 2014 you can add there LIMIT sql code SELECT od.product_id, pl.name FROM `ps_order_detail` od JOIN `ps_orders` o ON (o.`id_order` = od.`id_order`) JOIN `ps_customer` c ON (c.`id_customer` = o.`id_customer`) JOIN `ps_product_lang` pl ON (pl.`id_product` = od.`product_id`) WHERE 1 AND pl.id_lang = 1 AND c.`id_customer` = 777 LIMIT x,10 replace X with $_GET['mypagination'] variable which will be number of the page for example: &mypagination=1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now