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

PopUp Image Viewer with CSS code. OnMouseOver view the thumbnail maximized.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #21  
Old 06-22-2009, 07:56 PM
 
Yrik Yrik is offline
 

Member
  
Join Date: Jun 2009
Posts: 25
 

Lightbulb Re: PopUp Image Viewer with CSS code. OnMouseOver view the thumbnail maximized.

Thanks everyone for your posts! I just adjusted this for 4.2 version. The only difference is instead of products[product] use product

New "Replace with" for step 3 is:
<a class="thumbnail" href="product.php?productid={$product.productid}&a mp;cat={$cat}&amp;page={$navigation_page}">
<span><img src="image.php?id={$product.productid}&type=P" /></span>
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.tmbn_x|default:$config.Appearance .thumbnail_width image_y=$product.tmbn_y product=$product.product tmbn_url=$product.tmbn_url}</a>


Now, what would be nice is a way to offset it from position of mouse or something. The popup jumps somewhat strangely.

Take a look at my result here: www.ijitsa.com
__________________
X-Cart Gold 4.4
Reply With Quote
  #22  
Old 06-22-2009, 09:56 PM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: PopUp Image Viewer with CSS code. OnMouseOver view the thumbnail maximized.

Quote:
Originally Posted by sales@webosusa.com
I made this script and adapted by me for x-cart.

Use at your own risk. I made for x-cart 4.1.9 but i believe that will works with any version as long you put the right code that refers to the product image.

1. Copy the file "thumbnail.css" to the /skin1

