Jump to content

Archived

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

sackling

add image folder

Recommended Posts

I am trying to do something I have done before and I am scratching my head as to why it is not working now.

 

I need to show an image on a page from a different folder then the one that is defined in configure.php so I added a new definition and folder in there like so:

 

define('DIR_WS_CATALOG_IMAGES_CAT', 'images/product_mid/');

 

and then on my php page I have the following:

 

<?php echo '<table border="0" bordercolor="#E8E8E8" cellspacing="0" cellpadding="0" align="center"><tr><td height="360" align="center" width="270" ><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . ' ">' . tep_image(DIR_WS_IMAGES_CAT . $products_new['products_image'], $products_new['products_name'], 270, 360 ) .  ' </a></td></tr></table>'; ?><? echo $currencies->$products_new['products_price'] ?> 

 

This does not work though. If I change DIR_WS_IMAGES_CAT to just DIR_WS_IMAGES then it shows me all my images but just not the ones from the right folder. The file names are the same.

 

also changing the definition of DIR_WS_IMAGE in configure.php is not effecting the results at all so I dont think I need to define the folder in there. But I am pretty sure I do need to define it in there... What am I missing?

Share this post


Link to post
Share on other sites

tep_image(DIR_WS_IMAGES_CAT

 

The RED text doen't match the define you posted.

 

define('DIR_WS_CATALOG_IMAGES_CAT', 'images/product_mid/');

 

That would be why it doesn't work.


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 >

Share this post


Link to post
Share on other sites

tep_image(DIR_WS_IMAGES_CAT

 

The RED text doen't match the define you posted.

 

define('DIR_WS_CATALOG_IMAGES_CAT', 'images/product_mid/');

 

That would be why it doesn't work.

 

Sorry I was playing around with the code and forgot to change it back for my post. I have it as the same name and it is not working. How can I find out which configure.php file it is using because even if I erase the original definition and keep the name in my php file it still works. So clearly it is not getting the definition from this file.. I don't think.

Share this post


Link to post
Share on other sites

Sorry I was playing around with the code and forgot to change it back for my post. I have it as the same name and it is not working. How can I find out which configure.php file it is using because even if I erase the original definition and keep the name in my php file it still works. So clearly it is not getting the definition from this file.. I don't think.

Could you post (or PM me) your URL?

:unsure:


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 >

Share this post


Link to post
Share on other sites

I just found the problem. The file is not being overwritten for some reason on my ftp or through dreamweaver. All other files can be overwritten except this...

Share this post


Link to post
Share on other sites

got it. File Permissions. I feel like an ass. Thanks for your help.

That's odd.....

 

You look like a human being...

:)


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 >

Share this post


Link to post
Share on other sites

×