Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
Rikk03
Worker
Worker


Joined: Feb 16, 2004
Posts: 164

PostPosted: Thu May 06, 2004 3:13 am Reply with quote

Help!

I have this block that shows Special Priced Products, however it only shows one item with picture per page load, I want to either:

Add additional random pictures below from same source - but so as not to show the same random picture twice

OR

Rotate the pictures from same source - removing the random element the current code is as follows

Code:
if (eregi("block-OSCSpecials.php",$_SERVER['PHP_SELF'])) {


    Header("Location: index.php");


    die();

}



global  $cPath, $languages_id, $random_product;

  $currencies = new currencies();

  $content ='';



 if ($random_product = tep_random_select("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . "products" . " p, " . "products_description" . " pd, " . "specials" . " s where p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . $languages_id . "' and s.status = '1' order by s.specials_date_added DESC limit " . MAX_RANDOM_SELECT_SPECIALS)) {

  $content = '<center><a href="'.tep_href_link("product_info.php", 'products_id=' . $random_product["products_id"], 'NONSSL') . '">' . tep_image('modules/catalog/images/'.$random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link('product_info.php', 'products_id=' . $random_product['products_id'], 'NONSSL') . '">' . $random_product['products_name'] /*. '</a><br><s>'. $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id']))*/ . '</span></center>';   
 

}



?>


Any help would be greatly appreciated.

Regards

Richard
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©