Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Add a pop-up information box to describe a product option

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #21  
Old 04-06-2008, 07:00 PM
 
wendy.email wendy.email is offline
 

Advanced Member
  
Join Date: Jun 2005
Location: Canada
Posts: 90
 

Default Re: Add a pop-up information box to describe a product option

Thanks for the mod!! I have been searching for this for very long time!!!

It's working for ver4.1.9 too.

thanks again.
__________________
Version 4.1.11
Reply With Quote
  #22  
Old 07-08-2008, 05:17 PM
 
lindseyabrandon lindseyabrandon is offline
 

Newbie
  
Join Date: Jun 2008
Location: Atlanta, GA
Posts: 8
 

Default Re: Add a pop-up information box to describe a product option

This is awesome, thank you. I wish I would have discovered it a couple of weeks ago!

I got it to work, but when you click on the link I am getting this error message:
Forbidden

You don't have permission to access /store/files/options/mailing-service.jpg on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.41 Server at www.linvites.com Port 443

__________________
/Lindsey/
X-Cart Gold 4.1.9
Reply With Quote
  #23  
Old 07-11-2008, 05:33 AM
 
mike@tatechnology.net mike@tatechnology.net is offline
 

Senior Member
  
Join Date: May 2006
Posts: 132
 

Default Re: Add a pop-up information box to describe a product option

Quote:
Originally Posted by lindseyabrandon
This is awesome, thank you. I wish I would have discovered it a couple of weeks ago!

I got it to work, but when you click on the link I am getting this error message:
Forbidden

You don't have permission to access /store/files/options/mailing-service.jpg on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.41 Server at www.linvites.com Port 443


Check your file permissions for that file (if linux, use the chmod command).
__________________
TA Technologies, Inc.
~Implementing Creative Point of Sale Solutions~
http://www.rmspos.net
X-Cart 4.1.10
Reply With Quote
  #24  
Old 07-12-2008, 07:16 PM
  imexhouse's Avatar 
imexhouse imexhouse is offline
 

eXpert
  
Join Date: May 2006
Location: Canada
Posts: 377
 

Default Re: Add a pop-up information box to describe a product option

You may have to create an .htaccess file and put in it:

Quote:

Allow from all
and upload it to your files/options directory.
__________________
Jack@AquasanaCA
X-CART GOLD 4.0.19 Live
DSEFU, AOM, ezCheckout, ezUpsell, ezRecommends, RememberMe, RememberAnonCarts
AquasanaCanada.com - Aquasana╝ - #1 Rated Water Filters in America!
X-CART GOLD 4.4.5 Live
CDSEO Pro v. 1.8.4
AquasanaMontreal.com
Aquasana╝ & Rhino Water Filtration Systems
Reply With Quote
  #25  
Old 07-14-2008, 03:28 AM
 
lindseyabrandon lindseyabrandon is offline
 

Newbie
  
Join Date: Jun 2008
Location: Atlanta, GA
Posts: 8
 

Default Re: Add a pop-up information box to describe a product option

It did end up having to do with the htaccess file. Thanks for your help, it is now working.

Lindsey
__________________
/Lindsey/
X-Cart Gold 4.1.9
Reply With Quote
  #26  
Old 09-09-2008, 03:51 PM
 
jkirkpatrick jkirkpatrick is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 193
 

Default Re: Add a pop-up information box to describe a product option

This looks like EXACTLY what I have been searching for.

Is there a limit to how much text you can include in the popup window? Can it popup a window that has images in it?

For example I want to have a link on my jewelry website beside the "Choose Chain Style" that pops up a window showing little pictures of the 8 different chain styles available. Can that be done with this mod?

Thanks in advance for any answers!

All the Best,
Jennifer
__________________
Jennifer Kirkpatrick
X-Cart Pro Version 4.4.1
AND
X-Cart Gold Version 4.1.9
Reply With Quote
  #27  
Old 09-09-2008, 05:58 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Add a pop-up information box to describe a product option

It's an html file, so it can be whatever you want
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #28  
Old 12-10-2008, 07:26 AM
 
el el is offline
 

Member
  
Join Date: Jul 2005
Posts: 21
 

Default Re: Add a pop-up information box to describe a product option

Quote:
Originally Posted by balinor
This is for the 4.0 branch of X-Cart. What it does is add a linked icon (or text) next to the product option menu on the product detail page. Clicking that will open a pop-up window to display more information about that option, similar to the little question mark next to the CVV option on checkout. Tested in 4.0.18, not sure about older versions.

