Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

lightbox 2.03.3 installation


Guest

Recommended Posts

Hi guys, I know there are other topics already for Lighbox but they go back to earlier version and have many different coding suggestions to fix problems.

 

This is where I am at:

 

1. Did a totally fresh OSC install,

2. Did a STS install,

3. Inside Admin I switched on STS default and directed the it to my template file,

4. I installed Lightbox 2.03.3

 

I have read the install.txt file over and over and followed it exactly, as follows:

 

 

1. I uploaded all the files, maintaining the directory structure.

 

2. I edited my template.html file in the includes/sts_templates and added this inside the header:

 

<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>

3. I then opened the "includes/modules/sts_inc/product_info.php" and searched for:

 

$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']=''

}

 

which is not identical to the code, the actual code has an additional ";" on the last line ( $template_pinfo['product_popup']=''; } instead of $template_pinfo['product_popup']=''} )

 

It is also suggested in the install.txt file that this is located roughly on line 80, it appears at line 46 for me, anyway I replaced the above code 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']='';

}

 

Now, the install.txt file says "That's all. Good luck"

 

Which is where I am at now, I have done everything the install.txt file says and I still have the same pop-up I had before.

 

The only thing I have done in the Admin section is activate the default page of STS.

I haven't edited the product_info.php in the main catalog page at all, as there is no metion to do so in the install notes.

 

 

does any1 know if I am missing something? or has any1 encountered the same problem?

 

any help would be greatly appriecated.

Link to comment
Share on other sites

Ok, I kept plugging away and reading stuff and I came across this tip:

 

1. Change the location of the java scripts from the file:

catalog/includes/sts_templates/{your template name}/sts_template.html

 

<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>

 

to

/catalog/product_info.php

 

2. Copy the info from lightbox.css to stylesheet.css Microsoft Explorer dont like two css files in one go.

Take away the line

 

<link rel="stylesheet" href="lightbox.css" type="text/css" media="screen" /> its not needed any more.

 

3. Take away the old popupscript in /catalog/product_info.php

 

at line 27

 

remove

 

<script language="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=100,height=100,screenX=150,screenY=150,top=150,le

ft=150')

}

//--></script>

 

at line 108

 

remove

 

<script language="javascript"><!--

document.write('<?php echo '<a href="java script:popupWindow('' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['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 . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

</noscript>

 

and replace with

 

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lightbox">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

 

Hope this will help

 

I did as above, but left the CSS files as they were and it works perfectly, so thx to Erik Svensson for that tip, and I hope any others that encounter the same problem will get some use from this thread.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...