• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 270
  • Last Modified:

blending codes

I am trying to blend these two bits of code into one but don't know how? Not sure if it is possible.

<img src="images/<?php echo $eCart1->DisplayInfo("Thumbnail"); ?>" alt="Product thumbnail" class="eC_ProductThumb" />

Open in new window


<img src="<?php echo tNG_showDynamicThumbnail("", "images/", "{rs_Products.ProductImage}", 150, 150, true); ?>" border="0" align="middle" class="picborder"/>

Open in new window

0
jonofat
Asked:
jonofat
  • 9
  • 5
1 Solution
 
haloexpertsexchangeCommented:
what exactly are you trying to do with the image source?
you can always have more than one class on a single element like this states http://webdesign.about.com/od/css/qt/tipcssmulticlas.htm
0
 
jonofatAuthor Commented:
I am trying to get the echo $eCart1->DisplayInfo to have the 150, 150 dimensions but don't know if you can do echo $eCart1->DisplayInfo and echo tNG_showDynamicThumbnail together to achieve this.
0
 
jonofatAuthor Commented:
So, I don't want tNG_showDynamicThumbnail to pull from the recordset as the code is suggesting. I want it to pull from echo $eCart1->DisplayInfo("Thumbnail"); or visa versa.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
haloexpertsexchangeCommented:
if the image is always supposed to be 150x150 display than you can control that by css.
You just set the style on the element to height:150 px and width:150 px
0
 
jonofatAuthor Commented:
That makes the image quality poor because it is actually a big image that you are just squashing. The echo tNG_showDynamicThumbnail makes the image smaller but still retains the quality which is why I need to use it.
0
 
haloexpertsexchangeCommented:
can you save the results of the dynamic thumbnail as some sort of temporary image that you then use in the other image source?
0
 
jonofatAuthor Commented:
I am not sure what you mean?
0
 
haloexpertsexchangeCommented:
Exactly what are you getting with $eCart1->DisplayInfo("Thumbnail"); that is different that what you get from tNG_showDynamicThumbnail("", "images/", "{rs_Products.ProductImage}", 150, 150, true);
other than the sizing issue what would need you to use a different way of displaying the image, for me it looks like you are just getting the same information again just with a size difference.

For me if you still need to use the $eCart1->DisplayInfo("Thumbnail"); than what I would suggest is if this is actually possible is to use the dynamicthumbnail to generate a temporary thumbnail of the image, which will be disposed of later after, to the $eCart1->DisplayInfo("Thumbnail"); assuming that "Thumbnail" is just a placeholder that you put in there for an imagename. This is what I was talking about when I suggested using a temporary image.

So as I said what exactly does $eCart1->DisplayInfo("Thumbnail"); do?
0
 
jonofatAuthor Commented:
"So as I said what exactly does $eCart1->DisplayInfo("Thumbnail"); do?" It displays what is meant to be a thumbnail at 800x600!!! It just displays the actual image I have on the server and doesn't resize it. If I just use CSS to specify 150x150 then the quality is poor. The tNG_showDynamicThumbnail actually calls an include file with code that resizes the image to 150x150 but the quality is really good. That is why I want to use it but don't know how since I am not using a recordset. That code that calls the recordset is what I used on a gallery page. This is now being used in a shopping cart on the cart page when a user checks their cart. It is just meant to show a thumbnail of the product/s they ordered.
0
 
jonofatAuthor Commented:
So, what I am trying to do is take this

<img src="<?php echo tNG_showDynamicThumbnail("", "images/", "{rs_Products.ProductImage}", 150, 150, true); ?>" border="0" align="middle" class="picborder"/>

Open in new window


and make it something like this which obviously isn't working...

<img src="<?php echo tNG_showDynamicThumbnail("", "$eCart1->DisplayInfo("Thumbnail")", 150, 150, true); ?>" border="0" align="middle" class="picborder"/>

Open in new window

0
 
haloexpertsexchangeCommented:
Sorry I just was trying to figure out if it did something special in the back end or if what it returned was just the filename for you to use.
So out of curiosity why don't you want to use the dynamic thumbnail function which seems to be working exactly as you want it to?
Is there a particular reason that you are not using any sort of record set in your shopping cart?
0
 
jonofatAuthor Commented:
It just displays the name from the database record. So, if the file is pic.jpg it will display that full size image but I just want the thumbnail. I am using an extension to help me with the cart and as far as I know it is using sessions and that is why I can't use the recordset in that code.
0
 
jonofatAuthor Commented:
Okay, I figured this out myself..

<img src="<?php echo tNG_showDynamicThumbnail("", "images/", "{$eCart1->DisplayInfo("Thumbnail")}", 150, 150, true); ?>" border="0" align="middle" class="picborder"/>

Works like a charm.
0
 
jonofatAuthor Commented:
Nobody gave me an answer and I figured it out myself.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 9
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now