Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

I am attempting to install

 

http://addons.oscommerce.com/info/5532

 

And with some problems, it does work, but there are some images that refuse to show up at all in the product info page, while some work fine.

 

What I mean is, there is no indication of an image in the product info page when it doesn't work.

 

I have checked the install a number of times, and tried to figure it out by doing the following:

 

I renamed an image that works in another product, and put it in the non-working images place...(named the same as the non working image) and the working image no longer worked with that name in that product description.

 

I tried putting the non-working image in with the working image's name, still no joy.

 

I can put the non working image in a product that the old image works, and the image then works.

 

I cannot find the difference between the non working and the working image in the name, or filesize, or filetype.

 

I cannot find a correlation between the name/filetype or size that makes sense.

 

Is there something that I am missing?

 

I would appreciate any help.

Thanks,

Kurt

Posted
What I mean is, there is no indication of an image in the product info page when it doesn't work.

I may be way off base here, but when I've seen that happen elsewhere is when the products description contains an apostrophe ( ' ).

 

It wreaks havoc on the Javascript syntax, so nothing shows up.

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

Posted

I had a problem like that once, the image name had punctuation like " or ' in the name.

might be your problem.

Posted
I may be way off base here, but when I've seen that happen elsewhere is when the products description contains an apostrophe ( ' ).

 

It wreaks havoc on the Javascript syntax, so nothing shows up.

:blush:

Ok, I will look for apostrophe's How can I get around that? some of my products are by Uncle Mike's is there an escape character?

 

The filename has no odd characters I am sure, but the product description may.

 

That is a good bet, I have looked at some of the products that were affected, and it looks like the apostrophe may be the culprit in the product name, I will test this when I can get back to the code.

 

How then can I say men's shorts, or women's shirts?

 

Thanks so much,

Regards,

Kurt

Posted

I haven't seen the lightbox code, but standard osC does it this way:

 

<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'], [color="#FF0000"]addslashes($product_info['products_name'])[/color], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . tep_image_button('small_view.gif', TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>');
//--></script>

Uses the PHP function addslashes

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 >

Posted

Code from the latest version:

;)

<script language="javascript"><!--
document.write('<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lightbox" title="'.$product_info['products_name'].'" >' . 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>'; ?>');
//--></script>
<noscript>

Maybe this:

 

<script language="javascript"><!--
document.write('<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lightbox" title="'.$product_info['products_name'].'" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], [color="#FF0000"]addslashes($product_info['products_name'])[/color], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>

I highlighted a suggested change.

;)

 

You can't just copy/paste the code from this post into your source cuz the forum mucks it up.

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 >

Posted

Jim,

 

Thanks so much, yes it was the apostrophe

 

I will have to make some changes now, but at least I found the culprit.

 

Would be nice if there was an escape character though. (I already tried the /, it didn't work)

 

I have a plan though, and I guess I will call it good.

 

Thanks again,

Kurt

Posted

Try the code change I posted.

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 >

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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