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
  #111  
Old 05-03-2005, 02:37 AM
 
dazybabes dazybabes is offline
 

Advanced Member
  
Join Date: Mar 2005
Posts: 70
 

Default

had initial problems with the product.tpl but got rid of the strip tags and it seemed to work but now in the pop up I get


Quote:
Parse error: parse error in d:\domains\kitinfo.co.uk\wwwroot\kitwarehouse\prod uct_detailed_images.php on line 19

this is the product_detailed_images.php

Code:
<?php # # Detailed Images Popup # Version 2.1 # http://www.cart-lab.com # info@cart-lab.com # (C)opyright 2003-2004 CartLab, all rights reserved. # Full license at: http://www.cart-lab.com/license.php # require "./auth.php"; # # Collect product images # $images = func_query("select * from $sql_tbl[images] where productid='$productid' order by orderby,imageid"); # Find max width and total height of all collected images (currently not used) foreach($images as $k=>$v) { Б─═ Б─═foreach($v as $kk=>$vv) { Б─═ Б─═Б─═ Б─═if($kk=="image_x") { Б─═ Б─═Б─═ Б─═Б─═ Б─═if($maxwidth >= $previous_maxwidth) { Б─═ Б─═Б─═ Б─═Б─═ Б─═Б─═ Б─═$maxwidth=$vv; Б─═ Б─═Б─═ Б─═Б─═ Б─═} Б─═ Б─═Б─═ Б─═Б─═ Б─═$previous_maxwidth=$vv; Б─═ Б─═Б─═ Б─═} elseif($kk=="image_y") { Б─═ Б─═Б─═ Б─═Б─═ Б─═if($maxheight >= $previous_maxheight) { Б─═ Б─═Б─═ Б─═Б─═ Б─═Б─═ Б─═$maxheight=$vv; Б─═ Б─═Б─═ Б─═Б─═ Б─═} Б─═ Б─═Б─═ Б─═Б─═ Б─═$previous_maxheight=$vv; Б─═ Б─═Б─═ Б─═}Б─═ Б─═Б─═ Б─═ Б─═ Б─═} } $smarty->assign("winw",$maxwidth); $smarty->assign("winh",$maxheight); $smarty->assign("images",$images); $smarty->display("customer/main/product_images.tpl"); ?>

any ideas??
__________________
X-Cart Version 4.0.3
Reply With Quote
  #112  
Old 05-03-2005, 04:24 AM
  TelaFirma's Avatar 
TelaFirma TelaFirma is offline
 

X-Adept
  
Join Date: Nov 2002
Location: North Carolina USA
Posts: 930
 

Default

you need to get rid of all those Б─═ Б─═Б─═ Б─═Б─═ Б─═ marks infront of the code (starting at line 19)
Reply With Quote
  #113  
Old 05-03-2005, 05:48 AM
 
dazybabes dazybabes is offline
 

Advanced Member
  
Join Date: Mar 2005
Posts: 70
 

Default

I dont know where all those crosses came from as all Ive done is copy and paste the coding. Anyway Ive deleted them now and I get this now?!

Warning: Invalid argument supplied for foreach() in d:\domains\kitinfo.co.uk\wwwroot\kitwarehouse\prod uct_detailed_images.php on line 18
No Image(s) Found!


Should I be keeping my images somewhere special or something??[/b][/code]
__________________
X-Cart Version 4.0.3
Reply With Quote
  #114  
Old 05-04-2005, 12:30 AM
 
dazybabes dazybabes is offline
 

Advanced Member
  
Join Date: Mar 2005
Posts: 70
 

Default

Ok so I've re-added all original files of Boomers and Im still getting this error message in the pop up?


Warning: Invalid argument supplied for foreach() in d:\domains\kitinfo.co.uk\wwwroot\kitwarehouse\prod uct_detailed_images.php on line 18
No Image(s) Found!


Can anyone see where the problem might be?

Code:
<?php # # Detailed Images Popup # Version 2.1 # http://www.cart-lab.com # info@cart-lab.com # (C)opyright 2003-2004 CartLab, all rights reserved. # Full license at: http://www.cart-lab.com/license.php # require "./auth.php"; # # Collect product images # $images = func_query("select * from $sql_tbl[images] where productid='$productid' order by orderby,imageid"); # Find max width and total height of all collected images (currently not used) foreach($images as $k=>$v) { Б─═ Б─═foreach($v as $kk=>$vv) { Б─═ Б─═Б─═ Б─═if($kk=="image_x") { Б─═ Б─═Б─═ Б─═Б─═ Б─═if($maxwidth >= $previous_maxwidth) { Б─═ Б─═Б─═ Б─═Б─═ Б─═Б─═ Б─═$maxwidth=$vv; Б─═ Б─═Б─═ Б─═Б─═ Б─═} Б─═ Б─═Б─═ Б─═Б─═ Б─═$previous_maxwidth=$vv; Б─═ Б─═Б─═ Б─═} elseif($kk=="image_y") { Б─═ Б─═Б─═ Б─═Б─═ Б─═if($maxheight >= $previous_maxheight) { Б─═ Б─═Б─═ Б─═Б─═ Б─═Б─═ Б─═$maxheight=$vv; Б─═ Б─═Б─═ Б─═Б─═ Б─═} Б─═ Б─═Б─═ Б─═Б─═ Б─═$previous_maxheight=$vv; Б─═ Б─═Б─═ Б─═}Б─═ Б─═Б─═ Б─═ Б─═ Б─═} } $smarty->assign("winw",$maxwidth); $smarty->assign("winh",$maxheight); $smarty->assign("images",$images); $smarty->display("customer/main/product_images.tpl"); ?>
Ignore the crosses they just turn up when I copy and paste the code from dreamweaver??

