Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Academic Free License (AFL 3.0)
- * that is bundled with this package in the file LICENSE_AFL.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/afl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magento.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magento.com for more information.
- *
- * @category design
- * @package base_default
- * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
- */
- ?>
- <?php
- /**
- * Category view template
- *
- * @see Mage_Catalog_Block_Category_View
- */
- ?>
- <?php
- $_helper = $this->helper('catalog/output');
- $_category = $this->getCurrentCategory();
- ?>
- <div class="page-title category-title">
- <?php if($this->IsRssCatalogEnable() && $this->IsTopCategory()): ?>
- <a href="<?php echo $this->getRssLink() ?>" class="link-rss"><?php echo $this->__('Subscribe to RSS Feed') ?></a>
- <?php endif; ?>
- <h1><?php echo $_helper->categoryAttribute($_category, $_category->getName(), 'name') ?></h1>
- </div>
- <?php echo $this->getMessagesBlock()->toHtml() ?>
- <?php if($_description=$this->getCurrentCategory()->getDescription()): ?>
- <div class="category-description std">
- <?php echo $_helper->categoryAttribute($_category, $_description, 'description') ?>
- </div>
- <?php endif; ?>
- <?php if($this->isContentMode()): ?>
- <?php echo $this->getCmsBlockHtml() ?>
- <?php elseif($this->isMixedMode()): ?>
- <?php echo $this->getCmsBlockHtml() ?>
- <?php echo $this->getProductListHtml() ?>
- <?php else: ?>
- <?php if ( $this->getCurrentCategory()->getId() != 132 && $this->getCurrentCategory()->getId() != 133){
- echo $this->getProductListHtml();
- }
- else {
- $banner_array = array();
- $cat = $this->getCurrentCategory()->getId();
- $products = Mage::getModel('catalog/category')->load($cat)
- ->getProductCollection()
- ->addAttributeToSelect('entity_id') // add all attributes - optional
- ->addAttributeToFilter('status', 1) // enabled
- ->addAttributeToFilter('visibility', 4) //visibility in catalog,search
- ->setOrder('price', 'ASC'); //sets the order by price
- foreach($products as $prod)
- {
- $seller_product_coll = Mage::getModel('marketplace/product')->getCollection()
- ->addFieldToFilter('status',array('eq'=>1))
- ->addFieldToFilter('mageproductid',array('eq'=>$prod->getId()))
- ->distinct(true);
- foreach ($seller_product_coll as $value) {
- $seller = Mage::getModel('customer/customer')->load($value['userid']);
- $collection = Mage::getModel('marketplace/userprofile')->getCollection();
- $collection->addFieldToFilter('mageuserid',array('eq' => $value['userid']));
- foreach($collection as $value){
- $bannerpic = $value->getBannerpic();
- if(! in_array($bannerpic, $banner_array))
- {//BANNER
- array_push($banner_array, $bannerpic);
- $banner_pic = Mage::getBaseUrl('media')."avatar/".$bannerpic;
- $profileurl = $value->getProfileurl();
- //echo Mage::helper('marketplace')->getRewriteUrl('marketplace/seller/profile/'.$profileurl);
- ?>
- <!-- $profileurl = $value->getProfileUrl();
- <!-- Mage::helper('marketplace')->getRewriteUrl('marketplace/seller/profile/'.$profileurl); -->
- <div class="wk_mp_design">
- <?php if(!empty($banner_pic)): ?>
- <div class="row section-seller-banner img-container img-responsive " style="height: 400px;" >
- <!--<img class="img-container" src="<?php echo str_replace(" ","%20",$banner_pic) ?>" style="width:100%; position:absolute; z-index:0"/>-->
- <div style="background-position: 50% 50%; position:relative; z-index: 0; width:100%; height:400px; background-image: url('<?php echo str_replace(" ","%20",$banner_pic) ?>'); background-size: cover;">
- <div style="position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, 0.2);"></div>
- <br><br><br><br>
- <h2 class="seller-company" style="text-align: center; font-size:200%; color:#FFFFFF;transform: translate(0, 0)"><?php echo $value->getShoptitle(); ?></h2>
- <?php
- if(! empty($seller->getDesignerSlogan())) { ?>
- <p style=" transform: translate(0, 0); text-align: center; font-size:200%; color:#FFFFFF;"><?php echo $seller->getDesignerSlogan(); ?></p>
- <?php }?>
- <p style="text-align: center; font-size:120%; color:#FFFFFF; transform: translate(0, 0)"><?php $country_code = $value->getCountrypic(); $country = Mage::app()->getLocale()->getCountryTranslation($country_code);echo '- '.$country.' -' ?></p>
- <h2 style="text-align: center; color:#FFFFFF; font-size:14px;transform: translate(0, 0)" >
- <?php echo Mage::helper('marketplace')->getSellerProCount2($seller->getId())." ".$this->__('Products') ?></h2>
- <h2 style="text-align: center; color:#FFFFFF; font-size:14px;" >
- <a href="<?php echo $this->getUrl('mpfavouriteseller/index/addfavouriteseller',array('id'=>$seller_id));?>" style="color:#FFFFFF"><span class="fa fa-heart-o"></span></a> </h2>
- </div>
- </div>
- <?php endif; ?>
- <?php }
- }
- }
- }
- }
- ?>
- <?php endif; ?>
- <?php echo $this->getChildHtml('breadcrumbs') ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement