X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   editing products_t.tpl to sort by manufacture (https://forum.x-cart.com/showthread.php?t=9916)

jds580s 10-19-2004 01:34 PM

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!

adpboss 10-19-2004 08:38 PM

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

jds580s 10-20-2004 05:06 AM

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.

adpboss 10-20-2004 05:11 AM

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

See if that gets you started.

jds580s 10-20-2004 07:05 AM

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


All times are GMT -8. The time now is 03:45 AM.

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