if anyone needs to look at the site let me know
__________________
X-Cart Version 4.0.3
Reply With Quote
  #115  
Old 05-04-2005, 05:34 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

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

Default

Quote:
Originally Posted by dazybabes
Ignore the crosses they just turn up when I copy and paste the code from dreamweaver??

Dreamweaver, is probably the problem try editing the files with Notepad or a simple text editor and reupload the files. Dreamweaver is known for mucking up code.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #116  
Old 05-05-2005, 05:51 AM
 
dazybabes dazybabes is offline
 

Advanced Member
  
Join Date: Mar 2005
Posts: 70
 

Default

Sorry still no go???

I've uploaded the files from your website also straight to my ftp etc and still getting the same problem when I click on the 'view details' bit in the product info

Warning: Invalid argument supplied for foreach() in d:\domains\kitinfo.co.uk\wwwroot\kitwarehouse\prod uct_detailed_images.php on line 18
No Image(s) Found!


this is line 18

Code:
foreach($images as $k=>$v) {

This is the full coding for the product_detailed_images.php
Code:
<?php # # Detailed Images Popup # Version 2.1 # http://www.cart-lab.com # info@cart-lab.com # (C)opyright 2003-2004 CartLab, all rights reserved. # Full license at: http://www.cart-lab.com/license.php # require "./auth.php"; # # Collect product images # $images = func_query("select * from $sql_tbl[images] where productid='$productid' order by orderby,imageid"); # Find max width and total height of all collected images (currently not used) foreach($images as $k=>$v) { foreach($v as $kk=>$vv) { if($kk=="image_x") { if($maxwidth >= $previous_maxwidth) { $maxwidth=$vv; } $previous_maxwidth=$vv; } elseif($kk=="image_y") { if($maxheight >= $previous_maxheight) { $maxheight=$vv; } $previous_maxheight=$vv; } } } $smarty->assign("winw",$maxwidth); $smarty->assign("winh",$maxheight); $smarty->assign("images",$images); $smarty->display("customer/main/product_images.tpl"); ?>

Is that coding in line 18 correct? has it been changed or should I be saving or loading my detailed images somewhere else??

Any help would be great or I will have to revert to an alternative way of viewing images??[/code][/b]
__________________
X-Cart Version 4.0.3
Reply With Quote
  #117  
Old 05-05-2005, 06:26 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

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

Default

Quote:
Originally Posted by dazybabes
Warning: Invalid argument supplied for foreach() in d:\domains\kitinfo.co.uk\wwwroot\kitwarehouse\prod uct_detailed_images.php on line 18
No Image(s) Found!


this is line 18

Code:
foreach($images as $k=>$v) {

Are you currently passing product_detailed_images.php an productid from the product.tpl page? Also do you have a product added that has more than 2 detailed images, as well as the module is not disabled.

It seems the array is empty, which means no productid was specified or no detailed images exist, this is why you see No Image(s) Found! after the warning.

Hope this helps.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #118  
Old 05-06-2005, 12:09 AM
 
bmm bmm is offline
 

Member
  
Join Date: Apr 2003
Location: Laguna Beach, Ca
Posts: 11
 

Default Thank You Boomer

BOOMER,
WOW, somehow my reply...made into a NEW TOPIC!
So I am reposting.

Just a simple "Thank You", the mod works great using 4.0.12 ( too chicken to update to 4.0.13).
Et al,
you have to read the WHOLE post (2 parts) most questions are answered
in the first thread http://forum.x-cart.com/viewtopic.php?t=276 for 3.XXX questions.

I have a list of ideas based off this mod, but you would have to charge.....

What a sick mod...and for free! = Donations!

BTW, I checked out http://www.cart-lab.com, WOW. Where do I start?

Thanks,


-r
__________________
Well, someone has the answer, go find them!

x-cart gold version 4.0.12
apache 1.3.33 linux
perl 5.008 linux
php 4.3.10 linux
mysql 4.0.22-standard
Reply With Quote
  #119  
Old 05-06-2005, 01:53 AM
 
dazybabes dazybabes is offline
 

Advanced Member
  
Join Date: Mar 2005
Posts: 70
 

Default

Well a new day and a Fresh look at things has brought success!?

Had another gander thru the coding and saw something wrong in the product.tpl so copied your original coding and hey presto!?

Works Brilliantly Boomer thanks for your help!?

although I do have a question???

Is there anyway of incorporating the detailed image alt text inbetween the next and previous buttons???

Pleeease, pretty pleeease???
__________________
X-Cart Version 4.0.3
Reply With Quote
  #120  
Old 05-10-2005, 08:12 AM
 
offline offline is offline
 

Member
  
Join Date: Apr 2005
Posts: 17
 

Default

With a little modification I got this great mod working in no time. One question, how do I make the popup window slightly larger so I can see the next & prev tags?
__________________
Version 4.1.1
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 05:01 AM.

   

 
X-Cart forums © 2001-2020