Code:
<style type="text/css"> /*Credits: WEBOS USA */ /*URL: http://www.webosusa.com */ /*Credits: DIGITAL NOTIONS */ /*URL: http://www.digitalnotions.biz */ /*Credits: WEBOS BRASIL */ /*URL: http://www.webosbrasil.com */ .thumbnail{ position: relative; z-index: 0; } .thumbnail:hover{ background-color: transparent; z-index: 50; } .thumbnail span{ /*CSS for enlarged image*/ position: absolute; background-color: #28697E; padding: 5px; left: -1000px; border: 0px dashed gray; visibility: hidden; color: black; text-decoration: none; } .thumbnail span img{ /*CSS for enlarged image*/ border-width: 0; padding: 0px; } .thumbnail:hover span{ /*CSS for enlarged image on hover*/ visibility: visible; left: 600px; /*position where enlarged image should offset horizontally */ } </style>

2. In /skin1/customer/home.tpl before </head> ad the line:

Code:
<link rel="stylesheet" href="{$SkinDir}/thumbnail.css" TYPE="text/css">

3.In /skin1/customer/main/products_t.tpl

Replace the line:

Code:
{include file="product_thumbnail.tpl" productid=$products[product].productid image_x=$products[product].tmbn_x|default:$config.Appearance.thumbnail_width image_y=$products[product].tmbn_y product=$products[product].product tmbn_url=$products[product].tmbn_url}

for this one:

Code:
<a class="thumbnail" href="product.php?productid={$products[product].productid}&amp;cat={$cat}&amp;page={$navigation_page}"><span><img src="{$products[product].tmbn_url}" /></span>{include file="product_thumbnail.tpl" productid=$products[product].productid image_x=$products[product].tmbn_x|default:$config.Appearance.thumbnail_width image_y=$products[product].tmbn_y product=$products[product].product tmbn_url=$products[product].tmbn_url}</a>


Here an example how will looks like.


http://www.support.webosusa.com/downloads/xcart/myMods/cssmouseover.gif

http://www.support.webosusa.com/downloads/xcart/myMods/cssmouseover_small.gif
Thanks webosusa for this codes. Now Is it possible to display enlarged imaged along with product short description simultaneously.Can you help me?
Thanks to all.
__________________
4.6.1 Platinum


Reply With Quote
  #23  
Old 07-03-2009, 02:09 PM
 
royng royng is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 85
 

Default Re: PopUp Image Viewer with CSS code. OnMouseOver view the thumbnail maximized.

on the pop up image, is that a stressed thumbnail or the product image?
__________________
X-Cart DB Version: 4.1.11 GOLD
Reply With Quote
  #24  
Old 07-04-2009, 12:15 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: PopUp Image Viewer with CSS code. OnMouseOver view the thumbnail maximized.

Quote:
Originally Posted by Cankus
İf you want real product image on OnMouseOver you can use this link in products_t.tpl

<a class="thumbnail" href="product.php?productid={$products[product].productid}&amp;cat={$cat}&amp;page={$navigation_p age}"><span><img src="image.php?id={$products[product].productid}&type=P" /></span>{include

file="product_thumbnail.tpl" productid=$products[product].productid image_x=$products[product].tmbn_x|default:$config.Appearance.thumbnail_width image_y=$products[product].tmbn_y

product=$products[product].product tmbn_url=$products[product].tmbn_url}</a>

Merih

www.elitmarket.com

Thanks Cankus for your codes.Now is it possible to view image along with short description on top of each product, instead of right corner?Can you help me?
Thank you.
__________________
4.6.1 Platinum


Reply With Quote
  #25  
Old 09-19-2010, 11:37 PM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: PopUp Image Viewer with CSS code. OnMouseOver view the thumbnail maximized.

What for 4.3 versions???
__________________
4.6.1 Platinum


Reply With Quote
  #26  
Old 09-20-2010, 09:23 PM
 
xtech xtech is offline
 

X-Adept
  
Join Date: Jun 2010
Posts: 605
 

Default Re: PopUp Image Viewer with CSS code. OnMouseOver view the thumbnail maximized.

Any update of 4.3 ?? This is very beautiful completed mod.I request Pedro to update codes for 4.3 versions or tell someone if existing codes work on 4.3 versions??

Waiting for someone to reply.
__________________
X-cart Platinum
4.6.1
Reboot template
Reply With Quote
  #27  
Old 09-29-2010, 12:32 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: PopUp Image Viewer with CSS code. OnMouseOver view the thumbnail maximized.

Any one can code this for 4.3 and latest 4.4 versions??
__________________
4.6.1 Platinum


Reply With Quote
  #28  
Old 10-18-2010, 09:44 PM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: PopUp Image Viewer with CSS code. OnMouseOver view the thumbnail maximized.

Any Update about 4.3 and latest 4.4 versions??
__________________
4.6.1 Platinum


Reply With Quote
  #29  
Old 10-19-2010, 02:46 AM
 
Cankus Cankus is offline
 

Member
  
Join Date: May 2006
Posts: 27
 

Default Re: PopUp Image Viewer with CSS code. OnMouseOver view the thumbnail maximized.

Version : 4.4.1 Pro Light & Lucid (3 column)

Step - 1
-------------------------------------------
Add this code include end of page skin/common_files/css/main.css
---------------------------------------------
.thumbnail{
position: relative;
z-index: 0;
}

.thumbnail:hover{
background-color: transparent;
z-index: 50;
}

.thumbnail span{ /*CSS for enlarged image*/
position: absolute;
background-color: brown;
padding: 3px;
left: -1000px;
border: 0px dashed gray;
visibility: hidden;
color: black;
text-decoration: none;
}

.thumbnail span img{ /*CSS for enlarged image*/
border-width: 0;
padding: 0px;
}

.thumbnail:hover span{ /*CSS for enlarged image on hover*/
visibility: visible;
left: 300px; /*position where enlarged image should offset horizontally */

Step - 2
----------------------------------------------------------------
add this code skin/common_files/customer/main/products_t.tpl
line 62 (maybe different line other skins)
----------------------------------------------------------------
Find this code:
<a href="{$product.alt_url|default:$product.page_url| amp}">{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.tmbn_x image_y=$product.tmbn_y product=$product.product tmbn_url=$product.tmbn_url}</a>

And replace this code:
<a class="thumbnail" href="product.php?productid={$products[product].productid}&amp;cat={$cat}&amp;page={$navigation_p age}"><span><img src="image.php?id={$product.productid}&type=P" /></span>{include file="product_thumbnail.tpl" productid=$product.productid image_x=$products.tmbn_x|default:$config.Appearanc e.thumbnail_width image_y=$products.tmbn_y product=$products.product tmbn_url=$products.tmbn_url}</a>

Finish

If you want to add this options to other skins you must change 2 files below

1- skin/skin_name/css/altskin.css (step-1)
2- skin/skin_name/customer/products_t.tpl (step-2)
__________________
www.elitmarket.com
Pro 4.4.3
Reply With Quote
  #30  
Old 10-19-2010, 03:16 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: PopUp Image Viewer with CSS code. OnMouseOver view the thumbnail maximized.

Thanks Cankus for your response and for Version : 4.3.1 Gold Light & Lucid (3 column),same code or different code??

Waiting for your reply...
__________________
4.6.1 Platinum


Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 11:19 PM.

   

 
X-Cart forums © 2001-2020