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

editing products_t.tpl to sort by manufacture

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-19-2004, 01:34 PM
  jds580s's Avatar 
jds580s jds580s is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 38
 

Default editing products_t.tpl to sort by manufacture

I am working to get products_t.tpl to display all the products by a manufacture in a group. For starters I can't seem to find the string that contains a products manufacture name. I've tried what I thought was obvious:

{$products[product].manufacture}
and
{$products[manufacture].descr} (for the description)

with no luck.

Is there a file, help, faq that has the common string names for this kind of info?

Thanks!
__________________
animator for hire
onthez.com
------------------------
x-cart v4.0.5 Linux
_________________
Reply With Quote
  #2  
Old 10-19-2004, 08:38 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

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

Default

http://forum.x-cart.com/viewtopic.php?t=6489
Reply With Quote
  #3  
Old 10-20-2004, 05:06 AM
  jds580s's Avatar 
jds580s jds580s is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 38
 

Default

added x-cart version (v4.0.5) to sig.
As far as searching goes, that was the first thing I did. I would hate to pester people when the answer is at my fingertips.

Thanks for the link, and for any help you may be able to offer.
__________________
animator for hire
onthez.com
------------------------
x-cart v4.0.5 Linux
_________________
Reply With Quote
  #4  
Old 10-20-2004, 05:11 AM
  adpboss's Avatar 
adpboss adpboss is offline
 

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

Default

http://forum.x-cart.com/viewtopic.php?t=11767

See if that gets you started.
Reply With Quote
  #5  
Old 10-20-2004, 07:05 AM
  jds580s's Avatar 
jds580s jds580s is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 38
 

Default

Thanks for that link!
I feel like I'm 60% of the way there, but I'm getting an SQL error

Instead of modifying product.php like in the exaple in the link above, I'm working in products.php (because I would like this to show on the products page, not so much in the individual product pages)

I was half expecting those two .php files to look similar since much of the data the output seems to be the same, but I was wrong.

Code:
############################################################################################################# # Get the real manufacturer - This is a mod from the standard code # $thisManufactorer = $search_data["products"]["manufacturerid"]; $manufacturer = func_query("SELECT * FROM $sql_tbl[manufacturers] WHERE manufacturerid = $thisManufactorer"); $smarty->assign("manufacturer", $manufacturer[0]["manufacturer"]); # # End Get the real manufacturer - This is a mod from the standard code #############################################################################################################
This is my slightly modified code that is giving me this error. The same error I had with the original code when used in products.php
Code:
INVALID SQL: 1064 : You have an error in your SQL syntax near '' at line 1 SQL QUERY FAILURE: SELECT * FROM xcart_manufacturers WHERE manufacturerid =

I appreciate any help offered!

Justin
__________________
animator for hire
onthez.com
------------------------
x-cart v4.0.5 Linux
_________________
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 01:36 PM.

   

 
X-Cart forums © 2001-2020