upgrade4u Posted June 26, 2010 Share Posted June 26, 2010 I would like to trace which product clicks most.Is any module or bundled module work with ?Thanks !!! Link to comment Share on other sites More sharing options...
rocky Posted June 27, 2010 Share Posted June 27, 2010 Go to Stats > Best products (in the Navigation column), then click the "Page v.i." column to sort by the number of times the product has been viewed. Link to comment Share on other sites More sharing options...
upgrade4u Posted June 27, 2010 Author Share Posted June 27, 2010 thanks for your reply,but i can't find any product in this page... it any setting i missed in this module ? Link to comment Share on other sites More sharing options...
rocky Posted June 27, 2010 Share Posted June 27, 2010 The problem is that it doesn't display products that haven't been bought yet. You'd have to modify modules/statsbestproducts/statsbestproducts.php and delete the following lines from the queries to display all products: WHERE p.active = 1 AND o.valid = 1 AND o.invoice_date BETWEEN '.$dateBetween.' Link to comment Share on other sites More sharing options...
upgrade4u Posted June 27, 2010 Author Share Posted June 27, 2010 i found 2 similar code in this filesshould i delete both ?> Link to comment Share on other sites More sharing options...
upgrade4u Posted June 27, 2010 Author Share Posted June 27, 2010 public function getTotalCount($dateBetween) { $result = Db::getInstance()->GetRow(' SELECT COUNT(DISTINCT p.`id_product`) totalCount FROM `'._DB_PREFIX_.'product` p LEFT JOIN '._DB_PREFIX_.'order_detail od ON od.product_id = p.id_product LEFT JOIN '._DB_PREFIX_.'orders o ON od.id_order = o.id_orderWHERE p.active = 1 AND o.valid = 1 AND o.invoice_date BETWEEN '.$dateBetween); return $result['totalCount']; }AND FROM '._DB_PREFIX_.'product p LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (p.id_product = pl.id_product AND pl.id_lang = '.intval($this->getLang()).') LEFT JOIN '._DB_PREFIX_.'order_detail od ON od.product_id = p.id_product LEFT JOIN '._DB_PREFIX_.'orders o ON od.id_order = o.id_order LEFT JOIN '._DB_PREFIX_.'currency c ON o.id_currency = c.id_currencyWHERE p.active = 1 AND o.valid = 1 AND o.invoice_date BETWEEN '.$dateBetween.' GROUP BY od.product_id'; Link to comment Share on other sites More sharing options...
rocky Posted June 27, 2010 Share Posted June 27, 2010 Yes, change the first one from: WHERE p.active = 1 AND o.valid = 1 AND o.invoice_date BETWEEN '.$dateBetween); to: WHERE p.active = 1'); and the second one from: WHERE p.active = 1 AND o.valid = 1 AND o.invoice_date BETWEEN '.$dateBetween.' to: WHERE p.active = 1 Link to comment Share on other sites More sharing options...
upgrade4u Posted June 27, 2010 Author Share Posted June 27, 2010 i am so happy recieved ur reply,but according ur code, i found all page under stats become blank page.would u mind telling me more about this ? Link to comment Share on other sites More sharing options...
rocky Posted June 27, 2010 Share Posted June 27, 2010 For some reason, the forums are deleting some apostrophes in my code. I've attach the modified file. statsbestproducts.php Link to comment Share on other sites More sharing options...
upgrade4u Posted June 27, 2010 Author Share Posted June 27, 2010 Many Many Thanks !! AFter i replaced with ur file.The stats page recover, but still display a blank page in all BEST modules.....Best product, best categories, best supplier, best promotion.......cry...cry.......what i go wrong ? Link to comment Share on other sites More sharing options...
rocky Posted June 27, 2010 Share Posted June 27, 2010 Replacing that file should not affect the "Best categories", "Best supplier" or "Best promotion" modules. It should only affect the "Best products" module. It's working on my test site. Now all products including ones with a quantity of 0 are displayed in the "Best products" module. Link to comment Share on other sites More sharing options...
rocky Posted June 27, 2010 Share Posted June 27, 2010 You should edit config/config.inc.php and temporarily change 'display_errors' from 'off' to 'on' so that you get an error message instead of a blank page. Post the error message here. Link to comment Share on other sites More sharing options...
upgrade4u Posted June 27, 2010 Author Share Posted June 27, 2010 is it the problem which i am using traditional chinese ? Link to comment Share on other sites More sharing options...
rocky Posted June 27, 2010 Share Posted June 27, 2010 It shouldn't matter. The "Best products" module is designed to use the currently selected language. Link to comment Share on other sites More sharing options...
upgrade4u Posted June 27, 2010 Author Share Posted June 27, 2010 Omm...........I remember i never have any data in all BEST modules ....is any problem during my configuration ? Link to comment Share on other sites More sharing options...
rocky Posted June 27, 2010 Share Posted June 27, 2010 I have no idea why you don't have any stats. It's not something I can solve without having a look at your Back Office and your database. Link to comment Share on other sites More sharing options...
upgrade4u Posted June 27, 2010 Author Share Posted June 27, 2010 would u mind tell me which table is hosting the best product data ?then i can verify the existing information ? Link to comment Share on other sites More sharing options...
rocky Posted June 27, 2010 Share Posted June 27, 2010 It reads many tables including ps_product, ps_product_lang, ps_product_attribute, ps_page, ps_page_viewed, ps_date_range, ps_order_detail, ps_orders and ps_currency. Link to comment Share on other sites More sharing options...
upgrade4u Posted June 27, 2010 Author Share Posted June 27, 2010 i found the following table is empty ._page_viewed .....any suggestions ? Link to comment Share on other sites More sharing options...
rocky Posted June 27, 2010 Share Posted June 27, 2010 It looks like statistics aren't being recorded for some reason. Make sure that the "Data mining for statistics v1.0" module is installed on the Modules tab (in the Stats section). Link to comment Share on other sites More sharing options...
upgrade4u Posted June 27, 2010 Author Share Posted June 27, 2010 installed....but the table of product_viewed have data inside... Thanks u keep answering my question, Rocky. Link to comment Share on other sites More sharing options...
rocky Posted June 27, 2010 Share Posted June 27, 2010 Do you mean that you installed the module or that it was already installed? If it was already installed, I'm out of ideas for how to help you. Link to comment Share on other sites More sharing options...
upgrade4u Posted July 7, 2010 Author Share Posted July 7, 2010 i found category page view have data, but i can't access page view of each product.anyone can help ? Link to comment Share on other sites More sharing options...
GS VISION Posted September 30, 2010 Share Posted September 30, 2010 I want to bring this info to the front office on products page to be like:Product views: xxx timesAny suggestions? Link to comment Share on other sites More sharing options...
htech Posted April 23, 2011 Share Posted April 23, 2011 any solutions to this post ? dieing to get something like this going! I want to bring this info to the front office on products page to be like:Product views: xxx timesAny suggestions? Link to comment Share on other sites More sharing options...
Recommended Posts