Jump to content

dysmant

Members
  • Posts

    157
  • Joined

  • Last visited

  • Days Won

    1

dysmant last won the day on May 17 2015

dysmant had the most liked content!

3 Followers

Profile Information

  • Location
    Yogyakarta - Indonesia
  • Activity
    Developer

Recent Profile Visitors

1,399,187 profile views

dysmant's Achievements

Newbie

Newbie (1/14)

  • First Post Rare
  • Collaborator Rare
  • Reacting Well Rare
  • Conversation Starter Rare
  • One Month Later Rare

Recent Badges

35

Reputation

  1. 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
  2. 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
  3. 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
  4. 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?
  5. Tidak ada fitur tracking kiriman Belum kompatibel dengan presta 1.7
  6. 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..
  7. Saya ada jual module shipping all in one dengan berbagai fitur yang mengakomodir berbagai kebutuhan untuk pengiriman.. silakan wa di 0818708523
  8. Terimakasih testimoninya.. semoga olshopnya sukses ya.. Yang minat module ongkir silakan hubungi saya...
  9. Terimakasih testimoninya.. semoga sukses olshopnya.. Kalau ada kendala atau mau tanya-tanya, silakan di 0818708523
  10. 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..
  11. Terimakasih testimoninya gan.. semoga olshopnya sukses.. amiin Terimakasih atas komentarnya.. semoga dagangan onlinenta laris manis..
  12. Terimakasih atas testimoninya.. semoga sukses olshopnya.. Thanks atas reviewnya.. semoga sukses selalu.. Thank you atas reviewnya.. semoga dagangannya lancar..
×
×
  • Create New...