cancel
Showing results for 
Search instead for 
Did you mean: 

Remove "span class price" on product page

Remove "span class price" on product page

Hi, I'm trying to edit the html code on the default.phtml template to change the way the price is displayed. If I remove the data-price-type from the template, my custom html is showing correctly but if the data-price-type stays in the span tag, my custom html code is replaced with the "span class price" html code which -I think- is generated from the priceTemplate option in the price-box.js. So my question is: how can I substitute the automatic "span class price" with my custom html code? Shouldn't html tags stay separate from dynamic content? Why is javascript generating content with html tags in it?

 

Moreover, on the same template I can see that the price is generated by php method formatCurrency and one of the parameters in this method is "getIncludedContainer" (true or false). At first I thought this parameter was the one responsible for showing the "span class price" tag (so it makes sense to have it true or false based on whatever you want the class to be displayed or not), but changing this value to false seems to do nothing so I now wonder what is this parameter about? How price is effected by setting this parameter to false?

 

1 REPLY 1

Re: Remove "span class price" on product page

Did you ever figure out how to do this? its driving me crazy. I want to save dollars, decimal point, cents into 3 different variables to style but can't figure it out. I've been able to do it for simple products but those with price options I can't get it to work