News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Custom Field HTML Tooltip

Started by manzanita, April 14, 2012, 02:27:08 AM

Previous topic - Next topic

manzanita

Is there a way to enable html in a custom field tooltip of description? Essentially, i want an image to display in the popup.

Thanks

Joomla! 2.5.4 + VM 2.0.4

manzanita

when i enter html it is not saved... so possibly the solution is simply changing the code so that the HTML is not stripped out?

manzanita

sorry to bump, looks like post get lost quickly here...

is there not anyone with insight into how this works?

manzanita

how about html in product description? Looks like html gets stripped out in the same way.

jenkinhill

No, code is not stripped in the full description and can also be applied in the short description (eg <b></b>. (using VM2.0.5rc)

The Tooltip text is sanitized - to change the way that works you would need to edit the core, which we do not support.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

CRSparks

Hi Kelvin - I understand you do not support this, but could you please indicate which file I would need to modify to remove the "sanitization" code? I have a client for whom allowing HTML in the custom field description field is mission critical.

PRO

CRsparks,

what exactly do you want to do?

You are probably trying to go about this the long/wrong way.

Is this a cart variant? Or display?

Is the html a regular expression?


CRSparks

I have three variants. Two are are drop downs, one is radio options with graphics. To the right of each, the description text appears. What we need instead of text in the description field is a graphic linked to a pop-up. Each variant has a different accompanying graphic, so I cannot place the graphic by modifying the product details "flypage" file. So I need to "undo" the code which strips out the html in the description field.

PRO

CRSparks, this would be better done with a plugin

CRSparks

I agree, but I need to do this as a temporary measure to give a demo for some corporate bigwigs tomorrow.

CRSparks

The best I can figure is that code may be found in administrator/components/com_virtuemart/models/customfields.php - but I can't locate the line number.

Can anyone please help me locate the line of code that will enable html in the custom field description? I am in hot water with this client as it is with numerous VM2 issues, and this could sink me.

Rocked

I was searching for an answer to this, and just as I was about to hack the VM core... a more elegant solution occurred to me and I thought I'd share.

Use jQuery to add a class to the tool tip and whatever you were wanting to display as HTML -- just make with a background image!

It's really simple.  See http://jquery.bassistance.de/tooltip/demo/  -- see the "Tooltips with extra classes" section.  This solution worked great for me.
ROCKED LLC - Business Class Web Solutions
RockedStudios.com RockedMarketing.com RockedHosting.com  (Coming Soon) 

Customized VM Setup, Development, Hosting & Design