fsalvaggio Posted January 22, 2014 Share Posted January 22, 2014 Hi everybody, I'm trying to modify my order-address.tpl (in my prestashop v. 1.5.5) becouse I woult to show the user VAT number and other informations that depends from the group, so, I need the id_group too. After some hours of work, I can say that I have no idea about how to solve this. Somebody can help me? Thank's in advance. Link to comment Share on other sites More sharing options...
fsalvaggio Posted February 4, 2014 Author Share Posted February 4, 2014 Nobody know how I can send to smarty these two variables? Link to comment Share on other sites More sharing options...
fsalvaggio Posted February 5, 2014 Author Share Posted February 5, 2014 I don't know if someone is interested in this solution for make some DB data always available in a simple array, but I solved this making a new little and simple module hooked in header. This is the main method: public function hookHeader() { global $smarty; $context = Context::getContext(); $id_lang = $context->cart->id_lang; $customer = $context->customer; $id_customer = $customer->id; $partitaiva = Db::getInstance()->executeS("SELECT " ._DB_PREFIX_. "customer.piva FROM " ._DB_PREFIX_. "customer WHERE " ._DB_PREFIX_. "customer.id_customer = '$id_customer'"); if(!isset($partitaiva[0])) $partitaiva = FALSE; $smarty->assign('piva', $partitaiva); } 'piva' is a custom field in our DB, but this can be used for each field. Link to comment Share on other sites More sharing options...
Recommended Posts