Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shadowbox For Product_Info.php


desiredin

Recommended Posts

Nevermind. Heh. If the test file worked for you, this code should as well. Perhaps you are caching the old product_info.php.

 

Hit ctrl-F5 and see if that helps.

 

Hmm .. that didn't work either. What version of oscommerce are you using? Shadowbox is not working for me at all but lightbox does work even if i have same config as Shadowbox. Shadowbox looked a whole lot better is the reason why i wanted to use it.

 

I am using oscommerce rc2 2.2a. I believe that is the latest one?

Link to comment
Share on other sites

  • Replies 108
  • Created
  • Last Reply

Top Posters In This Topic

I am using the latest version of OSC. And it should work no problem. All I can recommend is to upload your files to a server so I can see what is going on. Because I can't help you otherwise.

 

One other thing to try, is to put a Shadowbox link in the product description of one of your products and try it from there. Just replace the contents of one of your products with this, and if everything is working, it will pop up google in a Shadowbox.

 

<a rel="shadowbox" href="http://www.google.com">OPEN GOOGLE IN SHADOWBOX </a>

Link to comment
Share on other sites

I've got a problem and I'm hoping someone's got the expertise to help me.

 

I've loaded the shadowbox script, which works perfectly. However, when I add the Dynamenu contribution, it stops working.

 

As soon as I delete the dynamenu infobox, it starts working again.

 

Obviously, there is a conflict with the javascript, but am no javascript expert.

 

Anyone else come across this problem and been able to rectify it.

 

Thanks

My latest osCommerce work in progress

 

no outside links in signatures allowed, see PM

Link to comment
Share on other sites

First off let me give a quick thanks! Shadowbox works pretty well for me.

 

However, I do have an odd quirk. After loading Shadowbox, all the text on my product pages went to red (the overall color of the site). I was not really sure where to look for the problem, so I checked around in my stylesheet.css and ended up changing one of the colors in there and all the text went back to black. Now I have a black border around the site (fixed width) where it used to be red. So, that's where I am at now.

 

Also, is there a way to make the shadowbox work from the index page? I tried to link to another site using the sample code from you, it works fine from product pages but not from index. It just gets treated as a regular link. I should also mention that I didn't do the review mods, dunno if that would help.

 

Thanks

Link to comment
Share on other sites

What you have to remember is that in the origional contribution, you're setting the DOCTYPE to strict to work with Shadowbox. Which means, CSS is going to be treated with less slack. So any issues in the coding (mainly with tables) are going to be forced to show up.

 

You can fix that by going with XHTML transitional. Appears to work that way no problem.

 

As for Shadowbox working in the index page, all you need to do is change the doctype, and call the shadowbox CSS and JSs from the index page just like you do with the product_info.php page.

 

You can actually do it with any page you want. Though some pages, you leave the DOCTYPE out as it's being called from a parent page.

Link to comment
Share on other sites

Ok, so after going back and adding the relevant lines to index.php in root the shadowbox works fine from main page. Success!

 

I then changed the doctype to <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> in all of the product_* files as they were originally. I wanted to see if the colors went back to normal and they did. I then checked shadowbox functionality and it was working great... so it seems that the doctype was the culprit in my case. **EDIT** I should add that I did use xhtml transitional and html strict, neither worked properly for me.

 

Also, the file style.css is referenced in the lines that are to be added / changed. I don't have a style.css so I ended up deleting that line in the product files so that stylesheet.css is referenced only once and style.css is not).

 

 

Everything seems to be working fine, thanks for your quick reply desiredin!

Edited by Rob.Ace
Link to comment
Share on other sites

Hi,

 

I have a contribution called oscThumb installed. It is based on phpThumb. It basically creates thumbnails, encrypts image URLs and watermarks them automatically when enlarged (without editing the original file).

 

I tried using lightbox with it, but lightbox is ignoring the watermarking, and I can't figure out why. I'm guessing shadowbox will do the same.

 

Anyone know how to make them work together?

 

 

Thanks in advance.

osCommerce is GREAT. When it works...

Link to comment
Share on other sites

Not sure what to tell you. Do you know how the images are handled? Are the images dynamic or are they saved/cached?

Does Shadowbox load the right image sizes and just not the watermarks?

 

Are you able to manually type in the URL to the image in your browser and see the image?Is it watermarked there?

Edited by desiredin
Link to comment
Share on other sites

Not sure what to tell you. Do you know how the images are handled? Are the images dynamic or are they saved/cached?

Does Shadowbox load the right image sizes and just not the watermarks?

 

Are you able to manually type in the URL to the image in your browser and see the image?Is it watermarked there?

 

The images are cached, but the thumbnails are created on the first instance that they're requested (not beforehand). Shadowbox and lightbox both get the right image size, but not the watermarks, and no, when using the URL the images aren't watermarked. I hadn't thought of that last bit, thanks for pointing it out. Don't know how it helps with shadowbox, but I do know I need to turn off indexing!

 

