Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Double text displayed in products
 
Essiej82
Jr. Member
 
Total Posts:  10
Joined:  2009-09-02
 

Hi,

I have the following script in my prices.phtml file and somehow the text is displayed twice in the products.

I

<?php foreach ($_product->getCategoryIds() as $_category): ?>
                <?php 
if (in_array($_category, array(43,44,62,67,70))) : ?> <?php echo "<br />Grundpreis &euro; 0,07/Meter" ?>
                <?php 
endif; ?>

Somehow I can’t get rid of the second line. Can you perhalps help me out here?

Thnx!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Siggi_Schmitz
Enthusiast
 
Avatar
Total Posts:  811
Joined:  2011-07-03
 

Try to take an other file instead of price.phtml. Maybe in the view.phtml before or after the price block is loaded?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Essiej82
Jr. Member
 
Total Posts:  10
Joined:  2009-09-02
 

Solved!

Category 43, 44 and 73 are subcategories of 62 and therefore it went double. By deleting them from the code, the problem was solved.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top