2016-09-28 128 views
0

http://dev.factorydirectmedical.com/wheelchairs?mode=grid這是我的產品頁面,我想調整圖像大小。我使用Magento開發人員選項來提示模板路徑。這裏有一個截圖(http://www.awesomescreenshot.com/image/1645297/4998c8379ebab36e77cab59c1a9c3bd5),我找到了HTML文件,但我無法修復這個圖像框。Magento產品頁面調整大小

List.phtml

<?php 
/** 
* @package  be 
* @copyright Copyright (c) 2010-2015 MeigeeTeam. (http://www.meigeeteam.com) 
*/ 
?> 
<?php 
/** 
* Product list template 
* 
* @see Mage_Catalog_Block_Product_List 
*/ 
?> 
<?php 
    $_productCollection=$this->getLoadedProductCollection(); 
    $_helper = $this->helper('catalog/output'); 
    $meigeeOptions = $this->getLayout(); 
    $gridColumns = $meigeeOptions->getMConfigResultByAlias('listing_columns'); 
    $productType = $meigeeOptions->getMConfigResultByAlias('listing_product_type'); 
    $listType = $meigeeOptions->getMConfigResultByAlias('listing_list_type'); 
    $grid_indents = $meigeeOptions->getMConfigResultByAlias('listing_indents'); 
?> 
<?php if(!$_productCollection->count()): ?> 
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p> 
<?php else: ?> 
<div class="category-products"> 
    <?php echo $this->getToolbarHtml() ?> 
    <?php // List mode ?> 
    <?php if($this->getMode()!='grid'): ?> 

    <ol class="products-list" id="products-list"> 
    <?php foreach ($_productCollection as $_product): ?> 
     <?php echo $this->getLayout()->createBlock('page/html')->setProductInfo($_product)->setProductList($this)->setIterator($this)->setTemplate($listType)->toHtml(); ?> 
    <?php endforeach; ?> 
    </ol> 
    <script type="text/javascript">decorateList('products-list', 'none-recursive')</script> 
    <?php else: ?> 
    <?php // Grid Mode ?> 

    <ul class="products-grid row <?php echo $gridColumns.''.($grid_indents != 1 ? ' no-indents' : ''); ?>"> 
     <?php foreach ($_productCollection as $_product): ?> 
      <?php echo $this->getLayout()->createBlock('page/html')->setProductInfo($_product)->setProductList($this)->setTemplate($productType)->toHtml(); ?> 
     <?php endforeach ?> 
    </ul> 
    <script type="text/javascript"> 
     decorateGeneric($$('ul.products-grid'), ['odd','even','first','last']); 
    </script> 
    <?php endif; ?> 
    <div class="toolbar-bottom"> 
     <?php echo $this->getToolbarHtml() ?> 
    </div> 


    <script type="text/javascript"> 
     jQuery(window).load(function(){ 
      function buttonsSize(){ 
       if(jQuery('.category-products li.item').length){ 
        jQuery('.category-products li.item').each(function(){ 
         itemsCount = jQuery(this).find('.image-box .actions').children().length; 
         switch(itemsCount) { 
          case 1: 
           itemsCountClass = 'one-item'; 
          break; 
          case 2: 
           itemsCountClass = 'two-items'; 
          break; 
          case 3: 
           itemsCountClass = 'three-items'; 
          break; 
          case 4: 
           itemsCountClass = 'four-items'; 
          break; 
          default: 
           itemsCountClass = 'four-items'; 
          break; 
         } 
         jQuery(this).find('.image-box .actions').addClass(itemsCountClass); 
        }); 
       } 
      } 
      buttonsSize(); 
      jQuery(window).resize(function(){ 
       buttonsSize(); 
      }); 
      if('undefined' != typeof GeneralToolbar) { 
       buttonsSize(); 
      } 
      GeneralToolbar.onInit = function(){ 
       buttonsSize(); 
      } 
     }); 
    </script> 

    <?php if(Mage::app()->getLayout()->getBlock('ajaxkit')->issetSubmodulesConfig('general_toolbar')) { ?> 
     <div class="infinite-scroll-elements"> 
      <div class="infinite-scroll-loader"><div></div></div> 
      <div class="infinite-scroll-button" id="StaticScrollBtn"><?php echo $this->__('Show More Products'); ?></div> 
     </div> 
    <?php } ?> 
</div> 
<?php endif; ?> 
<?php 
// Provides a block where additional page components may be attached, primarily good for in-page JavaScript 
if ($this->getChild('after')){ 
    $_afterChildren = $this->getChild('after')->getSortedChildren(); 
    foreach ($_afterChildren as $_afterChildName){ 
     $_afterChild = $this->getChild('after')->getChild($_afterChildName); 
     //set product collection on after blocks 
     $_afterChild->setProductCollection($_productCollection); 
     echo $_afterChild->toHtml(); 
    } 
} 
?> 

new.phtml

