Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Manufacturer Link 4.1.x

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-15-2008, 09:37 AM
 
csgrant csgrant is offline
 

Newbie
  
Join Date: Aug 2006
Posts: 7
 

Default Manufacturer Link 4.1.x

I've been trying to get the manufacturer's name to show up with the products on products.tpl and products_t.tpl and have not had much luck.

My Code:

Code:
<div id="featured_manufacturer">Manufacturer:<a href="manufacturers.php?manufacturerid={$products[product].manufacturerid}" alt="{$manufacturer}">{$products[product].manufacturer}</a></div>


The link works, but the text does not show. To find out the link was working I just inserted some text. I've searched for solutions but none apply to the current branch of x-cart. I do not want the image for the manufacturer, just the name.

Thanks
__________________
X-Cart 4.0.12
Reply With Quote
  #2  
Old 05-15-2008, 10:36 AM
 
Llamatunes Llamatunes is offline
 

Member
  
Join Date: Jun 2006
Posts: 23
 

Default Re: Manufacturer Link 4.1.x

Shouldn't the </a> come after the {$products[product].manufacturer} ?
__________________
X-Cart 4.1.9

www.bottled-ale.co.uk
Reply With Quote
  #3  
Old 05-15-2008, 11:21 AM
 
csgrant csgrant is offline
 

Newbie
  
Join Date: Aug 2006
Posts: 7
 

Default Re: Manufacturer Link 4.1.x

it should and it does, I made a typo. Doesnt have any bearing on the problem however, even with it outside the </a>, it should still display the name, just without a link.
__________________
X-Cart 4.0.12
Reply With Quote
  #4  
Old 05-16-2008, 10:14 AM
 
csgrant csgrant is offline
 

Newbie
  
Join Date: Aug 2006
Posts: 7
 

Default Re: Manufacturer Link 4.1.x

So I'm just going to assume nobody who shows the manufacturer name on their current site has upgraded to the 4.1.x branch and I am the only one with this problem?
__________________
X-Cart 4.0.12
Reply With Quote
  #5  
Old 05-16-2008, 01:23 PM
 
Llamatunes Llamatunes is offline
 

Member
  
Join Date: Jun 2006
Posts: 23
 

Default Re: Manufacturer Link 4.1.x

I have done this, I was just trying to remember how. I think this may be it...

In products.php enter the code

if($products)
{
foreach($products as $key=> $product)
$products[$key]["manufacturer"]= func_query_first_cell("select manufacturer from $sql_tbl[manufacturers] where manufacturerid=".$product["manufacturerid"]);
}

just before assigning the $smarty variables.
__________________
X-Cart 4.1.9

www.bottled-ale.co.uk
Reply With Quote
  #6  
Old 05-16-2008, 03:07 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Manufacturer Link 4.1.x

I use this in product.tpl don't know if it will help you. It shows manufacturer logo and "See All..." but not the manufacturer name

{if $product.manufacturer ne ""}
<div style="margin-bottom: 10px;">
<a href="manufacturers.php?manufacturerid={$product.m anufacturerid}"><img src="image.php?id={$product.manufacturerid}&amp;ty pe=M" alt="{$manufacturer}" style="vertical-align:middle;" border="0" /></a>&nbsp;<a href="manufacturers.php?manufacturerid={$product.m anufacturerid}">See All Products</a>
</div>
{/if}
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #7  
Old 06-01-2008, 05:12 PM
 
Thedae2k Thedae2k is offline
 

eXpert
  
Join Date: Jan 2004
Posts: 288
 

Default Re: Manufacturer Link 4.1.x

Try this post.....http://forum.x-cart.com/showthread.php?t=25790&highlight=manufacturer+name
__________________
X-Cart Pro 4.1.9
PHP5.2.5
MySQL 5.0.54
IIS/Apache/NGINX Webservers
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:36 AM.

   

 
X-Cart forums © 2001-2020