2013-08-16 56 views
0

我已经将我的Magento商店从一台使用PHP 5.3的服务器迁移到一台使用5.4的服务器。现在定价关闭了。在列表/网格模式下,它似乎使用getPriceHtml($ _ product,true);来显示分组价格,而不是简单的价格(例如,以价格而不是价格开始)。Magento按分组显示简单价格

在产品详细信息页面上,它不使用getTirePriceHtml()显示任何价格。

当我使用旧的(默认)模板时,它会正确显示价格,而请求价格的两个代码之间没有差异。

如果在Magento中查看任何配置错误的东西,但一切似乎都正常,并且产品在管理产品管理中显示为简单产品。

我试图重新导入数据库和文件,并一直在寻找天试图解决这个问题。目前还没有解决方案,所以我希望你们中的某些人可能知道一些事情。

我list.phtml的代码:

<?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 [email protected] 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.magentocommerce.com for more information. 
* 
* @category design_default 
* @package Mage 
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) 
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) 
*/ 
?> 
<?php 
/** 
* Product list template 
* 
* @see Mage_Catalog_Block_Product_List 
*/ 
?> 
<?php $_productCollection=$this->getLoadedProductCollection() ?> 
<?php if(!$_productCollection->count()): ?> 
<div class="note-msg"> 
    <?php echo $this->__('There are no products matching the selection.') ?> 
</div> 
<?php else: ?> 

<?php echo $this->getToolbarHtml() ?> 
<?php // List mode ?> 
<?php if($this->getMode()!='grid'): ?> 
<?php $_iterator = 0; ?> 
<div class="listing-type-list catalog-listing"> 
<?php foreach ($_productCollection as $_product): ?> 
    <div class="listing-item<?php if(++$_iterator == sizeof($_productCollection)): ?> last<?php endif; ?>"> 
     <?php // Product Image ?> 
     <div class="product-image"> 
      <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getSmallImageLabel()) ?>"> 
       <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135, 135); ?>" width="135" height="135" alt="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" title="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" /> 
      </a> 
     </div> 

     <?php // Product description ?> 
     <div class="product-shop"> 
      <h5 class="product-title"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->htmlEscape($_product->getName())?></a></h5> 
      <?php echo $this->getPriceHtml($product, true) ?> 
      <?php if($_product->isSaleable()): ?> 
      <button class="form-button" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><?php echo $this->__('Add to Cart') ?></span></button> 
      <?php else: ?> 
      <div class="out-of-stock"><?php echo $this->__('Out of stock') ?></div> 
      <?php endif; ?> 
        <div class="moreinfo"> 
      <a class="form-button" href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getSmallImageLabel()) ?>"> 
       Meer informatie 
      </a> 
     </div> 
      <div class="clear"></div> 
     </div> 

    </div> 
<?php endforeach; ?> 
</div> 

<?php else: ?> 

<?php // Grid Mode ?> 
<div class="listing-type-grid catalog-listing"> 
<?php $_collectionSize = $_productCollection->count() ?> 
    <?php $_columnCount = $this->getColumnCount(); ?> 
    <?php $i=0; foreach ($_productCollection as $_product): ?> 
     <?php if($i++%$_columnCount==0): ?> 
     <ol class="grid-row"> 
     <?php endif; ?> 
      <li class="item"> 
       <p class="product-image"> 
        <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>"> 
         <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135, 135); ?>" width="135" height="135" alt="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" title="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" /> 
        </a> 
       </p> 
       <h5 class="product-title"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></h5> 
       <?php echo $this->getPriceHtml($_product, true) ?> 
       <?php print_r($_product); ?> 
       <?php if($_product->isSaleable()): ?> 
        <button type="button" class="form-button" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><?php echo $this->__('Add to Cart') ?></span></button> 
       <?php else: ?> 
       <div class="out-of-stock"><?php echo $this->__('Out of stock') ?></div> 
       <?php endif; ?> 
       <div class="moreinfo"> 
      <a class="form-button" href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getSmallImageLabel()) ?>"> 
       Meer informatie 
      </a> 
     </div> 
      </li> 
     <?php if($i%$_columnCount==0 || $i==$_collectionSize): ?> 
     </ol> 
     <?php endif; ?> 
    <?php endforeach ?> 
    <script type="text/javascript">decorateGeneric($$('.grid-row'), ['last', 'odd', 'even']);</script> 
</div> 
<?php endif; ?> 
<?php echo $this->getToolbarHtml() ?> 
<?php endif; ?> 

回答

0

我终于解决了。我在我的模板文件夹中忽略了一个名为price.html的文件。

通过将此文件复制到我的模板中我已更正此问题。