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

X-Cart 4.1.3 Showing Manufacturer on Product Page
 
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features
 
Thread Tools Search this Thread
  #1  
Old 10-23-2006, 07:42 AM
 
7thdesire 7thdesire is offline
 

Senior Member
  
Join Date: Sep 2006
Posts: 115
 

Default X-Cart 4.1.3 Showing Manufacturer on Product Page

after alot of messing around i found out how todo it


in product.php add

$thisManufactorer = $product_info["manufacturerid"];
$manufacturer = func_query("SELECT * FROM $sql_tbl[manufacturers] WHERE manufacturerid = $thisManufactorer");
$smarty->assign("manufacturer", $manufacturer[0]["manufacturer"]);



and in product.tpl add

{if $manufacturer ne ""}
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td height="70"><div align="center"><A href="manufacturers.php?manufacturerid={$product.m anufacturerid}"> <img src="image.php?id={$product.manufacturerid}&type=M " alt="{$manufacturer}" /></a></div></td>
</tr>
<tr>
<td align="center" valign="middle"></td>
</tr>
</table>
</TD>{/if}




i hope that helps a few of you
__________________
X-cart - 4.3.2 loads of mods and custom code
Reply With Quote
  #2  
Old 10-26-2006, 05:27 PM
 
gastu gastu is offline
 

Senior Member
  
Join Date: Oct 2005
Location: Chile
Posts: 105
 

Default Re: X-Cart 4.1.3 Showing Manufacturer on Product Page

how can show manufacturer in featured products
__________________
Gonzalo Astudillo Pizarro | https://about.me/gonzaloastudillo
Reply With Quote
  #3  
Old 03-13-2007, 10:11 PM
 
micromedia micromedia is offline
 

Member
  
Join Date: Feb 2005
Posts: 27
 

Default Re: X-Cart 4.1.3 Showing Manufacturer on Product Page

I add this on product.tpl. (x-cart 4.1.6)
it is working. I think you don't need to edit product.php

code:

{if $product.manufacturer ne ""}
<table width="100%" cellpadding="0" cellspacing="0">
<tr><td align="left"><a href="manufacturers.php?manufacturerid={$product.m anufacturerid}"><img src="image.php?id={$product.manufacturerid}&type=M " alt="{$manufacturer}" border="0" /></a></td></tr>
</table>
{/if}
__________________
X Cart Gold Ver. 4.1.6
Reply With Quote
  #4  
Old 03-18-2007, 06:00 AM
 
micromedia micromedia is offline
 

Member
  
Join Date: Feb 2005
Posts: 27
 

Default Re: X-Cart 4.1.3 Showing Manufacturer on Product Page

I displayed manufacturer name, image and link on product page but
How Do I display manufacturer description on product page?

Also i want to show 5 random products from manufacturer on product detail page. is it possible?

Any idea?
__________________
X Cart Gold Ver. 4.1.6
Reply With Quote
  #5  
Old 03-18-2007, 06:07 AM
 
7thdesire 7thdesire is offline
 

Senior Member
  
Join Date: Sep 2006
Posts: 115
 

Default Re: X-Cart 4.1.3 Showing Manufacturer on Product Page

{if $manufacturer ne ""}
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td height="70"><div align="center"><A href="manufacturers.php?manufacturerid={$product.m anufacturerid}"> <img src="image.php?id={$product.manufacturerid}&type=M " alt="{$manufacturer}" /></a></div></td>
</tr>
<tr>
<td>{$manufacturer.descr}</td>
</tr>
<tr>
<td align="center" valign="middle"></td>
</tr>
</table>
</TD>{/if}
__________________
X-cart - 4.3.2 loads of mods and custom code
Reply With Quote
  #6  
Old 03-18-2007, 06:37 AM
 
micromedia micromedia is offline
 

Member
  
Join Date: Feb 2005
Posts: 27
 

Default Re: X-Cart 4.1.3 Showing Manufacturer on Product Page

Quote:
Originally Posted by 7thdesire
{if $manufacturer ne ""}
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td height="70"><div align="center"><A href="manufacturers.php?manufacturerid={$product.m anufacturerid}"> <img src="image.php?id={$product.manufacturerid}&type=M " alt="{$manufacturer}" /></a></div></td>
</tr>
<tr>
<td>{$manufacturer.descr}</td>
</tr>
<tr>
<td align="center" valign="middle"></td>
</tr>
</table>
</TD>{/if}


