hey all
I have a quickie, with the code here is there any way I can easily make the products random? have tried a few things but not working? I is currently picking up the most viewed products, we want the most viewed top 20-40 in a random order
<?php if ($products) {
//used on the site for the top sliding banner
?>
<div id="carousel_">
<ul class="jcarousel-skin-opencart">
<?php foreach ($products as $product) { ?>
<li>
<div class="prod"> <a href="<?php echo str_replace('&', '&', $product['href']); ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $products[$j]['name']; ?>" alt="<?php echo $product['name']; ?>" /></a> </div>
</li>
<?php } ?>
</ul>
</div>
<script type="text/javascript"><!--
$('#carousel_ ul').jcarousel({
vertical: false,
auto:16,
visible: <?php echo $limit; ?>,
scroll: <?php echo $scroll; ?>,
wrap:'circular',
buttonNextHTML:'',
buttonPrevHTML:null
});
//--></script>
<?php } ?>