Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help: Image Links Outside of Domain?


johnkordes

Recommended Posts

My image files do not sit in the \images folder instead they point to a totally different domain site. When I uploaded the exact address into the sql database, the image links became broken. They are broken because oscommerce keeps referencing the \images folder and then the address I loaded in sql together instead of just the loaded sql address.

 

For example: This is the image address that shows up that is being broken:

 

http://kordesco.com/images/http://www.frag...xoxohetsg68.jpg

 

How do I get rid of this default prefix: http://kordesco.com/images/

The correct image link is: http://www.fragrancex.com/images/products/...xoxohetsg68.jpg

 

Thanks.

Link to comment
Share on other sites

You don`t say where your talking about, but assuming you mean product_info.php

 

Around 100 you will find:

 

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

 

You`ll see here every time the image function tep_image is called DIR_WS_IMAGES is added to the url, so remove that & that will sort for this file, of course it means then that you must give the full url for all images that might appear here.

 

;)

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

You don`t say where your talking about, but assuming you mean product_info.php

 

Around 100 you will find:

 

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

 

You`ll see here every time the image function tep_image is called DIR_WS_IMAGES is added to the url, so remove that & that will sort for this file, of course it means then that you must give the full url for all images that might appear here.

 

;)

 

 

Thanks spooks. I will try that out. I was out of reach to the internet during the memorial weekend and all but should be testing the site soon. Thanks.

Link to comment
Share on other sites

  • 10 months later...

Greetings Sam!

This is exactly what I've been looking for. I did change the product_info.php, and found that if I did the same to products_new.php, popup_info.php, and shopping_cart.php, that most of it works. But for the life of me, I cannot figure out how to fix the main page.... presumably index.php.... to do the same. Any ideas?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...