Quote:
Originally Posted by version
Do you think it's not working for me because of the typo ?
$thisManufactorer <-
$thisManufacturer ?? how are we supposed to use code with variable variables?
|
There is the same variable name in SQL query.
But table name is case sensitive.
So right php code is
PHP Code:
$thisManufactorer = $product_info["manufacturerid"];
$manufacturer = func_query("SELECT xcart_manufacturers.*, xcart_images_M.image_path, xcart_images_M.filename FROM xcart_manufacturers, xcart_images_M WHERE xcart_manufacturers.manufacturerid = xcart_images_M.id AND manufacturerid = $thisManufactorer");
$smarty->assign("manufacturer", $manufacturer[0]["manufacturer"]);
$smarty->assign("m_image_path", $manufacturer[0]["image_path"]);
tpl code to show manufacturer logo
Code:
{if $m_image_path ne ""}
<img src="{$m_image_path}" />{/if}