amandat Posted December 19, 2005 Share Posted December 19, 2005 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? Thanks, Amanda Quote Link to comment Share on other sites More sharing options...
241 Posted December 19, 2005 Share Posted December 19, 2005 yes change the order by in the query from rand() to product_id or to sort_order Quote 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! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
flom Posted January 3, 2006 Share Posted January 3, 2006 in which file? and how can i set the sort order then in the admin-area? furthermore: how may i change it to 4 columns and 3 rows of displayed products? Quote Link to comment Share on other sites More sharing options...
flom Posted January 3, 2006 Share Posted January 3, 2006 i guess the 4 columns-thing has to be changed here somehow: file: /catalog/featured_products.php place: 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'])); } ?> <tr> <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> </tr> <tr> <td colsp?an="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } can u help please? Quote Link to comment Share on other sites More sharing options...
kdikpita Posted March 16, 2007 Share Posted March 16, 2007 Just look for "if ($col > 2) {" in includes/modules/featured.php and change the 2 for 3 ... But now the columns are "out of place" (sorry for my english) as you can see in www.toysoldiermaquetas.com. Any solution? Quote Link to comment Share on other sites More sharing options...
kdikpita Posted March 16, 2007 Share Posted March 16, 2007 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: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.