-
Posts
157 -
Joined
-
Last visited
-
Days Won
1
dysmant last won the day on May 17 2015
dysmant had the most liked content!
Profile Information
-
Location
Yogyakarta - Indonesia
-
Activity
Developer
Recent Profile Visitors
dysmant's Achievements
-
how to call php function in .tpl page
dysmant replied to dysmant's topic in Configuring and using PrestaShop
Thank You.. I will try this.. -
how to call php function in .tpl page
dysmant replied to dysmant's topic in Configuring and using PrestaShop
However, I need to get the value after {foreach} on the .tpl page, like this example: {foreach from=$countries item=c} {assign var='id_country' value=$page->_getCountID($c.id_country)} {/foreach} {foreach from=$products item=p} {assign var='id_product' value=$page->_getProductID($p.id_product)} {/foreach} and, on the smarty array in .php file $this->context->smarty->assign([ 'countries' =>$countries, 'products' =>$products, 'page' =>$this, ]); return $this->display(__FILE__, 'product.tpl'); this script causes an error 'page' =>$this, BAD ENGLISH, Sorry -
how to call php function in .tpl page
dysmant replied to dysmant's topic in Configuring and using PrestaShop
any example?? I want to call this public function public function _getProductID($id_product) { return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT `id_product` FROM `'._DB_PREFIX_.'packing_product` WHERE `id_product` = '.(int)$id_product); } file : modules/mymodule/mymodule.php and this is my hook function public function hookDisplayProductAdditionalInfo($params) { $id_shop = Context::getContext()->shop->id; $products = $this->_getProducts($id_shop); $this->context->smarty->assign([ 'products' =>$products, 'page' =>$this, ]); return $this->display(__FILE__, 'product.tpl'); } file : modules/mymodule/mymodule.php and this is tpl page {foreach from=$products item=p} {assign var='id_Product' value=$page->_getProductID($p.id_product)} {/foreach} file: modules/mymodule/views/templates/hook/product.tpl The error is caused by this script: 'page' =>$this, file : modules/mymodule/mymodule.php and this: value=$page->_getProductID($p.id_product) file: modules/mymodule/views/templates/hook/product.tpl -
how to call php function in .tpl page
dysmant replied to dysmant's topic in Configuring and using PrestaShop
Yes, I'm making a module. I see the problem in this line (in php page) $this->context->smarty->assign([ 'page' =>$this->, ]); 'page' =>$this->, if I remove this line, the module works fine. however I need a php function call on the .tpl page -
dysmant started following how to call php function in .tpl page
-
I have a public function in php page like this public function _getProductID($id_product) { return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT `id_product` FROM `'._DB_PREFIX_.'packing_product` WHERE `id_product` = '.(int)$id_product); } public function hookDisplayProductAdditionalInfo($params) { $id_shop = Context::getContext()->shop->id; $products = $this->_getProducts($id_shop); $this->context->smarty->assign([ 'products' =>$products, 'page' =>$this, ]); return $this->display(__FILE__, 'product.tpl'); } I also have a .tpl file (product.tpl) with a script like this {foreach from=$products item=p} {assign var='id_Product' value=$page->_getProductID($p.id_product)} {/foreach} but the result is an error with notes like this: Fatal error: Uncaught Error: Cannot use object of type Extlink as array in however in the back office page it works fine.. Which script code do I need to fix?
-
[Modul]Ongkos Kirim - All In One Shipping Module
dysmant replied to dysmant's topic in Jasa, Promosi & Lowongan Kerja
Tidak ada fitur tracking kiriman Belum kompatibel dengan presta 1.7 -
[Modul]Ongkos Kirim - All In One Shipping Module
dysmant replied to dysmant's topic in Jasa, Promosi & Lowongan Kerja
masih.. Maaf tidak bisa -
[Modul]Ongkos Kirim - All In One Shipping Module
dysmant replied to dysmant's topic in Jasa, Promosi & Lowongan Kerja
Terimakasih testimoni dari agan-agan yang sudah beli module Ongkir.. semoga dagangannya laris.. kalau ada kendala, silakan informasikan saja. Module ongkir belum kompatibel dengan presta 1.7.x.x... masih developing.. -
[Modul]Ongkos Kirim - All In One Shipping Module
dysmant replied to dysmant's topic in Jasa, Promosi & Lowongan Kerja
up.. -
dysmant started following larckhalil
-
[Modul]Ongkos Kirim - All In One Shipping Module
dysmant replied to dysmant's topic in Jasa, Promosi & Lowongan Kerja
Terimakasih testimoninya.. semoga olshopnya sukses ya.. Yang minat module ongkir silakan hubungi saya... -
[Modul]Ongkos Kirim - All In One Shipping Module
dysmant replied to dysmant's topic in Jasa, Promosi & Lowongan Kerja
Terimakasih testimoninya.. semoga sukses olshopnya.. Kalau ada kendala atau mau tanya-tanya, silakan di 0818708523 -
[Modul]Ongkos Kirim - All In One Shipping Module
dysmant replied to dysmant's topic in Jasa, Promosi & Lowongan Kerja
Gojek bisa dibikin kurirnya via module, tapi pricelistnya statis aja.. dan tidak terintegrasi dengan gojek.. bisa update.. silakan email nama domainnya.. harga net untuk pembelian module gan.. -
[Modul]Ongkos Kirim - All In One Shipping Module
dysmant replied to dysmant's topic in Jasa, Promosi & Lowongan Kerja
Terimakasih testimoninya gan.. semoga olshopnya sukses.. amiin Terimakasih atas komentarnya.. semoga dagangan onlinenta laris manis.. -
[Modul]Ongkos Kirim - All In One Shipping Module
dysmant replied to dysmant's topic in Jasa, Promosi & Lowongan Kerja
Terimakasih atas testimoninya.. semoga sukses olshopnya.. Thanks atas reviewnya.. semoga sukses selalu.. Thank you atas reviewnya.. semoga dagangannya lancar..