![]() |
Displaying Manufacturer Details
I've been racking my brain on how to display more than just the manufacturer's name in the product details page. I would like to display URL of the manufacturer for starters. It would also be nice to know how to display the other fields as well onto the product details page.
Please help....and thank you in advance. |
Re: Displaying Manufacturer Details
In product.php I added the following code.
Code:
$manufacturer = func_query("SELECT * FROM xcart_manufacturers WHERE manufacturerid = 1"); I would think since i hard coded the query i would pull at least one record and assign the m_url variable with something I know exists. Then in product_details.php i added Code:
{ m_url }. However nothing shows up. This comes back to my original question how can i show the proper manufacturer url for the corresponding product. I've been searching and reading up and nothing seems to be working. What am i doing wrong? thanks, al |
Re: Displaying Manufacturer Details
{$m_url }. |
Re: Displaying Manufacturer Details
I'm sorry I have that in my code...
{ $m_url } |
Re: Displaying Manufacturer Details
Have you looked at $manufacturers array how it is structured?
|
Re: Displaying Manufacturer Details
no i have not and not sure even how to display that to figure that out.
|
Re: Displaying Manufacturer Details
Can anybody help me show to display the manufacturer array so i can display what information i want on the product details page.
Thanks in advance. |
Re: Displaying Manufacturer Details
in that same php file after the manufacturers code you put from above
x_load ('debug'); func_print_r($manufacturer); |
Re: Displaying Manufacturer Details
Here is my array....
Code:
Debug [0/0]: Array ) |
Re: Displaying Manufacturer Details
So i displayed the manufacturer array.
Code:
Debug [0/0]: Array Then in products.php i assigned the variable m_url using the following code: Code:
$smarty->assign("m_url", $manufacturer[0]["url"]); Finally i call it in product_details.tpl by doing the following: Code:
{ $m_url } However its not displaying. What am i doing wrong here? I've tried many things and so on, but nothing. Please help and thanks in advance. |
Re: Displaying Manufacturer Details
Is there anybody can help me on this issue. What am i doing wrong???
|
Re: Displaying Manufacturer Details
Try this as "" are probably messing up with the second parameter
$smarty->assign("m_url", $manufacturer[0]['url']); Or you can do this if only url is what you need $smarty->assign("m_url", func_query_first_cell("SELECT url FROM xcart_manufacturers WHERE manufacturerid = 1")); |
All times are GMT -8. The time now is 02:00 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.