gwynwyffar Posted January 16, 2008 Share Posted January 16, 2008 I've successfully installed STS 4.5.8 as well as the Change Default Image Directories Contribution http://www.oscommerce.com/community/contributions,5125 I have also installed osc_lightbox for STS, but it isn't working. I suspect that I need to change the references to image directories found in the sts_inc/product_info.php file but I'm not sure exactly what I should change it to. The directory definitions in my admin/includes/configure.php file are define('DIR_FS_MANUFACTURERS_IMAGES', 'manufacterers/'); define('DIR_FS_CATEGORIES_IMAGES', 'categories/'); define('DIR_FS_PRODUCTS_IMAGES', 'products/'); The code I'm supposed to change in the sts_inc/product_info.php file for lightbox to work is $template_pinfo['product_popup']= '<a rel="lightbox" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" title="'. $product_info['products_name'] .' - '. $manufacturer['manufacturers_name'] .'">'.$template_pinfo['imagesmall'] . '<br>' . TEXT_CLICK_TO_ENLARGE .'</a>'."\n"; } else { $template_pinfo['imagesmall'] =''; $template_pinfo['imagelarge'] =''; $template_pinfo['product_popup']=''; } Can someone assist me with making the proper changes? Quote Link to comment Share on other sites More sharing options...
bkellum Posted January 17, 2008 Share Posted January 17, 2008 I've successfully installed STS 4.5.8 as well as the Change Default Image Directories Contribution http://www.oscommerce.com/community/contributions,5125 I have also installed osc_lightbox for STS, but it isn't working. I suspect that I need to change the references to image directories found in the sts_inc/product_info.php file but I'm not sure exactly what I should change it to. The directory definitions in my admin/includes/configure.php file are define('DIR_FS_MANUFACTURERS_IMAGES', 'manufacterers/'); define('DIR_FS_CATEGORIES_IMAGES', 'categories/'); define('DIR_FS_PRODUCTS_IMAGES', 'products/'); The code I'm supposed to change in the sts_inc/product_info.php file for lightbox to work is $template_pinfo['product_popup']= '<a rel="lightbox" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" title="'. $product_info['products_name'] .' - '. $manufacturer['manufacturers_name'] .'">'.$template_pinfo['imagesmall'] . '<br>' . TEXT_CLICK_TO_ENLARGE .'</a>'."\n"; } else { $template_pinfo['imagesmall'] =''; $template_pinfo['imagelarge'] =''; $template_pinfo['product_popup']=''; } Can someone assist me with making the proper changes? Jennifer, First off, test to see if lightbox is working properly. Turn off STS and test. If all is OK, then test STS and Lightbox together. Do this by turning STS back on and then enable the default module only (leave the other modules disabled for now). During this testing phase, STS should pick up the lightbox modifications from the stock product_info.php file. If it doesn't pass this phase, then lightbox is not installed correctly. The code you displayed above (sts_inc/product_info.php) only applys if you are using content templates. If you are using content templates then you will need to make lightbox edits in that file. (see below) Add the following to your template page in the header (between the <head> </head>) Add: <link rel="stylesheet" href="lightbox.css" type="text/css" media="screen" /> <script type="text/javascript" src="includes/js/prototype.js"></script> <script type="text/javascript" src="includes/js/scriptaculous.js?load=effects"></script> <script type="text/javascript" src="includes/js/lightbox.js"></script> The STS tag $product_popup needs to be modified. Edit: includes/modules/sts_inc/product_info.php About in line 80 find: ------------------------------------------------------------------------------------------------- $template_pinfo['product_popup']= '<script language="javascript"><!--'."\n". 'document.write(\'<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . (int)$products_id) . '\\\')">' . $template_pinfo['imagesmall'] . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>\');'."\n". '//--></script>'."\n". '<noscript>'."\n". '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">'.$template_pinfo['imagesmall'] . '<br>' . TEXT_CLICK_TO_ENLARGE .'</a>'."\n". '</noscript>'."\n"; } else { $template_pinfo['imagesmall'] =''; $template_pinfo['imagelarge'] =''; $template_pinfo['product_popup']='' } ------------------------------------------------------------------------------------------------- Replace with: ------------------------------------------------------------------------------------------------- $template_pinfo['product_popup']= '<a rel="lightbox" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" title="'. $product_info['products_name'] .' - '. $manufacturer['manufacturers_name'] .'">'.$template_pinfo['imagesmall'] . '<br>' . TEXT_CLICK_TO_ENLARGE .'</a>'."\n"; } else { $template_pinfo['imagesmall'] =''; $template_pinfo['imagelarge'] =''; $template_pinfo['product_popup']=''; } ------------------------------------------------------------------------------------------------- :thumbsup: More help is available in the STS forum (thread). Hope this helped, Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
Guest Posted September 13, 2010 Share Posted September 13, 2010 Bill i have a similar issue regarding this, i have installed the Multiple Lightbox Addon. Unfortunately when i have create my own product_info.php.html, the code wouldn't execute. I have tried to use snippets of the code you mentioned within this post but it doesn't seem to work. I was wondering if you could help me regarding this issue. kindest regards Ashley 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.