Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This is a working peace of code, hope it will help.</p> <pre><code>&lt;?php // Carousel ?&gt; &lt;?php $carouselProductCollection = Mage::helper('my_helper') -&gt;prepareCarouselProductsCollection(Mage::registry('current_category')) ?&gt; &lt;?php if ($carouselProductCollection): ?&gt; &lt;div class="category-products"&gt; &lt;div class="category casousel"&gt; &lt;a href="#" class="flv-arw-lft"&gt;&lt;/a&gt; &lt;a href="#" class="flv-arw-rht"&gt;&lt;/a&gt; &lt;ul id="mycarousel"&gt; &lt;?php foreach ($carouselProductCollection as $_product): ?&gt; &lt;li&gt; &lt;div class="cartomizer_item"&gt; &lt;img src="&lt;?php echo $this-&gt;helper('catalog/image')-&gt;init($_product, 'small_image')-&gt;resize(159, 128); ?&gt;" /&gt; &lt;div class="item-title"&gt;&lt;?php echo $_product-&gt;getName() ?&gt;&lt;/div&gt; &lt;div class="item-desc"&gt; &lt;span&gt; &lt;strong&gt;&lt;?php echo $_product-&gt;getTitle() ?&gt;&amp;trade;: &lt;/strong&gt; &lt;?php echo strip_tags($_product-&gt;getShortDescription()); ?&gt; &lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/li&gt; &lt;?php endforeach; ?&gt; &lt;/ul&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; function mycarousel_initCallback(carousel) { jQuery('.arw-right').bind('click', function() { carousel.next(); return false; }); jQuery('.arw-left').bind('click', function() { carousel.prev(); return false; }); }; jQuery(document).ready(function() { jQuery("#mycarousel").jcarousel({ scroll: 1, wrap: 'circular', initCallback: mycarousel_initCallback, buttonNextHTML: null, buttonPrevHTML: null }); }); &lt;/script&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload