0

I got Recently view product view in home page is it any script for sliding for recent view product? Please suggest some of the script for sliding product

1

In Magento 1.9 they have a slider code. So just copy your file from base folder and place it in your theme.

i.e,

app\design\frontend\rwd\default\template\reports\product_viewed.phtml

copy and put it in

app\design\frontend\your_package\your_theme\template\reports\product_viewed.phtml

Then add a class="slideshow-container" for a parent container. And add class="slideshow" for a ul or ol.

Like

<?php if ($_products = $this->getRecentlyViewedProducts()): ?>
<div class="block block-list block-viewed">
    <div class="block-title">
        <strong><span><?php echo $this->__('Recently Viewed Products') ?></span></strong>
    </div>
    <div class="block-content slideshow-container"> <!-- Added a class for parent container-->
        <ol id="recently-viewed-items" class="mini-products-list slideshow"> <!-- Added a class for container-->
        <?php foreach ($_products as $_item): ?>
            <li class="item">
                <a href="<?php echo $this->getProductUrl($_item) ?>">
                    <span class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_item, 'thumbnail')->resize(50, 50)->setWatermarkSize('30x10'); ?>" width="50" height="50" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /></span>
                </a>
                <div class="product-details">
                    <p class="product-name">
                        <a href="<?php echo $this->getProductUrl($_item) ?>">
                            <?php echo $this->helper('catalog/output')->productAttribute($_item, $_item->getName() , 'name') ?>
                        </a>
                    </p>
                </div>
            </li>
        <?php endforeach; ?>
        </ol>
        <script type="text/javascript">decorateList('recently-viewed-items');</script>
    </div>
</div>
<?php endif; ?>

Refer this Link(HOMEPAGE SLIDER)

  • No it's not working – Magento 2 Aug 11 '15 at 6:50
  • @Manojkothari You are using magento1.9 right? – MeenakshiSundaram R Aug 11 '15 at 6:51
  • have you use code which i have posted here – MeenakshiSundaram R Aug 11 '15 at 6:51
  • yes i m using 1.9 only. Plz check the url totaltoys.com/update – Magento 2 Aug 11 '15 at 6:54
  • skin>frontend>rwd>default>js>slideshow.js file is missing. If you add that in your page, you'll get slider – MeenakshiSundaram R Aug 11 '15 at 7:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.