First, create a new folder in your files/ directory called options. Make it writable.

Open up skin1/modules/Product_Options/customer_options.tpl and find this line of code:

Code:
<SELECT id="po{$v.classid}" name="{$poname}"{if $disable} disabled{/if}{if $nojs ne 'Y'} onchange="javascript: check_options();"{/if}> {foreach from=$v.options item=o} <OPTION value="{$o.optionid}"{if $o.selected eq 'Y'} selected{/if}>{$o.option_name}{if $v.is_modifier eq 'Y' && $o.price_modifier ne 0} ({if $o.modifier_type ne '%'}{include file="currency.tpl" value=$o.price_modifier display_sign=1}{else}{$o.price_modifier}%{/if}){/if}</OPTION> {/foreach} </SELECT>

Just after it, add this:

Code:
{if $v.classtext eq 'Option Name'} <a href="#" onClick="window.open('files/options/option-name.html','','scrollbars=no,resizable=no,width=300,height=400,menubar=no,toolbar=no');return false;" target="_blank"><img src="{$ImagesDir}/question.gif" border="0" style="vertical-align: middle;" alt="Click here for more info" /></a>{/if}

Replace the following pieces with your information:

- Option Name - this is the name of the option such as select color, select size, etc. as it appears on the product detail screen next to the option drop-down. It is case sensitive, so make sure you type it exactly as it appears.

- option-name.html - replace this with the html file you want to include in the pop-up, or use an image (i.e. imagename.jpg). Be sure to upload the .html or .jpg file to the files/options directory you created

- width= , height= - these the the width/height of the pop-up window. Adjust accordingly.

- alt= - this is the text that will show up when the customer mouses over the question mark image (in Internet Explorer at least).

- question.gif - this is the default x-cart question mark image. I always create my own to go with the style, so adjust this accordingly as well.

The code above will add the image/link to the option specified only. To add it to additional options, use {elseif} statements like this:

Code:
{if $v.classtext eq 'Option Name'} <a href="#" onClick="window.open('files/options/option-name.html','','scrollbars=no,resizable=no,width=300,height=400,menubar=no,toolbar=no');return false;" target="_blank"><img src="{$ImagesDir}/question.gif" border="0" style="vertical-align: middle;" alt="Click here for more info" /></a> {elseif $v.classtext eq 'Option Name2'} <a href="#" onClick="window.open('files/options/option-name2.html','','scrollbars=no,resizable=no,width=300,height=400,menubar=no,toolbar=no');return false;" target="_blank"><img src="{$ImagesDir}/question.gif" border="0" style="vertical-align: middle;" alt="Click here for more info" /></a> {/if}

Now this can get really clunky if you have a million options to add a link to, but it works well if you only have a few universal options. It will NOT work if you have a different image/html page to link to for each individual product, such as if you have different color charts for each product.

If you want to link to a unique image/html page for each product, you can use this:

Code:
{if $v.classtext eq 'Option Name'} <a href="#" onClick="window.open('files/options/{$product.productid}.html','','scrollbars=no,resizable=no,width=300,height=400,menubar=no,toolbar=no');return false;" target="_blank"><img src="{$ImagesDir}/question.gif" border="0" style="vertical-align: middle;" alt="Click here for more info" /></a>{/if}

So if you are veiwing the details for a product with ID # 8, clicking on the link next to the 'Option Name' option will link you to files/options/8.html.

Make sense? Post here with any questions and I'll answer them. Enjoy!
This is exactly what I need but it seems to work only on "Price modifier" and not on a "Custom text field".

Is it possible to make it work on the Custom text field?
__________________
el
x-cart gold 4.1.9
Mac OS X 10.4.11
Reply With Quote
  #29  
Old 12-10-2008, 07:31 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Add a pop-up information box to describe a product option

Yea, you need to add the code next to the text field code instead of the select code.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #30  
Old 12-10-2008, 07:33 AM
 
el el is offline
 

Member
  
Join Date: Jul 2005
Posts: 21
 

Default Re: Add a pop-up information box to describe a product option

Quote:
Originally Posted by balinor
This is set to work for select fields by default, but you can easily add the same code next to the text field.
Oops!! Didn't read this post before posting my previous question.

How or where do I put the code next to the Custom text box?
__________________
el
x-cart gold 4.1.9
Mac OS X 10.4.11
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:31 AM.

   

 
X-Cart forums © 2001-2020