Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $ajaxcart = Mage::getStoreConfig('mygeneral/product_list/ajaxcart');
- $newsaleicon = Mage::getStoreConfig('mygeneral/product_list/newsaleicon');
- $display_productname_singleline = Mage::getStoreConfig('mygeneral/product_list/display_productname_singleline');
- $image_aspect_ratio = Mage::getStoreConfig('mygeneral/product_list/image_aspect_ratio');
- $lazyload = Mage::getStoreConfig('mygeneral/product_slider/lazyload');
- $instance = Mage::helper("ExtraConfig");
- $imgWidth = 540;
- if($image_aspect_ratio == '1'){
- $imgHeight = 0;
- } else {
- $imgHeight = 720;
- }
- ?>
- <?php if($this->getItemCount()): ?>
- <div class="crosssell">
- <div class="section-line">
- <h2><?php echo $this->__('Crosssell Products') ?></h2>
- </div>
- <div id="crosssellproduct" class="products-grid itemslider">
- <?php $i=0;$j=0; foreach ($this->getItems() as $_item): ?>
- <div class="item">
- <div class="product-image-wrapper">
- <?php if($newsaleicon == '1') { ?>
- <?php $adate = date('Y-m-d'); //echo 'frpm:-'.$_item->special_from_date.'----';echo "to:-".$_item->special_to_date.'--';
- $a= 0;
- if($_item->special_from_date != null && $_item->special_to_date == "")
- {
- if( $adate >= $_item->special_from_date)
- {
- $a = 1;
- }
- }
- if($_item->special_from_date != "" && $_item->special_to_date != "")
- {
- if($adate >= $_item->special_from_date && $adate <= $_item->special_to_date)
- {
- $a = 1;
- }
- }
- if($a == 1){ ?>
- <div class="sale"><label><?php echo $this->__('SALE') ?></label></div>
- <?php } ?>
- <?php $bdate = date('Y-m-d');
- $b= 0;
- if($_item->news_from_date != null && $_item->news_to_date == "")
- {
- if( $bdate >= $_item->news_from_date)
- {
- $b = 1;
- }
- }
- if($_item->news_from_date != "" && $_item->news_to_date != "")
- {
- if($bdate >= $_item->news_from_date && $bdate <= $_item->news_to_date)
- {
- $b = 1;
- }
- }
- if($b == 1){ ?>
- <div class="new"><label><?php echo $this->__('NEW') ?></label></div>
- <?php }
- ?>
- <?php } ?>
- <?php
- $class = "";
- $alterImage = Mage::helper("ExtraConfig")->getAltImgHtml($_item, $imgWidth, $imgHeight,'thumbnail');
- if($alterImage != false)
- {
- $class = 'small-image';
- }
- ?>
- <a href="<?php echo $_item->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_item, 'small_image'), null, true) ?>" class="product-image">
- <?php if($lazyload): ?>
- <img class="lazyOwl <?php echo $class; ?>" data-src="<?php echo $instance->getImage($_item, $imgWidth, $imgHeight, 'small_image'); ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_item, 'small_image'), null, true); ?>" />
- <?php else: ?>
- <img class="<?php echo $class; ?>" src="<?php echo $instance->getImage($_item, $imgWidth, $imgHeight, 'small_image'); ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_item, 'small_image'), null, true); ?>" />
- <?php endif; ?>
- <?php echo $alterImage; ?>
- </a>
- <div id='ajax_loader<?php echo $_item->getId()?>' class="ajaxcartpro_progress" style="display: none;"></div>
- <div class="actions">
- <div class="btn-cart">
- <?php if($_item->isSaleable()): ?>
- <?php if($ajaxcart == '1') { ?>
- <?php if ( !($_item->getTypeInstance(true)->hasRequiredOptions($_item) || $_item->isGrouped()) ) { ?>
- <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart ajx-cart" onclick="setLocationAjax('<?php echo $this->getAddToCartUrl($_item) ?>','<?php echo $_item->getId()?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
- <?php } else { ?>
- <?php if(Mage::helper("ExtraConfig")->is_mobile() == false) { ?>
- <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="showOptions('<?php echo $_item->getId()?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
- <a href='<?php echo $this->getUrl('ajax/index/options',array('product_id'=>$_item->getId()));?>' class='fancybox' id='fancybox<?php echo $_item->getId()?>' style='display:none'></a>
- <?php } else { ?>
- <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_item) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
- <?php } ?>
- <?php } ?>
- <?php } else { ?>
- <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_item) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
- <?php } ?>
- <?php else: ?>
- <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
- <?php endif; ?>
- </div>
- <ul class="add-to-links addto-links-icons">
- <?php if($ajaxcart == '1') { ?>
- <li class="first">
- <a href='<?php echo $this->getUrl('ajax/index/options',array('product_id'=>$_item->getId()));?>' class='fancybox tooltip_container' id='quickview-fancybox<?php echo $_item->getId()?>'><span class="icon fa fa-search-plus"></span><span class="tooltip"><?php echo $this->__('Quick View') ?></span></a>
- </li>
- <?php } ?>
- <li>
- <?php if($_compareUrl=$this->getAddToCompareUrl($_item)): ?>
- <a href="<?php echo $_compareUrl ?>" title="<?php echo $this->__('Add to Compare') ?>" class="link-compare tooltip_container"><span class="icon fa fa-exchange"></span><span class="tooltip"><?php echo $this->__('Add to Compare') ?></span></a>
- <?php endif; ?>
- </li>
- <li class="last">
- <?php if ($this->helper('wishlist')->isAllow()) : ?>
- <a href="<?php echo $this->helper('wishlist')->getAddUrl($_item) ?>" title="<?php echo $this->__('Add to Wishlist') ?>" class="link-wishlist tooltip_container"><span class="icon fa fa-star"></span><span class="tooltip"><?php echo $this->__('Add to Wishlist') ?></span></a>
- <?php endif; ?>
- </li>
- </ul>
- </div>
- </div>
- <div class="product-content-wrapper">
- <div class="product-content">
- <h3 class="product-name<?php if($display_productname_singleline == '1'){ ?> single-line-name<?php } ?>"><a href="<?php echo $_item->getProductUrl() ?>" title="<?php echo $this->stripTags($_item->getName(), null, true) ?>"><?php echo $this->htmlEscape($_item->getName()); ?></a></h3>
- <div class="vert">
- <?php echo $this->getPriceHtml($_item, true) ?>
- </div>
- <?php echo $this->getReviewsSummaryHtml($_item, false, true); ?>
- </div>
- </div>
- </div>
- <?php endforeach ?>
- </div>
- <script type="text/javascript">decorateList('crosssell-products-list', 'none-recursive')</script>
- </div>
- <script type="text/javascript">
- //<![CDATA[
- jQuery(function(j$) {
- j$("#crosssellproduct").owlCarousel({
- itemsCustom : [
- [0, 1],
- [380, 2],
- [751, 4],
- [1265, 4],
- [1360, 4],
- [1440, 4],
- [1680, 4]
- ]<?php echo Mage::helper("ExtraConfig")->sliderSetting(); ?>
- });
- });
- //]]>
- </script>
- <?php endif; ?>
Add Comment
Please, Sign In to add comment