Right written up a solution for you, give it a go and let me know how you get on.. BACKUP BACKUP BACKUP..
Ok so create a template version of your
includes/modules/sideboxes/featured.php
and put it:
includes/modules/sideboxes/YOUR_TEMPLATE/featured.php
find:
PHP Code:
$random_featured_products_query = "select p.products_id, p.products_image, pd.products_name,
p.master_categories_id
from (" . TABLE_PRODUCTS . " p
left join " . TABLE_FEATURED . " f on p.products_id = f.products_id
left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
where p.products_id = f.products_id
and p.products_id = pd.products_id
and p.products_status = 1
and f.status = 1
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
and change to:
PHP Code:
$random_featured_products_query = "select p.products_id, p.products_image, pd.products_name,
p.master_categories_id
from (" . TABLE_PRODUCTS . " p
left join " . TABLE_FEATURED . " f on p.products_id = f.products_id
left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
where p.products_id = f.products_id
and p.products_id = pd.products_id
and p.products_id != 100
and p.products_status = 1
and f.status = 1
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
notice we added this line:
and p.products_id != 100
you need to change the “100” to the products_id of the product you want at the top. So putting this here we are stopping it from being called into the standard loop. before you go further, check that it has now stopped that product from showing in the box.
Then we need to hard code in above where the rest of the results are outputted.
So then create a copy/ template override of:
includes/templates/template_default/sideboxes/tpl_featured.php
and locate it:
includes/templates/YOUR_TEMPLATE/sideboxes/tpl_featured.php
then find this:
PHP Code:
$content = "";
$content .= '<div class="sideBoxContent centeredContent">';
$featured_box_counter = 0;
while (!$random_featured_product->EOF) {
$featured_box_counter++;
$featured_box_price = zen_get_products_display_price($random_featured_product->fields['products_id']);
$content .= "\n" . ' <div class="sideBoxContentItem">';
$content .= '<a href="' . zen_href_link(zen_get_info_page($random_featured_product->fields["products_id"]), 'cPath=' . zen_get_generated_category_path_rev($random_featured_product->fields["master_categories_id"]) . '&products_id=' . $random_featured_product->fields["products_id"]) . '">' . zen_image(DIR_WS_IMAGES . $random_featured_product->fields['products_image'], $random_featured_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
$content .= '<br />' . $random_featured_product->fields['products_name'] . '</a>';
$content .= '<div>' . $featured_box_price . '</div>';
$content .= '</div>';
$random_featured_product->MoveNextRandom();
}
$content .= '</div>' . "\n";
And change to this, NOTE! you need to change the values as specified below where commented:
PHP Code:
$content = "";
$content .= '<div class="sideBoxContent centeredContent">';
//
//added to hard code one to always show at the top
//
//values that need to be replaced:
//100 – needs to be changed to your product id. It is referred to three times
//200 – needs to be changed to the above products master category id appears once.
//productsimage.jpg need to change to the image file name for the product referred to once.
//Products Name Here needs to change to the actual products name reffered to twice.
$featured_box_price = zen_get_products_display_price(100);
$content .= "\n" . ' <div class="sideBoxContentItem">';
$content .= '<a href="' . zen_href_link(zen_get_info_page(100), 'cPath=' . zen_get_generated_category_path_rev(200) . '&products_id=100">' . zen_image(DIR_WS_IMAGES . 'productsimage.jpg', 'Products Name Here', SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
$content .= '<br />Products Name Here</a>';
$content .= '<div>' . $featured_box_price . '</div>';
$content .= '</div>';
//
// end hard code product
//
//
$featured_box_counter = 0;
while (!$random_featured_product->EOF) {
$featured_box_counter++;
$featured_box_price = zen_get_products_display_price($random_featured_product->fields['products_id']);
$content .= "\n" . ' <div class="sideBoxContentItem">';
$content .= '<a href="' . zen_href_link(zen_get_info_page($random_featured_product->fields["products_id"]), 'cPath=' . zen_get_generated_category_path_rev($random_featured_product->fields["master_categories_id"]) . '&products_id=' . $random_featured_product->fields["products_id"]) . '">' . zen_image(DIR_WS_IMAGES . $random_featured_product->fields['products_image'], $random_featured_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
$content .= '<br />' . $random_featured_product->fields['products_name'] . '</a>';
$content .= '<div>' . $featured_box_price . '</div>';
$content .= '</div>';
$random_featured_product->MoveNextRandom();
}
$content .= '</div>' . "\n";
this solution is obvioisly hard coded and is no way dynamic, so at anytime you want that product changed you will have to manually change the values specified. Also more importanly, if that product ever seases to exist the code will most likey break, in which case you will need to revert back/remove the hard coded part of the code.
hope this work.. not tested but should work, in theory..