It didn't work. Imy x-cart version is 4.1.6.

I think It might be begin like this : {$product.manufacturer.......}
__________________
X Cart Gold Ver. 4.1.6
Reply With Quote
  #7  
Old 03-18-2007, 07:16 AM
 
micromedia micromedia is offline
 

Member
  
Join Date: Feb 2005
Posts: 27
 

Default Re: X-Cart 4.1.3 Showing Manufacturer on Product Page

ok I did.

edit include/func/func.product.php

line 666

find
Code:
if (!empty($active_modules["Manufacturers"])) { $join .= " LEFT JOIN $sql_tbl[manufacturers] ON $sql_tbl[manufacturers].manufacturerid = $sql_tbl[products].manufacturerid"; $add_fields .= ", $sql_tbl[manufacturers].manufacturer"; }

replace:
Code:
if (!empty($active_modules["Manufacturers"])) { $join .= " LEFT JOIN $sql_tbl[manufacturers] ON $sql_tbl[manufacturers].manufacturerid = $sql_tbl[products].manufacturerid"; $add_fields .= ", $sql_tbl[manufacturers].manufacturer"; $add_fields .= ", $sql_tbl[manufacturers].descr as manudescr"; }


Than ADD

customer/main/product.tpl

Code:
{if $product.manufacturer ne ""} <table width="100%" cellpadding="0" cellspacing="0"> <tr><td align="left" style="padding:5px;" valign="top" width="10"><a href="manufacturers.php?manufacturerid={$product.manufacturerid}"><img src="image.php?id={$product.manufacturerid}&type=M " alt="{$manufacturer}" border="0" /></a></td> <td align="left" style="padding:5px;" valign="top"><b>{$product.manufacturer}</b><br />{$product.manudescr}</td></tr> </table> {/if}


if you want to limit for manufacture description
change
{$product.manudescr}
to
{$product.manudescr|truncate:250:"...":true}

that's it.
it is working on 4.1.6

I try to show random 5 products which are same manufacture. Any Idea?







.
__________________
X Cart Gold Ver. 4.1.6
Reply With Quote
  #8  
Old 12-16-2007, 02:49 AM
 
mike_turbo mike_turbo is offline
 

Advanced Member
  
Join Date: Oct 2007
Posts: 38
 

Default Re: X-Cart 4.1.3 Showing Manufacturer on Product Page

works fine in 4.1.9

Only thing in your code you have

Code:
{if $manufacturer ne ""} <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td height="70"><div align="center"><A href="manufacturers.php?manufacturerid={$product.m anufacturerid}"> <img src="image.php?id={$product.manufacturerid}&type=M " alt="{$manufacturer}" /></a></div></td> </tr> <tr> <td align="center" valign="middle"></td> </tr> </table> </TD>{/if}


It should be
Code:
{if $manufacturer ne ""} <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td height="70"><div align="center"><A href="manufacturers.php?manufacturerid={$product.manufacturerid}"> <img src="image.php?id={$product.manufacturerid}&type=M " alt="{$manufacturer}" /></a></div></td> </tr> <tr> <td align="center" valign="middle"></td> </tr> </table> </TD>{/if}

Otherwise you can not click the logo to the actual manufactuor page
(you had a space here href="manufacturers.php?manufacturerid={$product.m anufacturerid}"> <img)

Thanks,

Mike
__________________
Version 4.1.9
Reply With Quote
  #9  
Old 01-27-2008, 09:47 AM
  TelaFirma's Avatar 
TelaFirma TelaFirma is offline
 

X-Adept
  
Join Date: Nov 2002
Location: North Carolina USA
Posts: 930
 

Default Re: X-Cart 4.1.3 Showing Manufacturer on Product Page

Quote:
Originally Posted by micromedia

I try to show random 5 products which are same manufacture. Any Idea?

.

http://forum.x-cart.com/showthread.php?t=35108
Reply With Quote
  #10  
Old 06-02-2008, 07:18 PM
 
Thedae2k Thedae2k is offline
 

eXpert
  
Join Date: Jan 2004
Posts: 288
 

Default Re: X-Cart 4.1.3 Showing Manufacturer on Product Page

I can't get this to work on 4.1.9. It shows the missing image with the manufacturer name and description but no full image. It links correct but does not display the image. I do use the Dynamic Image Generator...does that do anything?
__________________
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 > Changing and adding new features


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:31 PM.

   

 
X-Cart forums © 2001-2018