<?php 
/** 
* @package  be 
* @copyright Copyright (c) 2010-2015 MeigeeTeam. (http://www.meigeeteam.com) 
*/ 
$meigeeOptions = $this->getLayout(); 
$lightBox = $meigeeOptions->getMConfigResultByAlias('lightbox_listing'); 
$timerStatus = $meigeeOptions->getMConfigResultByAlias('timer_status'); 
$timerListingStatus = $meigeeOptions->getMConfigResultByAlias('timer_listing_status'); 
$catalogModeWrapper = $meigeeOptions->getMConfigResultByAlias('catalog_mode'); 
$catalogMode = $catalogModeWrapper['value']['sv2']['value']; 
?> 
<?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?> 
<div class="row"> 
    <div class="widget widget-new-products clearfix"> 
     <div class="col-xs-12"> 
      <header class="widget-title"> 
       <h2><?php echo $this->__('New Products') ?></h2> 
      </header> 
     </div> 
     <div class="widget-products col-xs-12"> 
      <?php echo $this->getPagerHtml() ?> 
      <div class="row"> 
       <ul class="products-grid clearfix"> 
        <?php $i=0; foreach ($_products->getItems() as $_product): ?> 
         <li class="item col-xs-6 col-sm-3"> 
          <div class="image-box"> 
           <?php if($lightBox){ ?> 
            <a href="<?php echo $_product->getProductMediaResized(930, 'small_image')->getImageSrc(); ?>" data-toggle="lightbox" class="lightbox-button" data-footer="<?php echo $this->stripTags($_product->getName(), null, true) ?>" title="<?php echo $this->__('Lightbox'); ?>"> 
             <i class="icon-search"></i> 
            </a> 
           <?php } ?> 
           <?php echo $this->getLayout()->createBlock('page/html')->setProductInfo($_product)->setTemplate('catalog/product/product_labels.phtml')->toHtml(); ?> 
           <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>" class="product-image"> 
            <span class="mask"></span> 
            <?php 
             echo $_product->productHoverImage($this, 800); 
             $escaped_label = $this->stripTags($_product->getName(), null, true); 
             echo '<img '. $_product->getProductMediaResized(800, 'small_image') 
              ->addImageHtmlAttributte('alt', $escaped_label) 
              ->addImageHtmlAttributte('title', $escaped_label) 
              ->getImageHtmlAttributte().' />'; 
            ?> 
           </a> 
           <div class="actions clearfix"> 
            <?php if ($_product->isSaleable()): ?> 
             <?php if($catalogMode == 0) { ?> 
              <button type="button" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Add to Cart')); ?>" class="btn btn-default pull-left" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><i class="icon-basket"></i></span></span></button> 
             <?php } ?> 
            <?php else: ?> 
             <a class="btn btn-default" href="<?php echo $_product->getProductUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Read More')); ?>"><i class="icon-link"></i></a> 
            <?php endif; ?> 
            <?php if ($this->helper('wishlist')->isAllow()) : ?> 
             <span class="link-wishlist-wrapper"><a href="<?php echo $this->getAddToWishlistUrl($_product) ?>" class="link-wishlist" title="<?php echo $this->__('Add to Wishlist'); ?>"><i class="icon-heart-fa"></i></a></span> 
            <?php endif; ?> 
            <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?> 
             <span class="link-compare-wrapper"><a href="<?php echo $_compareUrl ?>" class="link-compare" title="<?php echo $this->__('Add to Compare'); ?>"><i class="icon-shuffle"></i></a></span> 
            <?php endif; ?> 
           </div> 
          </div> 
          <h3 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>)"><?php echo $this->helper('catalog/output')->productAttribute($_product, $_product->getName() , 'name') ?></a></h3> 
          <?php if($_product->isSaleable()): ?> 
           <p class="availability in-stock"><i class="icon-record"></i><?php echo $this->__('Product') ?> <span><?php echo $this->__('In stock') ?></span></p> 
          <?php else: ?> 
           <p class="availability out-of-stock"><i class="icon-record"></i><?php echo $this->__('Product') ?> <span><?php echo $this->__('Out of stock') ?></span></p> 
          <?php endif; ?> 
          <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?> 
          <?php echo $this->getPriceHtml($_product, true, '-new') ?> 
          <?php if($timerStatus && $timerListingStatus) { 
           echo $this->getLayout()->createBlock('page/html')->setProduct($_product)->setTemplate('catalog/product/listing_timer.phtml')->toHtml(); 
          } ?> 
          <hr class="indent-18 white-space"/> 
         </li> 
        <?php endforeach; ?> 
       </ul> 
      </div> 
     </div> 
    </div> 
</div> 
<?php endif; ?> 

回答

0

圖片來自list.phtml 有可能使用其他方法來獲得此圖像。如果你無法找到圖像,那麼請給我提供list.phtml文件代碼

+0

請看這個,我有更新list.phtml代碼和new.phtml也 –

+0

你需要調試這個'<?php echo $ this-> getLayout() - > createBlock(頁面/ HTML') - > setProductInfo($ _產品) - > setProductList($這個) - > setTemplate($ productType) - > toHtml(); ?>' 如果你知道magento那麼這很容易。 –

+0

你對此有任何想法。這將在您的主題文件夾 –