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

Detailed Image(s) Popup 2.1 [3.4.x-4.0.x]

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #181  
Old 08-25-2006, 02:36 PM
 
schawel schawel is offline
 

Advanced Member
  
Join Date: Apr 2006
Location: San Francisco
Posts: 78
 

Default Re: Detailed Image(s) Popup 2.1 [3.4.x-4.0.x]

I just get this in the window that pops up

[img]/product_image.php?imageid=99[/img]

No photo..just a path..booo
__________________
X-Cart Gold v4.0.18
L.A.M.P model
MySQL 4.0.25-standard
PHP 4.3.10
DSEFU Mod
Reply With Quote
  #182  
Old 08-26-2006, 07:18 AM
 
schawel schawel is offline
 

Advanced Member
  
Join Date: Apr 2006
Location: San Francisco
Posts: 78
 

Unhappy Re: Detailed Image(s) Popup 2.1 [3.4.x-4.0.x]

Quote:
Originally Posted by schawel
I just get this in the window that pops up

[img]/product_image.php?imageid=99[/img]

No photo..just a path..booo


Let me clarify.

I have followed the steps EXACTLY. On the product page i see my product image and a link below it labled "View larger image". Ok. I click on the link and a window pops open just fine. The window that pops open has the above echoed into it. It seems as though that window which pops up (product_deatiled_images.php) can not find or parse the smarty code. i click on the link in the popup [img]/product_image.php?imageid=99[/img] and the window goes away as it should.

Any ideas?
__________________
X-Cart Gold v4.0.18
L.A.M.P model
MySQL 4.0.25-standard
PHP 4.3.10
DSEFU Mod
Reply With Quote
  #183  
Old 08-28-2006, 08:50 AM
 
schawel schawel is offline
 

Advanced Member
  
Join Date: Apr 2006
Location: San Francisco
Posts: 78
 

Default Re: Detailed Image(s) Popup 2.1 [3.4.x-4.0.x]

This is the VIEWED SOURCE of the popup.



<script type="text/javascript">
<!--

// Initial Resize
var h = 187+40;
var w = 488+30;

// make sure size isn't bigger than users screen

if(h>=screen.height) {
h=screen.height-30;
}
if(w>=screen.width) {
w=screen.width;
}

window.resizeTo(w,h);

// Vars
var photos=new Array()
var photos_width=new Array()
var photos_height=new Array()
var which=0

// Images
photos[0]="/product_image.php?imageid=101"
photos_width[0]="488"
photos_height[0]="187"


var preloadedimages=new Array()
for (i=0;i<photos.length;i++){
preloadedimages[i]=new Image()
preloadedimages[i].src=photos[i]
}

function applyeffect(){
if (document.all && photoslider.filters){
photoslider.filters.revealTrans.Transition=Math.fl oor(Math.random()*23)
photoslider.filters.revealTrans.stop()
photoslider.filters.revealTrans.apply()
}
}

function playeffect(){
if (document.all && photoslider.filters)
photoslider.filters.revealTrans.play()
}

function backward(){
if (which>0){
which--
} else {
which=photos.length-1;
}
applyeffect()
document.images.photoslider.src=photos[which]
newWidth=parseInt(photos_width[which])+30;
newHeight=parseInt(photos_height[which])+85;
if(newHeight>=screen.height) {
newHeight=screen.height-30;
}
if(newWidth>=screen.width) {
newWidth=screen.width;
}
window.resizeTo(newWidth,newHeight)
playeffect()
}

function forward(){
if (which<photos.length-1){
which++
} else {
which=0;
}
applyeffect()
document.images.photoslider.src=photos[which]
newWidth=parseInt(photos_width[which])+30;
newHeight=parseInt(photos_height[which])+85;
if(newHeight>=screen.height) {
newHeight=screen.height-30;
}
if(newWidth>=screen.width) {
newWidth=screen.width;
}
window.resizeTo(newWidth,newHeight)
playeffect()
}
//-->
</script>



<body>

<a href="javascript:window.close();">

<script type="text/javascript">
document.write('[img]'+photos[0]+'[/img]')
</script>

</a>

