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

Manufacturers in SUB-categories.....

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 05-23-2005, 12:00 PM
 
IndieDepot IndieDepot is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 30
 

Default Manufacturers in SUB-categories.....

Just trying to get each products Manufacturer listed in the Sub-Categories rather then listing the SKU#

Anybody know the code to pop in the 'products.tpl' or 'products_t.tpl' file to make that happen?

Much obliged'...

- Shannon
__________________
- www.TheShotList.com
X-Cart version 4.0.13
PHP 4.3.10
MySQL 4.0.23
Web server Apache
Operation system Linux
Perl 5.008004
XML parser (expat) 1.95.6
Reply With Quote
  #2  
Old 06-10-2005, 12:27 PM
 
eleven eleven is offline
 

Senior Member
  
Join Date: Nov 2002
Location: Charlotte, NC, USA
Posts: 118
 

Default This code should work

It took a while but I think i figured it out. This code works for me (X-Cart 4.0.13)

in include/search.php add this code after
$products[$k]['fulldescr'] = str_replace("\n","
",$products[$k]['fulldescr']);

Code:
# # Add Manufacturer information # if (!empty($active_modules["Manufacturers"])) { $idholder = $products[$k]['manufacturerid']; $products[$k]['manufacturer'] = func_query_first_cell("SELECT manufacturer FROM $sql_tbl[manufacturers] WHERE manufacturerid = '$idholder'"); }


In products_t.tpl:
Code:
__________________
|| E L E V E N ||
Reply With Quote
  #3  
Old 06-10-2005, 12:34 PM
 
IndieDepot IndieDepot is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 30
 

Default

works like a charm!

this should be moved to completed free mods.

- Shannon
__________________
- www.TheShotList.com
X-Cart version 4.0.13
PHP 4.3.10
MySQL 4.0.23
Web server Apache
Operation system Linux
Perl 5.008004
XML parser (expat) 1.95.6
Reply With Quote
  #4  
Old 06-10-2005, 12:45 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Done!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 06-10-2005, 05:26 PM
 
Ryano Ryano is offline
 

Senior Member
  
Join Date: Jun 2004
Posts: 192
 

Default

What exactly does this do? Very interested. Couldn't figure out what the change does though. Thanks.
__________________
xcart v3.5.8 (Unix)
and
xcart v4.0.13
Reply With Quote
  #6  
Old 06-10-2005, 05:40 PM
 
eleven eleven is offline
 

Senior Member
  
Join Date: Nov 2002
Location: Charlotte, NC, USA
Posts: 118
 

Default what does it do?

On the thumbnail pages, it displays a product's manufacturer and links to the manufacturer's page. Previously (as far as I know), you could only do that on the product detail pages.
__________________
|| E L E V E N ||
Reply With Quote
  #7  
Old 06-10-2005, 06:25 PM
 
Ryano Ryano is offline
 

Senior Member
  
Join Date: Jun 2004
Posts: 192
 

Default

Oh Ok I see how it works now. Cool mod. Thanks for sharing!
__________________
xcart v3.5.8 (Unix)
and
xcart v4.0.13
Reply With Quote
  #8  
Old 06-15-2005, 09:41 PM
 
tiju tiju is offline
 

Newbie
  
Join Date: Jun 2005
Location: PERU
Posts: 3
 

Default Re: This code should work

The code is not working for me, i have xcart pro- 4.0.13.
the correct templete for modifications is...products_t.tpl or products.tpl

thanks



Quote:
Originally Posted by eleven
It took a while but I think i figured it out. This code works for me (X-Cart 4.0.13)

in include/search.php add this code after
$products[$k]['fulldescr'] = str_replace("\n","
",$products[$k]['fulldescr']);

Code:
# # Add Manufacturer information # if (!empty($active_modules["Manufacturers"])) { $idholder = $products[$k]['manufacturerid']; $products[$k]['manufacturer'] = func_query_first_cell("SELECT manufacturer FROM $sql_tbl[manufacturers] WHERE manufacturerid = '$idholder'"); }


In products_t.tpl:
Code:
__________________
xcart Pro - Version 4.0.13
Reply With Quote
  #9  
Old 06-16-2005, 03:53 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

The mod was written for Gold, it may take some tweaking for Pro...
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #10  
Old 06-16-2005, 09:19 AM
 
magnifold magnifold is offline
 

Newbie
  
Join Date: Apr 2005
Posts: 3
 

Default location?

i can't even find products_t.tpl

I put the code for products.tpl and when i preview it gives error:

Fatal error: Smarty error: [in ./main/products.tpl line 10]: syntax error: invalid attribute name: '=' (Smarty_Compiler.class.php, line 1512) in /www/e/eyeballstore/htdocs/store/Smarty-2.6.3/Smarty.class.php on line 1082

using X-cart gold 4.0.13
__________________
Jubin Kim
Eyeball Records
X-Cart Gold 4.0.13
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


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 06:38 PM.

   

 
X-Cart forums © 2001-2020