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.0.0 Showing Manufacturer on Product Page (https://forum.x-cart.com/showthread.php?t=8564)

mizzlewillz 07-20-2004 06:54 PM

X-Cart 4.0.0 Showing Manufacturer on Product Page
 
Hello,

I was trying to figure this out, but couldn't seem to get the SQL right. ( I believe that is where my problem is).

What would I have to do to display the product's manufacturer in the product's detailed page. I want to use the manufacturer's table in the database, but can't seem to get it to work.

Any ideas?

Thanks in advance for any comments / suggestions!!

-mike

twulff 08-13-2004 11:34 PM

This is the way I have done it:
Quote:

# changes to product.php
add this code somewhere before the smarty assigns will happen like line #112
#
# Get the real manufacturer
#
$thisManufactorer = $product_info["manufacturerid"];
$manufacturer = func_query("SELECT * FROM $sql_tbl[manufacturers] WHERE manufacturerid = $thisManufactorer");
$smarty->assign("manufacturer", $manufacturer[0]["manufacturer"]);

#changes to customer/main/product.tpl
# where to place the code is up to you :)
<tr><TD align="left" valign="top">
Producer:

</td>
<TD align="left" valign="top">
{$manufacturer}
<font size=1 face=Arial>(click to get all productions of this producer)</font>

</td>
</tr>

I hope this will help you a little bit

adpboss 08-14-2004 06:05 AM

Mike,

Please add your version number and server info to your forum signature.

thundernugs 08-17-2004 01:45 PM

thomas,
very cool mod indeed. works perfect in 4.0.2.

nice work! =D>

carbonpixel 10-20-2004 06:57 PM

does anyone have a link that shows this working...?

My problem is that I want to setup categories and sub categories (example --- bath & body [category], soaps [subcategory].

Then I want to add a product to this (or possibly more categories).

Now the key thing is that when I create a new product I want to enter the manufacture (or select from a list of manufactures directly from the product page).

I now want to give the customer the ability of viewing all the manufactures and when he selects one it shoud lists all the products categorized in categorises/subcategories.

A customer should also be able to search for a manufactures and have all products listed.

thundernugs 10-21-2004 05:54 AM

what version are you running?

manufacturers was incorporated into version 4

you can see the manufacturer listed on the product page on my site here:

http://www.netmedicalsupply.com/store/catalog/BioStim-M7-Digital-TENS-Unit-p-22161.html

live site, so no test orders please

notice the manufacturer listing on the lower left, and the ability to search for mfr in the advanced search page.

ver 4 also allow unlimited categories/subcategories

hth,
mike

jmdabb 10-23-2004 02:09 AM

Manufacturer on Invoice
 
Great, I got manufacturer on product page, now how do I get it to show on the Invoice.

I'm using xcart for a bookstore and client wants author (manufacturer) to show under each product title.

http://www.books-newzealand.co.nz (live site, no test orders please)

version 4.04

adpboss 11-15-2004 03:08 PM

Modified TPL code for my purposes.

Advantages, only show Manufacturer if the manufacturer exists for that product. I also turned off the absolute link to the manufacturers.php and went with the relative link.

Code:

{if $manufacturer ne ""}
<tr><TD align="left" valign="top">
Manufacturer:
 
</td>
<TD align="left" valign="top">
{$manufacturer}
<font size=1 face=Arial>(Click to get more information about this manufacturer)</font>
 
</td>
</tr>
{/if}


PhilJ 11-16-2004 08:10 AM

Based on this, does anyone know how to get the manufacturer's description to display on product.tpl ?

I tried

Code:

{$manufacturer.descr|escape}

but that doesn't work - it just shows the first character of the manufacturer's name and nothing of the description. :oops:

mffowler 11-16-2004 06:24 PM

For manufacturer name, not description of:

All I did was put the following code in the customer/main/product.tpl:
Code:

<TR><TD align="left" valign="top">{$lng.lbl_manufacturer}:</TD>
<TD align="left" valign="top">{$product.manufacturer}</TD>
</TR>

... and now my product's manufacturer is in the product details page.

- Mike

gerrick@ncs-online.com 04-12-2005 03:39 PM

I did get this to work in the product.tpl but I could not get it to work in products.tpl.

Is there a difference or a change needed?

Thanks in advance.

Hmm, the version listed below is wrong, I'm 0n 4.0.13

akiragraphics 04-19-2005 06:49 PM

pls post example link
 
none of the live site links above show the functionality of this mod.

can someone pls post?

RQJay 04-27-2005 02:58 PM

Yes I would like to know if the manufacturers logo can be placed in the product.tpl as well as the products.tpl file?

mffowler 04-27-2005 04:18 PM

Isn't that in Modules/Manufacturers/customer_manufacturer_products.tpl?

Something like:
- mike

august 05-11-2005 10:55 PM

Quote:

none of the live site links above show the functionality of this mod.

can someone pls post?


http://www.vortex-online.com/store/product.php?productid=42&cat=0&bestseller

RQJay 05-14-2005 09:49 PM

Wow that site looks good, but I am still having problems getting the manufacturers logo to show for me.
I am just getting the standard Xcart image holder.
Could someone please post the correct code to display the manufacturers logo at the top of the products template?
Thnaks

Online Michael 05-16-2005 08:55 AM

Ok, this is how I did it and it works like a charm in 4.0.13. The following code first checks to see if a manufacturers image is available. If so, the image is shown as a link. I also created a language file called {$lng.lbl_click_more_manuf_products} which basically say "Click above image to see all toys under this manufacturer".

In the product.tpl add this code wherever you want the image to appear. If you cut and paste this code as is and insert it just after the "</TR></TABLE></TD>" code at around row 142, the image will appear to the right hand side in a column of it's own.

Code:

{if $manufacturer ne ""}
<td width="100" align="center" valign="top">[img]{$xcart_web_dir}/mlogo.php?manufacturerid={$product.manufacturerid}[/img]

{$lng.lbl_click_more_manuf_products}
</TD>
{/if}


In product.php at the following code just after:

$main = "product";
$smarty->assign("main",$main);

(you should find it near row 50)

Code:

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


This is a great mod so I hope it works for you as well as it works for me.

chastie 07-14-2006 01:14 PM

Does anyone know how to get the manufacturer's description to display on product.tpl ? {$manufacturer.descr} isn't working. Thanks in advance for any replies! -christa

chastie 07-14-2006 01:26 PM

I figured it out...

In product.php, under this code provided above:
($smarty->assign("manufacturer", $manufacturer[0]["manufacturer"]);)

Add:
$smarty->assign("thedescr", $manufacturer[0]["descr"]);


Then in product.tpl, add:
{$thedescr}

smek 10-23-2008 11:36 AM

Re: X-Cart 4.0.0 Showing Manufacturer on Product Page
 
This worked for me as well. I have 4.1.10



Quote:

Originally Posted by mffowler
For manufacturer name, not description of:

All I did was put the following code in the customer/main/product.tpl:
Code:

<TR><TD align="left" valign="top">{$lng.lbl_manufacturer}:</TD>
<TD align="left" valign="top">{$product.manufacturer}</TD>
</TR>

... and now my product's manufacturer is in the product details page.

- Mike


davep 11-03-2008 11:18 AM

Re: X-Cart 4.0.0 Showing Manufacturer on Product Page
 
do you know how to show the manufacturer name on the search results page?

annivas 11-08-2008 06:06 AM

Re: X-Cart 4.0.0 Showing Manufacturer on Product Page
 
this is weird... I added that code snippet to the product.tpl file to see how it works once and then I deleted it... But it still shows the "Producer:... blah blah blah" ever since. I can't get rid of it!

Is it stored somewhere?

annivas 11-08-2008 06:42 AM

Re: X-Cart 4.0.0 Showing Manufacturer on Product Page
 
Quote:

Originally Posted by annivas
this is weird... I added that code snippet to the product.tpl file to see how it works once and then I deleted it... But it still shows the "Producer:... blah blah blah" ever since. I can't get rid of it!

Is it stored somewhere?

Yeah, OK... that's why the call us nubies, right? I just figured out the problem. Who would have thought that the templates are cached? :P

Learner 08-21-2009 10:08 PM

Re: X-Cart 4.0.0 Showing Manufacturer on Product Page
 
Quote:

Originally Posted by adpboss
Modified TPL code for my purposes.

Advantages, only show Manufacturer if the manufacturer exists for that product. I also turned off the absolute link to the manufacturers.php and went with the relative link.

Code:

{if $manufacturer ne ""}
<tr><TD align="left" valign="top">
Manufacturer:
 
</td>
<TD align="left" valign="top">
{$manufacturer}
<font size=1 face=Arial>(Click to get more information about this manufacturer)</font>
 
</td>
</tr>
{/if}



Hi adpboss I want to display the manufacturer's name/logo which are currently on that category.I have approximately 50 manufactures in my store.Each manufacturer links with different different category.Suppose X category links with a,b,c,d manufacturer's product among 50 manufacturers.I want to display only a,b,c,d manufacturer's name/logo when I click on X category.Is it possible? Can you help me?
Thanks to all.

Learner 06-05-2010 11:33 PM

Re: X-Cart 4.0.0 Showing Manufacturer on Product Page
 
adpboss any soltion to solve this issue?

Thanks.


All times are GMT -8. The time now is 06:00 AM.

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