Advertisement
Guest User

afafa

a guest
Feb 18th, 2018
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.73 KB | None | 0 0
  1. <?php
  2. /**
  3. * Magento
  4. *
  5. * NOTICE OF LICENSE
  6. *
  7. * This source file is subject to the Academic Free License (AFL 3.0)
  8. * that is bundled with this package in the file LICENSE_AFL.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://opensource.org/licenses/afl-3.0.php
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@magento.com so we can send you a copy immediately.
  14. *
  15. * DISCLAIMER
  16. *
  17. * Do not edit or add to this file if you wish to upgrade Magento to newer
  18. * versions in the future. If you wish to customize Magento for your
  19. * needs please refer to http://www.magento.com for more information.
  20. *
  21. * @category design
  22. * @package base_default
  23. * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
  24. * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
  25. */
  26. ?>
  27. <?php
  28. /**
  29. * Category view template
  30. *
  31. * @see Mage_Catalog_Block_Category_View
  32. */
  33. ?>
  34. <?php
  35. $_helper = $this->helper('catalog/output');
  36. $_category = $this->getCurrentCategory();
  37. ?>
  38. <div class="page-title category-title">
  39. <?php if($this->IsRssCatalogEnable() && $this->IsTopCategory()): ?>
  40. <a href="<?php echo $this->getRssLink() ?>" class="link-rss"><?php echo $this->__('Subscribe to RSS Feed') ?></a>
  41. <?php endif; ?>
  42. <h1><?php echo $_helper->categoryAttribute($_category, $_category->getName(), 'name') ?></h1>
  43. </div>
  44. <?php echo $this->getMessagesBlock()->toHtml() ?>
  45.  
  46. <?php if($_description=$this->getCurrentCategory()->getDescription()): ?>
  47. <div class="category-description std">
  48. <?php echo $_helper->categoryAttribute($_category, $_description, 'description') ?>
  49. </div>
  50. <?php endif; ?>
  51.  
  52. <?php if($this->isContentMode()): ?>
  53. <?php echo $this->getCmsBlockHtml() ?>
  54.  
  55. <?php elseif($this->isMixedMode()): ?>
  56. <?php echo $this->getCmsBlockHtml() ?>
  57. <?php echo $this->getProductListHtml() ?>
  58.  
  59. <?php else: ?>
  60. <?php if ( $this->getCurrentCategory()->getId() != 132 && $this->getCurrentCategory()->getId() != 133){
  61. echo $this->getProductListHtml();
  62. }
  63. else {
  64. $banner_array = array();
  65. $cat = $this->getCurrentCategory()->getId();
  66. $products = Mage::getModel('catalog/category')->load($cat)
  67. ->getProductCollection()
  68. ->addAttributeToSelect('entity_id') // add all attributes - optional
  69. ->addAttributeToFilter('status', 1) // enabled
  70. ->addAttributeToFilter('visibility', 4) //visibility in catalog,search
  71. ->setOrder('price', 'ASC'); //sets the order by price
  72. foreach($products as $prod)
  73. {
  74. $seller_product_coll = Mage::getModel('marketplace/product')->getCollection()
  75. ->addFieldToFilter('status',array('eq'=>1))
  76. ->addFieldToFilter('mageproductid',array('eq'=>$prod->getId()))
  77. ->distinct(true);
  78. foreach ($seller_product_coll as $value) {
  79. $seller = Mage::getModel('customer/customer')->load($value['userid']);
  80. $collection = Mage::getModel('marketplace/userprofile')->getCollection();
  81. $collection->addFieldToFilter('mageuserid',array('eq' => $value['userid']));
  82. foreach($collection as $value){
  83. $bannerpic = $value->getBannerpic();
  84. if(! in_array($bannerpic, $banner_array))
  85. {//BANNER
  86. array_push($banner_array, $bannerpic);
  87. $banner_pic = Mage::getBaseUrl('media')."avatar/".$bannerpic;
  88. $profileurl = $value->getProfileurl();
  89. //echo Mage::helper('marketplace')->getRewriteUrl('marketplace/seller/profile/'.$profileurl);
  90. ?>
  91.  
  92. <!-- $profileurl = $value->getProfileUrl();
  93. <!-- Mage::helper('marketplace')->getRewriteUrl('marketplace/seller/profile/'.$profileurl); -->
  94. <div class="wk_mp_design">
  95. <?php if(!empty($banner_pic)): ?>
  96. <div class="row section-seller-banner img-container img-responsive " style="height: 400px;" >
  97. <!--<img class="img-container" src="<?php echo str_replace(" ","%20",$banner_pic) ?>" style="width:100%; position:absolute; z-index:0"/>-->
  98. <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;">
  99. <div style="position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, 0.2);"></div>
  100. <br><br><br><br>
  101. <h2 class="seller-company" style="text-align: center; font-size:200%; color:#FFFFFF;transform: translate(0, 0)"><?php echo $value->getShoptitle(); ?></h2>
  102. <?php
  103. if(! empty($seller->getDesignerSlogan())) { ?>
  104. <p style=" transform: translate(0, 0); text-align: center; font-size:200%; color:#FFFFFF;"><?php echo $seller->getDesignerSlogan(); ?></p>
  105. <?php }?>
  106. <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>
  107. <h2 style="text-align: center; color:#FFFFFF; font-size:14px;transform: translate(0, 0)" >
  108. <?php echo Mage::helper('marketplace')->getSellerProCount2($seller->getId())." ".$this->__('Products') ?></h2>
  109. <h2 style="text-align: center; color:#FFFFFF; font-size:14px;" >
  110. <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>
  111. </div>
  112. </div>
  113. <?php endif; ?>
  114. <?php }
  115. }
  116. }
  117. }
  118. }
  119. ?>
  120. <?php endif; ?>
  121. <?php echo $this->getChildHtml('breadcrumbs') ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement