BigCommerce - Hosted Ecommerce Software by Interspire

Interspire Forum

 
Go Back   Interspire Forum > Interspire Shopping Cart Community Forum > Customization and Integration > Layout and Store Design Customization

Reply
 
Thread Tools Display Modes
  #1  
Old 07-19-2011, 08:56 PM
srshaw3 + srshaw3 is offline
Interspire Customer
 
Join Date: Feb 2011
Posts: 8
Default related products display

In the highly customized interspire shopping cart I inherited:

%%GLOBAL_ProductLink%% is used to produce the proper link to the related product.
%%GLOBAL_ProductThumb%% can be used to produce the proper image, but not sized as I wanted.

I want to use the URL global for %%GLOBAL_ProductThumb%% in the SideRelatedProducts.html template so I can resize the image.

I thought it might be %%GLOBAL_ProductThumbURL%% but it is empty.

What is the global the provides the URL of %%GLOBAL_ProductThumb%% ?

thank you
Reply With Quote
  #2  
Old 07-20-2011, 06:10 PM
christoph2k + christoph2k is offline
Interspire Customer
 
Join Date: Jul 2011
Posts: 31
Default

So are you saying that %%GLOBAL_ProductThumb%% is empty in SideRelatedProducts.html?
Reply With Quote
  #3  
Old 07-20-2011, 07:26 PM
srshaw3 + srshaw3 is offline
Interspire Customer
 
Join Date: Feb 2011
Posts: 8
Default

What I said was:
"%%GLOBAL_ProductThumbURL%% but it is empty"
Reply With Quote
  #4  
Old 07-20-2011, 07:34 PM
christoph2k + christoph2k is offline
Interspire Customer
 
Join Date: Jul 2011
Posts: 31
Default

Yeah, though I'm asking whether %%GLOBAL_ProductThumb%% is also empty.
Reply With Quote
  #5  
Old 07-20-2011, 07:40 PM
srshaw3 + srshaw3 is offline
Interspire Customer
 
Join Date: Feb 2011
Posts: 8
Default

As I said:
"%%GLOBAL_ProductThumb%% can be used to produce the proper image, but not sized as I wanted."
Reply With Quote
  #6  
Old 07-20-2011, 07:50 PM
christoph2k + christoph2k is offline
Interspire Customer
 
Join Date: Jul 2011
Posts: 31
Default

You can change the size of the thumbnail by going to Settings -> Store Settings -> Images.
Reply With Quote
  #7  
Old 07-20-2011, 07:52 PM
srshaw3 + srshaw3 is offline
Interspire Customer
 
Join Date: Feb 2011
Posts: 8
Default

I want the thumbnail that size for the category display, so that will not work.
Thank you for the thought.
Reply With Quote
  #8  
Old 07-20-2011, 07:55 PM
christoph2k + christoph2k is offline
Interspire Customer
 
Join Date: Jul 2011
Posts: 31
Default

Unfortunately, the way Interspire deals with sizes/images is long winded and painful to pick apart. Would having the only URL to the image, without the <img /> tag be useful? That way, you could atleast force the size of the image with CSS or HTML?
Reply With Quote
  #9  
Old 07-20-2011, 07:59 PM
srshaw3 + srshaw3 is offline
Interspire Customer
 
Join Date: Feb 2011
Posts: 8
Default

Yes, that is why I hoped there was a %%GLOBAL_ProductThumbURL%% so I could code the template to set the size as I wanted.
Reply With Quote
  #10  
Old 07-20-2011, 08:16 PM
christoph2k + christoph2k is offline
Interspire Customer
 
Join Date: Jul 2011
Posts: 31
Default

Gotcha.

Open lib/templates/products_panel.php and find the code below (should be around line 78):

$GLOBALS['ProductThumb'] = ImageThumb($row, ProdLink($row['prodname']));

Above that line paste the following code:

$image = new ISC_PRODUCT_IMAGE;
$image->populateFromDatabaseRow($row);
try {
$thumb = $image->getResizedUrl(ISC_PRODUCT_IMAGE_SIZE_THUMBNAIL, true);
} catch (Exception $exception) {
$thumb = '';
}
unset($image);
$GLOBALS['ProductThumbURL'] = $thumb;

Now you should have the following var, with the ProductThumbURL:

%%GLOBAL_ProductThumbURL%%

Chris
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump