![]() |
Re: Manufacturer name in from of Product name
In my opinion (take that for what it's worth) I would be VERY careful here... and I would edit the templates. There aren't THAT many templates involved... maybe half a dozen?
|
Re: Manufacturer name in from of Product name
Quote:
Ok I didn't check to see what is affected but that's not the way to go then. So you can either change the php to export to smarty new variable with this value (that way product array won't be affected, but you still have to change the templates to reflect the new variable) or as carpeperdiem posted - change the templates only, which I think you shoud do. Sorry to mislead you like this |
Re: Manufacturer name in from of Product name
Steve, if you checked it and it's working please upload your file (include/func.product.php ). I will make a backup and replace with yours. My X-Cart version is 4.2.2.
Hope an expert will see this and solve the mistery :) |
Re: Manufacturer name in from of Product name
I didn't keep the changes and my version is 4.2.1
If you insist on changing php files... :) open xcart_root/product.php find Code:
$smarty->assign("location", $location); Code:
$new_product_title = $product_info['manufacturer'] . " " . $product_info['product']; Code:
{$new_product_title} |
Re: Manufacturer name in from of Product name
Steve, the last solution is ok to me. Thanks for your support.
|
Re: Manufacturer name in from of Product name
No problem
|
Re: Manufacturer name in from of Product name
OK thanks for the tips. That seems an option. If you both recommend to edit the templates then I would rather do that option.
In products_list.tpl we currently have: HTML Code:
{$product.product|escape} How would I change this to insert the manufacturer name beforehand. I can of course display the manufacturer ID itself by doing this: HTML Code:
{$product.manufacturerid} {$product.product|escape} And the following wouldn't work! HTML Code:
{$product.manufacturer} {$product.product|escape} I guess that I'm not far away? Thanks. |
Re: Manufacturer name in from of Product name
try,
Code:
{$product.manufacturerid|escape}, {$product.product|escape} |
Re: Manufacturer name in from of Product name
Quote:
Thanks. That's ok if I want to display the manufacturer ID (1, 2 and so on). How do I modify it to get the actual manufacturer? |
Re: Manufacturer name in from of Product name
$product.manufacturer
|
All times are GMT -8. The time now is 04:59 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.