X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   X-Cart 4.1.3 Showing Manufacturer on Product Page (https://forum.x-cart.com/showthread.php?t=26034)

7thdesire 10-23-2006 07:42 AM

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

gastu 10-26-2006 05:27 PM

Re: X-Cart 4.1.3 Showing Manufacturer on Product Page
 
how can show manufacturer in featured products

micromedia 03-13-2007 10:11 PM

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}

micromedia 03-18-2007 06:00 AM

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?

7thdesire 03-18-2007 06:07 AM

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}

micromedia 03-18-2007 06:37 AM

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.......}

micromedia 03-18-2007 07:16 AM

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?







.

mike_turbo 12-16-2007 02:49 AM

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

TelaFirma 01-27-2008 09:47 AM

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

Thedae2k 06-02-2008 07:18 PM

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?


All times are GMT -8. The time now is 08:37 PM.

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