| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Display Manufacturer Name on Products Page | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi,
I am trying to show the Manufacturer name (and link to the manufacturer) on the products pages. In the products_t.tpl adding Code:
If I put the same code in the product.tpl page, it displays the manufacturer correctly. Any ideas how I can add it to the products page? Is there something missing from the php file? Thanks, Jenny
__________________
Version 4.3.2 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() Manufacturer name may not be included in the products array on that page. You can look in the debugger what's available. If it's not included products.php must be modified to include manufacturer
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#3
|
|||||||
|
|||||||
![]() How would I go about including it in the array?
It seems that - {$product.manufacturerid} is included, just not the Manufacturer name. Thanks, Jenny
__________________
Version 4.3.2 |
|||||||
#4
|
|||||||||
|
|||||||||
![]() You will have to edit a php file for that, most likely include/search.php
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#5
|
|||||||
|
|||||||
![]() Do you know what I need to add to the php file? Any specific instructions would be appreciated.
__________________
Version 4.3.2 |
|||||||
#6
|
|||||||||
|
|||||||||
![]() BACKUP FIRST. THIS IS NOT TESTED.
Try adding this in products.php just before $smarty->assign("cat_products", $products); if (!empty($products)) { foreach ($products as $k=>$v) $products[$k]['manufacturer'] = func_query_first_cell("SELECT manufacturer FROM $sql_tbl[manufacturers] WHERE manufacturerid = $v[manufacturerid]"); }
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#7
|
|||||||
|
|||||||
![]() @cflsystems, your code worked like a charm! Here's the full code I used
In products.php below: $smarty->assign('cat_products', isset($products) ? $products : array()); HTML Code:
Then add the following code into your product_details.tpl page where ever you want it HTML Code:
__________________
Missing Design* x-cart version 4.4.0 |
|||||||
#8
|
|||||||
|
|||||||
![]() That worked perfectly for me as well.
Any ideas how I would do it on the invoice page? as well as the cart summary on the last step of the fast lane checkout? Thanks again for your help. Jenny
__________________
Version 4.3.2 |
|||||||
#9
|
|||||||
|
|||||||
![]() Hi,
This is very interesting. I am trying to pull the manufacturer to the products_list file and tried your code. It didn't work. Does your code need to be changed to get what I need? Thanks, Alexis
__________________
X-Cart Gold 4.3 |
|||||||
#10
|
|||||||
|
|||||||
![]() Any idea how you would display the manufacturer logo and link to manufacturer page on the products page instead of the name?
|
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|