Manufacturer Name in products_list.tpl
Hello, I'm trying to display the manufacturer name in products_list.tpl
I am able to grab the manufacturer id using: PHP Code:
Using this: PHP Code:
**Note, this is for a 'Category' page or 'Search Result' page. I have access to the manufacturer name when I click on one of the 'Manufacturer' links in the side panel using: PHP Code:
|
Re: Manufacturer Name in products_list.tpl
use
product.php add $thisManufactorer = $product_info["manufacturerid"]; $manufacturer = func_query("SELECT * FROM $sql_tbl[manufacturers] WHERE manufacturerid = $thisManufactorer"); $smarty->assign("manufacturer", $manufacturer[0]["manufacturer"]); in template use {$product.manufacturer} in 4.3 i am not sure if you need todo the php anymore but this works for me on tacksales |
Re: Manufacturer Name in products_list.tpl
hmmm, tried that with no luck.
I realized that I have a table prefix of xcart_ on all of my tables, so I made the change in the 2nd line of your code, but still haven't had any luck. PHP Code:
Also, I wasn't getting any sort of feedback that this was even working until I put this code in 'products.php' not 'product.php'. When I put it in products.php I was getting this error; Code:
INVALID SQL: 1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE manufacturerid = ''' at line 1 I tried wrapping $thisManufactorer in quotes but that didn't help either. |
Re: Manufacturer Name in products_list.tpl
okay use the following
BEFORE in Product.php PHP Code:
ADD PHP Code:
and the following in you template PHP Code:
to show logo and link to manu in product page add the following to the template (extra option) PHP Code:
|
Re: Manufacturer Name in products_list.tpl
Still not working, I tried changing everything up that I could and still nothing.
{$manufacuter.manufacturer} was working on the manufacturer page, but it was always working on that, so I don't think it was any different. I tried assigning to a different variable name like {$manufacuter.man1} and wasn't getting any data returned. |
Re: Manufacturer Name in products_list.tpl
i have
{$manufacturer.manufacturer}{$product.manufacturer } in my products_t this allows me to show the name in manufacturer and products |
Re: Manufacturer Name in products_list.tpl
I found a solution for X-Cart 4.4.4 and posted it here: http://forum.x-cart.com/showthread.php?t=61592
|
All times are GMT -8. The time now is 02:18 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.