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

X-Cart 4.0.0 Showing Manufacturer on Product Page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 07-20-2004, 06:54 PM
 
mizzlewillz mizzlewillz is offline
 

Advanced Member
  
Join Date: Apr 2004
Posts: 45
 

Default 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
Reply With Quote
  #2  
Old 08-13-2004, 11:34 PM
 
twulff twulff is offline
 

Member
  
Join Date: Aug 2004
Posts: 12
 

Default

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
__________________
Thomas
_______________________
X-Cart version 4.0.2 & xaffiliates
PHP 4.1.2
MySQL 3.23.49
Web server Apache
Operation system Debian Linux 3.0
Perl 5.006001
Reply With Quote
  #3  
Old 08-14-2004, 06:05 AM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

Mike,

Please add your version number and server info to your forum signature.
Reply With Quote
  #4  
Old 08-17-2004, 01:45 PM
  thundernugs's Avatar 
thundernugs thundernugs is offline
 

Senior Member
  
Join Date: May 2003
Location: Bend, OR
Posts: 117
 

Default

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

nice work!
__________________
X-Cart Gold 4.0.17 & 4.0.18
Linux Server
Hands-On Hosting
http://www.CoreCases.com - Ipod Cases
http://www.InnovativeOutlet.com - Pet Plants and other cool stuff you need
Reply With Quote
  #5  
Old 10-20-2004, 06:57 PM
 
carbonpixel carbonpixel is offline
 

Newbie
  
Join Date: Jun 2004
Posts: 4
 

Default

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.
Reply With Quote
  #6  
Old 10-21-2004, 05:54 AM
  thundernugs's Avatar 
thundernugs thundernugs is offline
 

Senior Member
  
Join Date: May 2003
Location: Bend, OR
Posts: 117
 

Default

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
__________________
X-Cart Gold 4.0.17 & 4.0.18
Linux Server
Hands-On Hosting
http://www.CoreCases.com - Ipod Cases
http://www.InnovativeOutlet.com - Pet Plants and other cool stuff you need
Reply With Quote
  #7  
Old 10-23-2004, 02:09 AM
 
jmdabb jmdabb is offline
 

Newbie
  
Join Date: Oct 2002
Posts: 5
 

Default 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
__________________
jmdabb
x-Cart
Reply With Quote
  #8  
Old 11-15-2004, 03:08 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

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}
Reply With Quote
  #9  
Old 11-16-2004, 08:10 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default

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.
__________________
xcartmods.co.uk
Reply With Quote
  #10  
Old 11-16-2004, 06:24 PM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default

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
__________________
4.1.9
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 04:45 PM.

   

 
X-Cart forums © 2001-2020