</body>
</html>
__________________
X-Cart Gold v4.0.18
L.A.M.P model
MySQL 4.0.25-standard
PHP 4.3.10
DSEFU Mod
Reply With Quote
  #184  
Old 08-28-2006, 10:07 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default Re: Detailed Image(s) Popup 2.1 [3.4.x-4.0.x]

What version of X-Cart are you running?

If your using any version above 3.5.x+ you'll need to put the php file straight in the root of your x-cart installation and change the reference in the .tpl files accordingly.

Hope this helps.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #185  
Old 08-28-2006, 10:27 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default Re: Detailed Image(s) Popup 2.1 [3.4.x-4.0.x]

Quote:
Originally Posted by girlsbits
Thanks to Boomer for this mod, it works fine except that instead of showing the default thumbnail image (130x150px) on the product details page, how would I show a resized larger image (250x297) which would then open a popup window on click? The current correct code for the larger image of 250x297 is this:

If I am understanding your question correctly you want to use a detailed image for the thumbnail? If so wouldn't be easiest just to use the thumbnail portion of the product pages for just that thumbnails, except use a larger image instead?

If your still wanting to do such try using $images instead of $product in the include file for the image.

Code:
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$images.image_x image_y=$images.image_y product=$product.product tmbn_url=$images.tmbn_url id="product_thumbnail" type="P"}
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #186  
Old 08-28-2006, 11:58 AM
 
schawel schawel is offline
 

Advanced Member
  
Join Date: Apr 2006
Location: San Francisco
Posts: 78
 

Default Re: Detailed Image(s) Popup 2.1 [3.4.x-4.0.x]

Thanks.

I want to keep my thumbnail as is. But I just want to have the thumbnail and the linked text below it open the window up and display and large detailed image there. It almost works, but the image for some reason is not reaching that popup. I must be something path related.

I have the OG version of X-Cart Gold v4.0.18

I did drop the product_detailed_images.php into the ROOT or the public_html dir.

example: http://www.canineconfections.com/Canine-Confections-15-Piece-p-16138.html

Thanks again.
__________________
X-Cart Gold v4.0.18
L.A.M.P model
MySQL 4.0.25-standard
PHP 4.3.10
DSEFU Mod
Reply With Quote
  #187  
Old 08-28-2006, 12:55 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default Re: Detailed Image(s) Popup 2.1 [3.4.x-4.0.x]

Code:
document.write('[img]'+photos[0]+'[/img]')

It seems your trying to use BB Codes for posting an image i.e. the img/img isn't HTML

try:
Code:
document.write('<img src="'+photos[0]+'">');

instead
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #188  
Old 08-28-2006, 01:25 PM
 
schawel schawel is offline
 

Advanced Member
  
Join Date: Apr 2006
Location: San Francisco
Posts: 78
 

Default Re: Detailed Image(s) Popup 2.1 [3.4.x-4.0.x]

Killer. That worked.

I looked at your OG code. You have them in there. Was that a mistake or is something wrong with how im calling things?


Either way.. You solved it. Thanks!
__________________
X-Cart Gold v4.0.18
L.A.M.P model
MySQL 4.0.25-standard
PHP 4.3.10
DSEFU Mod
Reply With Quote
  #189  
Old 08-28-2006, 01:43 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default Re: Detailed Image(s) Popup 2.1 [3.4.x-4.0.x]

Quote:
Originally Posted by schawel
Killer. That worked. I looked at your OG code. You have them in there. Was that a mistake or is something wrong with how im calling things?

No it probably was due to the recent switch from phpBB to vB here on the forums, it may have happened on other code postings as well.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #190  
Old 08-31-2006, 10:10 AM
 
goldoak goldoak is offline
 

Newbie
  
Join Date: Oct 2003
Posts: 7
 

Default Re: Detailed Image(s) Popup 2.1 [3.4.x-4.0.x]

Hi all,
Any updates to this thread for 4.1.x versions?
Trying to display the detailed images' alt text in the popup window as a caption.
I've located the location in '/main/popup_image.tpl' where I want it to appear, but don't know how to reference the alt text.

Any help would be greatly appreciated.
thanks
__________________
jm plein consulting
Communication Strategies for Small Business
pleinconsulting.com
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 03:55 PM.

   

 
X-Cart forums © 2001-2020