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

jTip and Attributes
 
mwehrly
Jr. Member
 
Total Posts:  22
Joined:  2008-01-09
U.S.A
 

Good Afternoon All.

I am trying to figure out the best way to add jTip to attributes.  I would like to use the external page feature of jTip.  The goal would be that I could use pages created in the CMS within jTip to explain the attributes. 

I am thinking this can be done with a switch statement in the product page, but I am usure of the best way to code this.  Any clues?  Any help would be greatly appreciated.  Thanks.

Matt

 
Magento Community Magento Community
Magento Community
Magento Community
 
mwehrly
Jr. Member
 
Total Posts:  22
Joined:  2008-01-09
U.S.A
 

Well, maybe someone can help me out.  In app/design/frontend/default/mytemplate/template/catalog/product/view/attributes.phtml the default code is

<tr>
        <
td class="label"><?php echo $this->__($_data['label']?></td>
        <
td class="data"><?php echo $_helper->productAttribute($_product$_data['value']$_data['code']?></td>
    </
tr>
and I am adding jTip support.  My reasoning for using jTip is the ability to load the tips based on CMS pages created in the Admin
<tr>
        <
td class="label"><?php echo $this->__($_data['label']?></td>
        <
td class="data"><?php echo $_helper->productAttribute($_product$_data['value']$_data['code']?>
        
<a href="storeurl/help_<?php echo $this->__($_data['code']) ?>_<?php echo $_helper->productAttribute($_product$_data['value'], $_data['code']) ?>" class="jTip" id="<?php echo $this->__($_data['label']) ?>">?</a
</
td>
</
tr>

I have changed the original jTip.js file due to conflicts with prototype.  I changed the $ in the file to $j.  (please see attached files)

I have added the following to app/design/frontend/default/mytemplate/layout/page.xml

<action method="addJs"><script>jquery/jquery-1.2.6.noConflict.min.js</script></action>

In app/design/frontend/default/mytemplate/page/html/head.phtml I have added the following to the bottom of the page

<script type="text/javascript">  // <![CDATA[ 
var $j jQuery.noConflict(); 
// ]]> </script> 
<script type="text/javascript" src="storeurl/js/jtip/jtip.js"></script>

It is showing the proper url when the ? is moused over, but it doesn’t load the url as a tooltip.  I cannot figure out what is going on.  Any help would be greatly appreciated.

Thanks.

Matt

File Attachments
jtip.js  (File Size: 4KB - Downloads: 60)
jtip-original.js  (File Size: 4KB - Downloads: 52)
 
Magento Community Magento Community
Magento Community
Magento Community
 
kaamiljj
Sr. Member
 
Avatar
Total Posts:  125
Joined:  2009-03-15
Kapaa
 

I’m totally with you, but again stuck. Temporarily I created a text-area attribute called “Interesting facts” and this attribute is loaded in additional information tab.

I’m using the greybox script and my sample attribute value looks like this:

<a href="http://www.jewelofthelotus.com/glossary/lingam.htm" title="Interesting facts about Lingams” rel="gb_page_center[500, 500]">click here to learn more</a>

When customer clicks on it it will open a pop-up window with the content of lingam.htm. Not very clever since I have to edit that attribute for all the products where I want to show interesting facts, but I haven’t figure out (I mean I have logically, but not technically) the solution yet.

Ideally you’d have a separate tab called let’s say Interesting facts, where depending on the product label it would load appropriate content.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tom1801
Jr. Member
 
Total Posts:  13
Joined:  2009-05-28
KA, Germany
 

Hey Matt,
that’s really a great idea. did you already solve your problem?

 
Magento Community Magento Community
Magento Community
Magento Community
 
ak999
Jr. Member
 
Total Posts:  18
Joined:  2009-10-15
 

It’s good idea
I’ll try!

<script src="js/jtip.js" type="text/javascript\"></script>

 
Magento Community Magento Community
Magento Community
Magento Community
 
ak999
Jr. Member
 
Total Posts:  18
Joined:  2009-10-15
 

It’s good idea
I’ll try!

<script src="js/jtip.js" type="text/javascript\"></script>

 
Magento Community Magento Community
Magento Community
Magento Community
 
lbeetles
Member
 
Total Posts:  66
Joined:  2009-02-04
 

Hi did you find a solution for this??

If so could you please state all the details how you did it and what pages you edited.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ggchamp
Sr. Member
 
Total Posts:  153
Joined:  2009-04-30
 

I used this script for my products http://www.dynamicdrive.com/dynamicindex16/showhint.htm
Lemme know if this is what you looking for ill explain how i added it.
Click on the ‘Next’ button here http://www.thepromohut.com/drinkware/koozies/folding-foam-can-cooler.html
You will see the tip next to all the options [?].

 
Magento Community Magento Community
Magento Community
Magento Community
 
ak999
Jr. Member
 
Total Posts:  18
Joined:  2009-10-15
 

ggchamp, hi

I try your suggestion just now,it’s OK! It work but I have a problem

I have add a link in the tip content, but when I onmouse the “?"sign ,the tip display, mouseout “?” sign it disappear.
I cannot click on my link in the tip content.

how to solve it?

thanks!

Max

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