0
votes

I've migrated my Magento shop from a server with PHP 5.3 to one with one with 5.4. Now the pricing is off. In list/grid mode it seems to be showing grouped prices instead of just a simple price (e.g. beginning by price instead of just price) using getPriceHtml($_product, true);.

On the product detail page it doesn't show any price at al using getTirePriceHtml();

When I use the old (default) template it shows the prices correctly, while there is no difference between the two codes requesting the price.

If looked all over Magento for anything misconfigured, but everything seems OK, and also products are displayed as Simple products in admin product management.

I have tried to reimport the database and files, and have been searching for days to try and solve this. There hasn't been an solution yet, so I hope someone of you may know something.

Code of my 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; ?>
1

1 Answers

0
votes

I've solved it eventually. I've overlooked one file called price.html in my template folder.

By copying this file into my template I've corrected this problem.