View Single Post
  #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