X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Manufacturer Link 4.1.x (https://forum.x-cart.com/showthread.php?t=39804)

csgrant 05-15-2008 09:37 AM

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

Llamatunes 05-15-2008 10:36 AM

Re: Manufacturer Link 4.1.x
 
Shouldn't the </a> come after the {$products[product].manufacturer} ?

csgrant 05-15-2008 11:21 AM

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.

csgrant 05-16-2008 10:14 AM

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?

Llamatunes 05-16-2008 01:23 PM

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.

cflsystems 05-16-2008 03:07 PM

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}

Thedae2k 06-01-2008 05:12 PM

Re: Manufacturer Link 4.1.x
 
Try this post.....http://forum.x-cart.com/showthread.php?t=25790&highlight=manufacturer+name


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

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.