View Single Post
  #40  
Old 07-02-2013, 05:06 AM
 
DavyMac DavyMac is offline
 

eXpert
  
Join Date: Apr 2007
Location: Poole, UK
Posts: 333
 

Default Re: NEW xcart template - xtreme Gear

If you want the manufacturer's logo on the product page to be loaded from the file system instead of from the database then this code does the trick.

FILE: product.php

Find:
PHP Code:
$smarty->assign('meta_page_id',   $product_info['productid']); 

Then immediately after insert:
PHP Code:
/* To extract the URL of the manufacturers logo image */
$brand_logo_path func_query_first_cell("SELECT image_path FROM $sql_tbl[images_M] INNER JOIN $sql_tbl[manufacturers] ON $sql_tbl[manufacturers].manufacturerid='$product_info[manufacturerid]' AND $sql_tbl[images_M].id='$product_info[manufacturerid]'");
/* Assign the location of the image for use within the template */
$smarty->assign("logo_path"$brand_logo_path); 

FILE: skin/xtreme_gear/customer/main/product_details2.tpl

Replace:
PHP Code:
<img src="image.php?type=M&amp;id={$product.manufacturerid}alt="{$product.manufacturer}/> 

With:
PHP Code:
<img src="{$logo_path}alt="{$product.manufacturer}/> 

I had to do this so that I could load the manufacturers logo from our CDN.
__________________
X-Cart GOLD Plus v4.5.4
CDSEO Pro
ewdhosting Dedicated Server
Dedicated SSL
Stone Edge OM
Reply With Quote