VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: quadbsys on November 26, 2013, 18:03:03 PM

Title: Adding some HTML in VM product title
Post by: quadbsys on November 26, 2013, 18:03:03 PM
We have the need to have our products have line breaks in their title. For example we would like the product title to appear as:
SuperCoolc
Ointment


The title field in Virtuemart should be able to be filled out as
Supercool<sup>&copy;</sup> <br />Ointment

Problem is, any html like my <br> is stripped from the title when saving and does not appear on the frontend. Does anyone please know how to go about this? I have tried telling the client it is not possible, but they persist that they require this functionality. The <br> is the most important piece.
Title: Re: Adding some HTML in VM product title
Post by: jenkinhill on November 26, 2013, 18:33:18 PM
I have used ReReplacer (http://extensions.joomla.org/extensions/edition/replace/4336) to do something very similar to that as it is very simple to use.

I just tested this with the default product, Hand Shovel for which I entered the title as Hand^^^Shovel

In the rereplacer component I set ^^^ to be replaced by <sup>&copy;</sup> <br />
and the result is:

Hand©
Shovel

Note that on the page the © was superscripted. Of course you don't have to use ^^^
Title: Re: Adding some HTML in VM product title
Post by: PolishedGeek on November 26, 2013, 20:47:31 PM
What a wonderfully simple solution! Beautiful.