Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

In order to avoid complicated installations to improve the quality of the thumbnails, I'd like to do the following:

 

Via Admin I will provide the shop with a proper thumbnail (produced in Photoshop). In my case it is stored in the directory 'images'.

After that I FTP new BIG images - which are shown in the popup window - which are gonig to be stored in a separate directory 'images_big'.

 

At the bottom of popup_image.php there are the following lines of code:

 

==================================================================

//

//

<body onload="resize();">

<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?>

</body>

</html>

==================================================================

 

I presume that '$products['products_image']' holds the path to the thumbnail image (i.e.: 'images/book03.jpg').

I need to change that path into 'images_big/book03.jpg'. So a little bit of string manipulation here :-"

 

How do i do that in PHP? Anyone?

 

Thanks,

Frans

Posted
In order to avoid complicated installations to improve the quality of the thumbnails, I'd like to do the following:

 

Via Admin I will provide the shop with a proper thumbnail (produced in Photoshop). In my case it is stored in the directory 'images'.

After that I FTP new BIG images - which are shown in the popup window - which are gonig to be stored in a separate directory 'images_big'.

 

At the bottom of popup_image.php there are the following lines of code:

 

==================================================================

//

//

<body onload="resize();">

<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?>

</body>

</html>

==================================================================

 

I presume that '$products['products_image']' holds the path to the thumbnail image (i.e.: 'images/book03.jpg').

I need to change that path into 'images_big/book03.jpg'. So a little bit of string manipulation here :-"

 

How do i do that in PHP? Anyone?

 

Thanks,

Frans

 

<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?>

 

in this DIR_WS_IMAGES is responsible for directory/folder naming hard code this value to what YOu want.

 

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Posted

<?php echo tep_image('images_big/' . $products['products_image'], $products['products_name']); ?>

 

Assuming the image has exactly the same name

Posted
<?php echo tep_image('images_big/' . $products['products_image'], $products['products_name']); ?>

 

Assuming the image has exactly the same name

 

Your assumption is correct! Otherwise it wouldn't work I'm afraid.

Does '$products['products_image'] hold just the image's name ("book03.jpg") or the complete (relative) path? ("images/book03.jpg"). If this is the case I will have to do some string manipulation to replace the dir 'images' with 'images_big'. (I've not a clue how that works in PHP.)

Any idea?

 

Frans

Posted (edited)

Well what's your directory structure then?

 

is images_big folder INSIDE the images folder or is it catalog/images_big?

 

Or to ask a different way WHERE is your images_big folder located?

Edited by Babygurgles
Posted
Well what's your directory structure then?

 

is images_big folder INSIDE the images folder or is it catalog/images_big?

 

Or to ask a different way WHERE is your images_big folder located?

 

I changed my directory structure accordingly.

Now the small images are in 'images', the big ones in 'images_big'.

 

Just by replacing the small code in the popup_image.php - as you suggested - did the trick.

Thanks very much !!

(I've learned some PHP on the fly as well :thumbsup: )

Posted
Thanks very much !!

(I've learned some PHP on the fly as well :thumbsup: )

 

My pleasure

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