spinach Posted February 19, 2009 Share Posted February 19, 2009 I want to remove the popup window call and 'click to enlarge' script from my product info, but leave the product image intact. I found the following instructions in this Knowledge Base article. To Remove the "click to enlarge" link only and leave the picture in tact on line 120: Change: <script language="javascript"><!-- document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $Qproduct->valueInt('products_id')) . '\\\')">' . tep_image(DIR_WS_IMAGES . $Qproduct->value('products_image'), addslashes($Qproduct->value('products_name')), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $Qproduct->value('products_image')) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $Qproduct->value('products_image'), $Qproduct->value('products_name'), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> </noscript> To: <?php echo tep_image(DIR_WS_IMAGES . $Qproduct->value('products_image'), $Qproduct->value('products_name'), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"'); ?> You can delete/comment out the original code and/or replace/add the following graphic code. When I delete the first section of code and replace it with the second, I get the following error Fatal error: Call to a member function value() on a non-object in /(path)/user/htdocs/catalog/product_info.php on line 133 Line 133 is where this replaced code is. Is this a syntax error or ...? Link to comment Share on other sites More sharing options...
germ Posted February 19, 2009 Share Posted February 19, 2009 <?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"'); ?> Try that for the replacement code. The information in the link you posted is in error. :blush: 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...
spinach Posted February 19, 2009 Author Share Posted February 19, 2009 Thanks Jim. Spot on as ever. You're way ahead in the running for my osCommerce guardian angel here! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.