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

Displaying Manufacturer Details

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-10-2010, 06:36 AM
 
almatesic almatesic is offline
 

Member
  
Join Date: Jul 2010
Posts: 12
 

Default 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.
__________________
Albino D. Matesic
--------------------
x-cart version 4.3.2
Reply With Quote
  #2  
Old 12-10-2010, 10:40 AM
 
almatesic almatesic is offline
 

Member
  
Join Date: Jul 2010
Posts: 12
 

Default Re: Displaying Manufacturer Details

In product.php I added the following code.
Code:
$manufacturer = func_query("SELECT * FROM xcart_manufacturers WHERE manufacturerid = 1"); $smarty->assign("m_url", $manufacturer[0]["url"]);

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
__________________
Albino D. Matesic
--------------------
x-cart version 4.3.2
Reply With Quote
  #3  
Old 12-10-2010, 11:03 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Displaying Manufacturer Details

{$m_url }.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #4  
Old 12-10-2010, 11:08 AM
 
almatesic almatesic is offline
 

Member
  
Join Date: Jul 2010
Posts: 12
 

Default Re: Displaying Manufacturer Details

I'm sorry I have that in my code...

{ $m_url }
__________________
Albino D. Matesic
--------------------
x-cart version 4.3.2
Reply With Quote
  #5  
Old 12-10-2010, 11:11 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Displaying Manufacturer Details

Have you looked at $manufacturers array how it is structured?
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #6  
Old 12-10-2010, 12:14 PM
 
almatesic almatesic is offline
 

Member
  
Join Date: Jul 2010
Posts: 12
 

Default Re: Displaying Manufacturer Details

no i have not and not sure even how to display that to figure that out.
__________________
Albino D. Matesic
--------------------
x-cart version 4.3.2
Reply With Quote
  #7  
Old 12-14-2010, 04:33 PM
 
almatesic almatesic is offline
 

Member
  
Join Date: Jul 2010
Posts: 12
 

Default 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.
__________________
Albino D. Matesic
--------------------
x-cart version 4.3.2
Reply With Quote
  #8  
Old 12-14-2010, 05:10 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Displaying Manufacturer Details

in that same php file after the manufacturers code you put from above

x_load ('debug');
func_print_r($manufacturer);
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #9  
Old 12-14-2010, 05:25 PM
 
almatesic almatesic is offline
 

Member
  
Join Date: Jul 2010
Posts: 12
 

Default Re: Displaying Manufacturer Details

Here is my array....

Code:
Debug [0/0]: Array ( [0] => Array ( [manufacturerid] => 1 [manufacturer] => Hubert [url] => http://www.imdb.com/name/nm0209168/ [descr] => [orderby] => 10 [provider] => admin [avail] => Y [meta_description] => [meta_keywords] => [title_tag] => )

)
__________________
Albino D. Matesic
--------------------
x-cart version 4.3.2
Reply With Quote
  #10  
Old 12-15-2010, 04:04 PM
 
almatesic almatesic is offline
 

Member
  
Join Date: Jul 2010
Posts: 12
 

Default Re: Displaying Manufacturer Details

So i displayed the manufacturer array.

Code:
Debug [0/0]: Array ( [0] => Array ( [manufacturerid] => 1 [manufacturer] => Hubert [url] => http://www.imdb.com/name/nm0209168/ [descr] => [orderby] => 10 [provider] => admin [avail] => Y [meta_description] => [meta_keywords] => [title_tag] =>

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.
__________________
Albino D. Matesic
--------------------
x-cart version 4.3.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


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

   

 
X-Cart forums © 2001-2020