stratus9000 Posted April 20, 2009 Share Posted April 20, 2009 (edited) Hi, I'm sure this has been addressed somewhere in the forum, but I can't seem to find it. How can I fix an issue I'm having with the product image "click to enlarge" function not working. When I click on the image to enlarge it, I get this error: Line: 1 Char: 1 Error: Object expected Code: 0 URL: http://www.ohlalasunglasses.com/catalog/pr...?products_id=55 That's it. Any suggestions on fixing this issue? Thanks! Steve Edited April 20, 2009 by stratus9000 Quote Link to comment Share on other sites More sharing options...
rusky Posted April 20, 2009 Share Posted April 20, 2009 ...hi: missing java script: <script type="text/javascript"> function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res izable=yes,copyhistory=no,width=350,height=500,screenX=150,screenY=150,top=150,le ft=150') } </script> You only have the function "wopen"... Quote Link to comment Share on other sites More sharing options...
stratus9000 Posted April 20, 2009 Author Share Posted April 20, 2009 ...hi: missing java script: <script type="text/javascript"> function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res izable=yes,copyhistory=no,width=350,height=500,screenX=150,screenY=150,top=150,l e ft=150') } </script> You only have the function "wopen"... Thanks. Where can I fix this? I'm a bit new to this CMS. =) Quote Link to comment Share on other sites More sharing options...
stratus9000 Posted April 21, 2009 Author Share Posted April 21, 2009 Can anyone tell me what the right code should be? Quote Link to comment Share on other sites More sharing options...
germ Posted April 21, 2009 Share Posted April 21, 2009 Use the code he posted. It goes in the <head> section of /catalog/product_info.php All this part of the code MUST be on ONE LONG LINE or it WON'T work: window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res izable=yes,copyhistory=no,width=350,height=500,screenX=150,screenY=150,top=150,le ft=150') The forum butchers it onto more than one line - can't stop it. Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
stratus9000 Posted April 21, 2009 Author Share Posted April 21, 2009 (edited) Oops, that didnt seem to work either...hmmmm.....any other thoughts? Edited April 21, 2009 by stratus9000 Quote Link to comment Share on other sites More sharing options...
germ Posted April 21, 2009 Share Posted April 21, 2009 Maybe cuz it aint there: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html dir="LTR" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Welcome to Oooh La La Sunglasses! Everything is $12.95 with free shipping!</title> <script language="javascript">AC_FL_RunContent = 0;</script> <script src="AC_RunActiveContent.js" language="javascript"></script> <script> <!-- function wopen(url, name, w, h) { // Fudge factors for window decoration space. // In my tests these work well on all platforms & browsers. w += 32; h += 96; var win = window.open(url, name, 'width=' + w + ', height=' + h + ', ' + 'location=no, menubar=no, ' + 'status=no, toolbar=no, scrollbars=no, resizable=no'); win.resizeTo(w, h); win.focus(); } // --> </script> <link rel="stylesheet" type="text/css" href="stylesheet.css" /> <link rel="stylesheet" type="text/css" href="style.css" /> </head> Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
stratus9000 Posted April 21, 2009 Author Share Posted April 21, 2009 damn, i must be uploading the wrong file. Let me check again. Sorry for the stupidity. Had a long day. Quote Link to comment Share on other sites More sharing options...
stratus9000 Posted April 21, 2009 Author Share Posted April 21, 2009 Now it works. The problem was that I'm using STS Templates and I had to edit my index.html file instead of the product_info.php file. Quote Link to comment Share on other sites More sharing options...
germ Posted April 21, 2009 Share Posted April 21, 2009 It works for me now. :) Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
germ Posted April 21, 2009 Share Posted April 21, 2009 I didn't know you were using STS. And yes it goes somewhere else when STS is involved. Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
stratus9000 Posted April 21, 2009 Author Share Posted April 21, 2009 Thanks for the help anyways. This is a powerful CMS and I'm going to get into it once this site is finished. I initially created the site in Flash, but that was a big mistake for lots of reasons. The "coolness" factor was completely overshadowed by the lack of functionality. Quote Link to comment Share on other sites More sharing options...
rusky Posted April 21, 2009 Share Posted April 21, 2009 ...hi, you can implement flash wherever you want. Especially sunglasses, jewels etc. will be shown fine with flash... Quote Link to comment Share on other sites More sharing options...
eehaweehaw Posted April 27, 2009 Share Posted April 27, 2009 Hi Guys, sorry to bump this thread. I am having the same issue. I am also using STS and the Enlarge Image is not working. What code should i have and what file do i need to amend to get it working. Thanks in advance for your help. Amit. Quote Link to comment Share on other sites More sharing options...
stratus9000 Posted April 28, 2009 Author Share Posted April 28, 2009 I'm also having another weird issue that just popped up. When I try to add a product image to a new product, it seems to work and load but then when you preview it, it doesn't work and just acts link a broken image link. Any thoughts on fixing this? Quote Link to comment Share on other sites More sharing options...
stratus9000 Posted April 28, 2009 Author Share Posted April 28, 2009 (edited) Update: It actually looks like it won't even upload when you click on the browse button. It lets you browse for a pic on your pc, but then when you click okay and then preview, it doesn't seem to do anything. Hmm.... Oh, and I can fix it in MySQL though. It says null under product image and I just have to change it to the write file name for the image i.e. 123.jpg Any thoughts???? Edited April 28, 2009 by stratus9000 Quote Link to comment Share on other sites More sharing options...
rusky Posted April 28, 2009 Share Posted April 28, 2009 ...hi, check the path for uploading the pics (folder / permission). To change it manual is a lot of work. Quote Link to comment Share on other sites More sharing options...
stratus9000 Posted April 28, 2009 Author Share Posted April 28, 2009 Which file will have the path info? product_info? Quote Link to comment Share on other sites More sharing options...
rusky Posted April 28, 2009 Share Posted April 28, 2009 Which file will have the path info? product_info? ...no, I think we`re in the admin (backend) and not frontend. 1. admin / includes / configure.php 2. admin / categories.php e.g. <td class="dataTableRow" colspan="2" valign="top"><?php if (tep_not_null($pInfo->products_image_sm_3)) { ?><span class="smallText"><?php echo $pInfo->products_image_sm_3 . '<br>' . tep_image(DIR_WS_CATALOG_IMAGES_3D . $pInfo->products_image_sm_3, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="left" hspace="0" vspace="5"') . '<br>'. tep_draw_separator('pixel_trans.gif', '5', '15') . ' <input type="checkbox" name="unlink_image_sm_3" value="yes">' . TEXT_PRODUCTS_IMAGE_REMOVE_SHORT . '<br>' . tep_draw_separator('pixel_trans.gif', '5', '15') . ' <input type="checkbox" name="delete_image_sm_3" value="yes">' . TEXT_PRODUCTS_IMAGE_DELETE_SHORT . '<br>' . tep_draw_separator('pixel_trans.gif', '1', '42'); ?></span><?php } ?></td> 3. Maybe the PHP.INI Quote Link to comment Share on other sites More sharing options...
stratus9000 Posted April 29, 2009 Author Share Posted April 29, 2009 Thanks, its fixed. Gracias :D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.