Sarah_h Posted November 30, 2005 Share Posted November 30, 2005 Hi all, Would it be possible to use images within the bestsellers infobox instead of the text links. My clients gallery makes use of sm, med, lg images and it would look good to have a column of small bestseller images in this infobox. How would I get started on this? Thanks Sarah Link to comment Share on other sites More sharing options...
wayneo Posted November 30, 2005 Share Posted November 30, 2005 Hi there Sarah, check out the scrolling bestsellers box on my site here If this is what you want then click here Follow what is says in the readme file, good luck Link to comment Share on other sites More sharing options...
Sarah_h Posted November 30, 2005 Author Share Posted November 30, 2005 Thanks for that. Your site showed exactly what I was looking for, however the contrib just scrolls the text links, I was after the text links replaced with images?! Are you able to direct me as to how I might do that? Thanks Sarah Link to comment Share on other sites More sharing options...
wayneo Posted December 4, 2005 Share Posted December 4, 2005 Thanks for that. Your site showed exactly what I was looking for, however the contrib just scrolls the text links, I was after the text links replaced with images?! Are you able to direct me as to how I might do that? Thanks Sarah Can you send me the link to your site pls, i'm not quite sure what you meant??? Link to comment Share on other sites More sharing options...
Sarah_h Posted December 4, 2005 Author Share Posted December 4, 2005 Can you send me the link to your site pls, i'm not quite sure what you meant??? The site is on my local machine at the moment while development is in progress so I don't have a link. Your site shows scrolling pictures of your best sellers with the description link below it. While the contrib I downloaded and installed simply scrolls description links, there are no images! So your site shows what I was looking for alright, but its simply that the images are missing. I'm sure I followed the contrib to the letter! Here is the code in Bestsellers 1: <!-- best_sellers //--> <?php if ($cPath) { $best_sellers_query = tep_db_query("select distinct p.products_id, pd.products_name, p.products_ordered from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and (c.categories_id = '" . $current_category_id . "' OR c.parent_id = '" . $current_category_id . "') order by p.products_ordered DESC, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS); } else { $best_sellers_query = tep_db_query("select p.products_id, pd.products_name, p.products_ordered from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' order by p.products_ordered DESC, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS); } if (tep_db_num_rows($best_sellers_query) >= MIN_DISPLAY_BESTSELLERS) { ?> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_BESTSELLERS ); new infoBoxHeading($info_box_contents, false, false); $rows = 0; $info_box_contents = array(); while ($best_sellers = tep_db_fetch_array($best_sellers_query)) { $rows++; $info_box_contents[] = array('align' => 'left', 'text' => tep_row_number_format($rows) . '. <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id'], 'NONSSL') . '">' . $best_sellers['products_name'] . '</a>'); } new infoBox5($info_box_contents); ?> </td> </tr> <?php } ?> <!-- best_sellers_eof //--> Looking at it, the SELECT does not select an image and this line does not provide an output for one either so could this be the problem? 'text' => tep_row_number_format($rows) . '. <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id'], 'NONSSL') . '">' . $best_sellers['products_name'] . '</a>'); Hope you can help. Sarah Link to comment Share on other sites More sharing options...
wayneo Posted December 9, 2005 Share Posted December 9, 2005 The site is on my local machine at the moment while development is in progress so I don't have a link. Your site shows scrolling pictures of your best sellers with the description link below it. While the contrib I downloaded and installed simply scrolls description links, there are no images! So your site shows what I was looking for alright, but its simply that the images are missing. I'm sure I followed the contrib to the letter! Here is the code in Bestsellers 1: <!-- best_sellers //--> <?php if ($cPath) { $best_sellers_query = tep_db_query("select distinct p.products_id, pd.products_name, p.products_ordered from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and (c.categories_id = '" . $current_category_id . "' OR c.parent_id = '" . $current_category_id . "') order by p.products_ordered DESC, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS); } else { $best_sellers_query = tep_db_query("select p.products_id, pd.products_name, p.products_ordered from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' order by p.products_ordered DESC, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS); } if (tep_db_num_rows($best_sellers_query) >= MIN_DISPLAY_BESTSELLERS) { ?> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_BESTSELLERS ); new infoBoxHeading($info_box_contents, false, false); $rows = 0; $info_box_contents = array(); while ($best_sellers = tep_db_fetch_array($best_sellers_query)) { $rows++; $info_box_contents[] = array('align' => 'left', 'text' => tep_row_number_format($rows) . '. <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id'], 'NONSSL') . '">' . $best_sellers['products_name'] . '</a>'); } new infoBox5($info_box_contents); ?> </td> </tr> <?php } ?> <!-- best_sellers_eof //--> Looking at it, the SELECT does not select an image and this line does not provide an output for one either so could this be the problem? 'text' => tep_row_number_format($rows) . '. <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id'], 'NONSSL') . '">' . $best_sellers['products_name'] . '</a>'); Hope you can help. Sarah Hi there Sarah, the problem is it is not on the net yet!! I think???? When you have it up and running you should buy some stuff, best to do it anyway to make sure it is working ok. If you download the contrib for direct deposit payment into your bank account then you will not tick up any credit like on Paypal. When you make these test purchases the scrolling piccys should happen then. If not then send me the link and i'll have a look at it for you. Good luck Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.