ajsbox Posted May 16, 2019 Share Posted May 16, 2019 public function hookdisplayProductAdditionalInfo($params) { $ajaxUrl = $this->context->link->getAdminLink("AdminModules")."&configure=".$this->name; $estado = null; //Verifico si está configurada la opción de mostrar el stock de tiendas desde la BD $sql = "SELECT valor FROM "._DB_PREFIX_."syncbsale_configuracion WHERE atributo = 'showStockStore' "; if ($fila = Db::getInstance()->getRow($sql)) { $estado = $fila['valor']; } //Si esa toda la configuración correcta, se despliega el stock if($estado == 1) { $this->context->smarty->assign('idProduct', Tools::getValue('id_product')); $this->context->smarty->assign('baseUrl', __PS_BASE_URI__); $this->context->smarty->assign('ajaxUrl', $ajaxUrl); $variant = false; //Veo si tiene variantes $product = new Product( (int)Tools::getValue('id_product'), true, Configuration::get('PS_LANG_DEFAULT') ); $variants = $product->getAttributeCombinations($this->context->language->id); if(sizeof($variants) > 0) { $variant = true; } $this->context->smarty->assign('variant', $variant); //return $this->display(__FILE__, 'stockstoreproduct.tpl'); return $this->setTemplate('module:syncModule/views/templates/hook/stockstoreproduct.tpl'); // THIS LINE TO DISPLAY TEMPLATE BUT IN FRONT END CANT SEE NOTHING IN PS 1.7 } // IN PS 1.6 WORK OK } MODULE SHOW STOCK AVAILABILITY Link to comment Share on other sites More sharing options...
ajsbox Posted May 16, 2019 Author Share Posted May 16, 2019 This module is working on PS 1.6 but SHOW NOTHING in PS 1.7 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now