Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Featured Products - Not random?


Recommended Posts

I am the Featured Products Contribution and notice that the products randomly come up and the order changes with each refresh.


I do not want that to be random and actually want a few products always at the very top. Is there a way to do this with this contribution? Make it so it is not random?




Link to comment
Share on other sites

yes change the order by in the query from rand() to product_id or to sort_order

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

  • 3 weeks later...

i guess the 4 columns-thing has to be changed here somehow:

file: /catalog/featured_products.php


	while ($featured_products = tep_db_fetch_array($featured_products_query)) {
  if ($new_price = tep_get_products_special_price($featured_products['products_id'])) {
	$products_price = '<s>' . $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</span>';
  } else {
	$products_price = $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id']));
		<td width="<?php echo SMALL_IMAGE_WIDTH + 10; ?>" valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $featured_products['products_image'], $featured_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; ?></td>
		<td valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '"><b><u>' . $featured_products['products_name'] . '</u></b></a><br>' . TEXT_DATE_ADDED . ' ' . tep_date_long($featured_products['products_date_added']) . '<br>' . TEXT_MANUFACTURER . ' ' . $featured_products['manufacturers_name'] . '<br><br>' . TEXT_PRICE . ' ' . $products_price; ?></td>
		<td align="right" valign="middle" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_FEATURED_PRODUCTS, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $featured_products['products_id']) . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>'; ?></td>
		<td colsp?an="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

can u help please?

Link to comment
Share on other sites

  • 1 year later...

ok everithing is ok now :lol:


After changing the $col> to 3 you must find in includes/modules/featured.php this .... 'class="smallText" width="33%" valign="top"', and change the 33% for 25%


.... it was so easy ... :rolleyes:


Regards from Spain :thumbsup:

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.

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...