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

HMTL code in the price of the additional product information
 
Tini
Sr. Member
 
Total Posts:  92
Joined:  2010-03-25
 

Greetings .... I hope that all the Saints help me and get an answer.

My MAgento version: 1.4.1.0
Extensions installed, and all compatible with the Magento version: Aschroder_SMTPPro, Auguria_Sponsorship, Gr_Deepzoom,
OrganicInternet_SimpleConfigurableProducts, and Phoenix_Moneybookers
The problem is that the price for additional product information appears with HTML code. An example:

<span class="price">€ 12,72</span>

So simple and configurable products.
The price attribute does not have the option ‘Allow HTML Tags on Frontend’ in the admin, and as I have seen and I have been told, it should not to be.
I have also seen that there are similar problems all related with this version but with other attributes, usually the attribute description, whose solutions are useless for the price attribute.

Does anyone know if this is a bug?, Is there a way to solve it?

 
Magento Community Magento Community
Magento Community
Magento Community
 
henk001
Jr. Member
 
Total Posts:  12
Joined:  2010-02-26
 

Hi,

I have the same problem here, Additional information:

Price <span class="price">€75.00</span>

Magento version 1.4.0.0

Have you found a solution for this problem?

 
Magento Community Magento Community
Magento Community
Magento Community
 
henk001
Jr. Member
 
Total Posts:  12
Joined:  2010-02-26
 

Just created a simple solution to this problem

in /app/design/frontend/default/yourtemplate/template/catalog/product/view/attributes.phtml

replace line 47:

<td class="data"><?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?></td>

with:

<td class="data"><?php echo html_entity_decode($_helper->productAttribute($_product, $_data['value'], $_data['code'])); ?> </td>

the html_entity_decode will replace the > and other html special chars with < “ and >

Anyway it works for me now

 
Magento Community Magento Community
Magento Community
Magento Community
 
furnitureforyoultd
Enthusiast
 
Total Posts:  833
Joined:  2009-03-09
 

That works great, thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tini
Sr. Member
 
Total Posts:  92
Joined:  2010-03-25
 

Thank you very much henk001

It worked perfectly.

I am impressed with the speed with which you found the solution, less than six minutes !!!!....

Thanks again.

 
Magento Community Magento Community
Magento Community
Magento Community
 
seudo
Guru
 
Avatar
Total Posts:  344
Joined:  2008-04-21
 

The actual cause of this issue is sort of a Rendering bug.

In the method ”productAttribute” located on line 101 for 1.4.0 and line 120 for 1.4.1.x in this fle magento_install/app/code/core/Mage/Catalog/Helper/Output.php the value of the attribute is html escaped.

The real fix comes in adding “ && ($attribute->getFrontendInput() != ‘price’) “ to the if statement on line 106 in 1.4.0 and line 123 in 1.4.1.x in the Output.php file.

It has been filed as a bug here:
http://www.magentocommerce.com/bug-tracking/issue?issue=9577

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