The following example modifies the ecshop2.7.2 prototype as follows:
1, the first need to modify the program files, the supplier read out, and then assigned to the template,
Open File/goos.php, $smarty->assign (' goods ', &N Bsp $goods); Add the following code if ($goods [ ' suppliers_id ') { $goods [' Supplie Rs_name ']= $db->getone ("Select Suppliers_name from" . $ecs->table (' Suppliers '). "Where suppliers_id=". $goods [' suppliers_id ']); } 2, then modify the template file, the supplier display, the following ecshop the official default template as an example to explain open/THEMES/DEFAULT/GOODS.DWT file Add the following code where you want to display the supplier <!--{if $goods. suppliers_name} suppliers (www.zuimoban.com)-- <li class= "Padd" > &NB Sp <strong> supplier:</strong><font class= "Shop" >{$goods .suppliers_name}</font> & nbsp </li> <!--{/if}--> most templates for thisEcshop TutorialsIntroduction Finished!
How to display supplier information on the Ecshop Product Details page