I'll take a look through the code but I'm not much of an expert so I don't know if I'll be able to find the right part. What I do know is that oscThumb modified tep_image function, adding $thumbnail_type, and the $original bit allows it to call the normal image function.

 

// The HTML image wrapper function
// START oscThumb
// If you want to call the original function, you can call tep_image_original or call this one with $original=true.
function tep_image($src, $alt = '', $width = '', $height = '', $params = '', $original = false, $thumbnail_type = 0) {
 global $oscthumb;
return tep_image_original ($src, $alt, $width, $height, $params);
 }

$oscthumb->set_type ($src, $width, $height, $thumbnail_type);

 

I figured anything important would be in this bit, the rest of the function (not very long) is just checking for size and stuff.

 

If you can't think of anything don't worry about it, I'll try and figure it out myself. I just hoped something would seem obvious to someone, to save a bit of time.

osCommerce is GREAT. When it works...

Link to comment
Share on other sites

I'll take a look through the code but I'm not much of an expert so I don't know if I'll be able to find the right part.

 

Heh. Neither am I. If things are obvious to me, through trial and error I can usually get things to work. But I certainly do not know what I am doing. Heh.

 

The reason I asked about the images having them when called directly, probably means that the function to show the watermaks is added to the image within the product_info file itself. Which means that you have someone got to have that portion of code (for displaying the images) to open up into the Shadowbox with the image. Could be wrong as I have no idea how the contribution works, but sounds plausible.

Link to comment
Share on other sites

Heh. Neither am I. If things are obvious to me, through trial and error I can usually get things to work. But I certainly do not know what I am doing. Heh.

 

The reason I asked about the images having them when called directly, probably means that the function to show the watermaks is added to the image within the product_info file itself. Which means that you have someone got to have that portion of code (for displaying the images) to open up into the Shadowbox with the image. Could be wrong as I have no idea how the contribution works, but sounds plausible.

 

Hmm. That could well be the case, but it means hunting hours for code! Thanks for the pointer, I'll look into it and let you know how it goes as soon as I have time.

osCommerce is GREAT. When it works...

Link to comment
Share on other sites

I have a problem with windows xp and IE 7.

If the shadwobox is called from a hyperlink in the text everything works fine, but if it is called from the product image thumbnail, no shadowbox but a new tab is opened with the image. After this the hyperlink in the text to a shadowbox will also open in a new window instead of in a shadowbox

Link to comment
Share on other sites

I'm having trouble using any of the additional image modules w/shadowbox, can anyone recommend a contribution that allows for multiple pictures and works seamlessly with shadowbox?

 

Nate

Link to comment
Share on other sites

Just an FYI to others having a problem with IE7 and layout...

 

Instead of using <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> which caused layout problems in my store, but was needed for shadowbox to work with IE7

 

I used...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

 

now Shadowbox works with IE6,7, Firefox and Safari and my layout is the same as before.

Link to comment
Share on other sites

The install instructions say to add in several places

 

<link rel="stylesheet" type="text/css" href="style.css">

<link rel="stylesheet" type="text/css" href="src/css/shadowbox.css">

<script type="text/javascript" src="src/js/lib/yui-utilities.js"></script>

 

The first one

<link rel="stylesheet" type="text/css" href="style.css">

does not exist an can be omitted.

 

 

Now, does anyone know how to get rounded corners on the box?

Link to comment
Share on other sites

I didn't want the Shadowbox images just dumped into the /images directory so I moved them to images/shadowbox/ and edited src/js/shadowbox.js and src/css/shadowbox.css to reflect the new directory. I use images from suppliers and need to clear them out from time to time.

 

There were two instances in shadowbox.js and one in shadowbox.css.

 

Pretty easy. So far, so good.

Link to comment
Share on other sites

The install instructions say to add in several places

 

<link rel="stylesheet" type="text/css" href="style.css">

<link rel="stylesheet" type="text/css" href="src/css/shadowbox.css">

<script type="text/javascript" src="src/js/lib/yui-utilities.js"></script>

 

The first one

<link rel="stylesheet" type="text/css" href="style.css">

does not exist an can be omitted.

 

 

Now, does anyone know how to get rounded corners on the box?

Never mind that last post. The changed doc type to

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

causes the Graphical Borders contribution to display incorrectly in FF.

 

Any have a fix for this?

Link to comment
Share on other sites

Going to XHTML Transitional worked for me.

I already have XHTML Transitional, the install instuctions specify strict.dtd, so I changed it. Looks like another reinstall attempt. Thanks for the reply.

Link to comment
Share on other sites

I already have XHTML Transitional, the install instuctions specify strict.dtd, so I changed it. Looks like another reinstall attempt. Thanks for the reply.

Just to confirm, using

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

 

does fix the problem of breaking the grahical borders contribution in firefox.

 

Thankyou for the solution desiredin.

Link to comment
Share on other sites

Just to clarify....

HTML Transitional will not work with Shadowbox.

HTML Strict does, but because you're telling the browser to use strict formatting, tables with end up padded across browsers.

XHTML Transitional was the work-around I used to get everything working and tables looking the same on all browsers.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

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