| ||||||||||
| Shopping cart software Solutions for online shops and malls | ||||||||||
| 
 | 
||||||||||
| X-Cart Home | 
Manufacturer Name in products_list.tpl | |||
![]()  | 
	
	
		
			 | 	
	
||
| 
		 | 
	Thread Tools | Search this Thread | 
| 
		 
			 
			#1  
			
			
			
			
		 
		
		
	 | 
|||||||
		
		
  | 
|||||||
| 
	
	
		
        	 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: 
	
		
	
				__________________ 
		
		
		
		
	
		
		
		
	X-Cart version 4.3.2  | 
|||||||
| 
		 
			 
			#2  
			
			
			
			
		 
		
		
	 | 
|||||||
		
		
  | 
|||||||
| 
	
	
		
        	 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 
				__________________ 
		
		
		
		
	
		
		
		
	X-cart - 4.3.2 loads of mods and custom code  | 
|||||||
| 
		 
			 
			#3  
			
			
			
			
		 
		
		
	 | 
|||||||
		
		
  | 
|||||||
| 
	
	
		
        	 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: 
	
 I tried wrapping $thisManufactorer in quotes but that didn't help either. 
				__________________ 
		
		
		
		
	
		
		
		
	X-Cart version 4.3.2  | 
|||||||
| 
		 
			 
			#4  
			
			
			
			
		 
		
		
	 | 
|||||||
		
		
  | 
|||||||
| 
	
	
		
        	 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: 
	
		
	
				__________________ 
		
		
		
		
	
		
		
		
	X-cart - 4.3.2 loads of mods and custom code  | 
|||||||
 
  | 
|||||||
| 
		 
			 
			#5  
			
			
			
			
		 
		
		
	 | 
|||||||
		
		
  | 
|||||||
| 
	
	
		
        	 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. 
				__________________ 
		
		
		
		
	
		
		
		
	X-Cart version 4.3.2  | 
|||||||
| 
		 
			 
			#6  
			
			
			
			
		 
		
		
	 | 
|||||||
		
		
  | 
|||||||
| 
	
	
		
        	 i have  
		
	
		
		
		
		
			{$manufacturer.manufacturer}{$product.manufacturer } in my products_t this allows me to show the name in manufacturer and products 
				__________________ 
		
		
		
		
	
		
		
		
	X-cart - 4.3.2 loads of mods and custom code  | 
|||||||
| 
		 
			 
			#7  
			
			
			
			
		 
		
		
	 | 
|||||||||
		
		
  | 
|||||||||
| 
	
	
		
        	 I found a solution for X-Cart 4.4.4 and posted it here: http://forum.x-cart.com/showthread.php?t=61592 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
		
		
		
	X-Cart Pro v4.2.2 [Win] X-Cart Pro v4.2.3 [Win] X-Cart Pro v4.4.4 [Win]  | 
|||||||||
| 
 | 
|||
| 
 
X-Cart forums © 2001-2020
 
 | 
|||