Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Bestselling Products Page


SjoerdNL

Recommended Posts

Hey,

 

There is not a recent topic displayed for this contribution using the search. Probably there never was an 'official' one in the contribution support forum, but I still have a question about this contribution:

 

http://www.oscommerce.com/community/contri...arch,bestseller

 

I installed this contribution on my development shop. Everything seems to work great. But the numbers are displayed in text. And I really want to display these numbers with some custom images I have.

Something like the top 10 used @ frontlineshop.com.

 

It's the first column, using this code

$bestsellers_list .= '<tr><td class="infoBoxContents" valign="top">' . tep_row_number_format($rows) . '.
</td>

 

It's the part where it says tep_row_number_format($rows). I want this to change into code which displays the corresponding image. So the text that says 01. now, should be something like this:

 

tep_image(DIR_WS_IMAGES . $best_sellers['products_image'], $best_sellers['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT)

 

But then it needs to point to the right number image:

01. --> images/no1.gif

02. --> images/no2.gif

etc...

Till the last item displayed, which would be: 10.

 

Can somebody help me with the correct line of code to implement in this part of the query?

Is there some additional information required?

 

Thanks in advance.

Link to comment
Share on other sites

I haven't solved it yet. Hope someone can help me. I've included the complete code for the corresponding layout.

 

What I want is to display images of the corresponding position in the bestsellers list, and not the numbers which are in text at the moment.

 

	  $bestsellers_list .= '<tr><td class="infoBoxContents" valign="top">' . tep_row_number_format($rows) . '.
</td><td class="infoBoxContents" valign="top" align="center">
<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $best_sellers['products_image'], $best_sellers['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT,' class="shadow1" ') . '</a><br><br>
</td><td class="infoBoxContents" valign="top" align="left">
<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id']) . '">' . $best_sellers['products_name'] . '</a><BR><BR>  
<a title="more info" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id']) . '">' . 'more info</a>  |  
<a title="buy now" href="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $best_sellers['products_id']) . '">' . 'buy now</a><br><br>
</td><td class="infoBoxContents" valign="top" align="right">'
. $currencies->display_price($best_sellers['products_price'], tep_get_tax_rate($best_sellers['products_tax_class_id'])) . 
'</td></tr>';

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...