mazza Posted April 5, 2003 Share Posted April 5, 2003 I made this for myself to compare the views and purchases. It helps finding products that have some flaw in picture, description or something similar. Open file admin/stats_products_purchased.php find: <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_NUMBER; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_PURCHASED; ?> </td> add after: <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_VIEWED; ?> </td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_CONVERSION; ?> </td> find: $products_query_raw = "select p.products_id, p.products_ordered, pd.products_name pd.products_viewed from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pd.language_id = '" . $languages_id. "' and p.products_ordered > 0 group by pd.products_id order by p.products_ordered DESC, pd.products_name"; replace with: $products_query_raw = "select p.products_id, p.products_ordered, pd.products_name, pd.products_viewed, ((p.products_ordered / pd.products_viewed)*100) as conversion from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pd.language_id = '" . $languages_id. "' and p.products_ordered > 0 group by pd.products_id order by conversion DESC, pd.products_name"; find: <td class="dataTableContent" align="center"><?php echo $products['products_ordered']; ?> </td> add after: <td class="dataTableContent" align="center"><?php echo $products['products_viewed']; ?></td> <td class="dataTableContent" align="center"><?php echo $products['conversion']; ?><?php echo '%'; ?></td> Open admin/includes/languages/english/stats_products_purchased.php and add: define('TABLE_HEADING_VIEWED', 'Viewed'); define('TABLE_HEADING_CONVERSION', 'Conversion'); If someone would like to build a better interface with maybe sorting capabilities and stuff and release it as a contribution, you have my blessings. "Use no way as way, have no limitation as limitation." - Bruce Lee Link to comment Share on other sites More sharing options...
Guest Posted April 5, 2003 Share Posted April 5, 2003 nicely done - some interesting information (and some sad information too) :cry: :lol: :lol: thank you 8) Link to comment Share on other sites More sharing options...
oishf7 Posted April 5, 2003 Share Posted April 5, 2003 Splendid. Works great. Very simple and easy change to make for some very useful information. Thank you Thank you! Link to comment Share on other sites More sharing options...
Waza04 Posted April 6, 2003 Share Posted April 6, 2003 Hiya, Works a treat!!! Thank You!! :D Warren Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.