Jump to content

gonebdg - webindoshop.com

Members
  • Posts

    1,491
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by gonebdg - webindoshop.com

  1. I'm not sure why almost nobody reply to this thread, even the Prestashop team. Prestashop Doc. also doesn't mentioned about this issue and cannot found any clue at all on Prestashop bugs tracker https://devdocs.prestashop.com/1.7/modules/creation/module-translation/classic-system/ I just remember and back to this thread again because my client who still use PS 1.7.6.x had a translation problem with one of my module front controller file. So here it is the work around of this problem : For ModuleFrontController file the PHP code which should be use to make the translation work should be written like this : $this->l('Text to translate', 'controller_filename'); // OR $this->module->l('Text to translate', 'controller_filename'); Example if your ModuleFrontController filename is default.php, then the PHP code for the translation text should be like this : $this->l('Text to translate', 'default'); // OR $this->module->l('Text to translate', 'default');
  2. PROBLEM SOLVED Basically it's so simple ... but sometime forgotten OrderController.php yet declare the necessary class which require to call the corresponding class method. So simply (add) declare following code in the top of the file along with the available code declarations use Db; use PrestaShopDatabaseException;
  3. Ok please forget about order message issue, since I already figuring out what is the cause of the problem. NOTE: order message issue in here are happened on Dev Site which are the upgraded version from an old PS version the related/necessary data are missing from the database which cause order message are not displayed on admin order Back to the topic of this thread which is "How to call class method in OrderController ?" I guess since PS 1.7.7.0 we can't call Prestashop class method anymore directly from PS-symfony controller we had to override the related controller by creating custom module and then call PS class method from there If someone know how to call Prestashop class method (directly) inside PS-symfony controller please let me know how ...
  4. Hmmm ... I'm not sure what is wrong with my dev site on live server because in my locahost the order message was displayed normally and the debug code show the messages as it should. However I still can't figuring out how to call class method inside Prestashop > Symfony controller ... $debug_message = $orderForViewing->getMessages(); dump($debug_message); exit;
  5. Anyone ??? The reason I would like to do this is because I couldn't get the order message from `ps_message` DB table from this code $debug_message = $orderForViewing->getMessages(); dump($debug_message); exit;
  6. Does anyone know how to call Class method inside OrderController.php > viewAction ? For example, I'm trying to get the related order message from db table `ps_message` with this method $message = Message::getMessagesByOrderId($orderId); But it's error
  7. Reference: https://devdocs.prestashop.com/1.7/modules/creation/module-translation/new-system/ PrestaShop version: 1.7.6.1 Debug mode: Active Hello, I've been monitoring this issues since PrestaShop 1.7 releases, so I was using the Classic translation system for my module until now. PrestaShop 1.7.6.2 has been released and I still get a problem with New module translation system 1.7.6.x. Here we go ... My custom module name is `Ecmo` (ecmo.php) and it had two Admin controllers files: adminecmo.php and AdminEcmoTwo.php also had two Front controllers: sales.php and product.php In my core module file ecmo.php I decide to use "translation domain naming scheme" : 'Modules.Ecmo.Core' and it working fine where the translations text appearing normally in Admin > International > Translations >> Modules >>> Ecmo : Core and the translation text also working fine when displayed on Admin Installed modules. e.g : $this->displayName = $this->trans('Export CSV Master Order', array(), 'Modules.Ecmo.Core'); The problem begin when I'm starting to develop Admin Module Controller : adminecmo.php which is extending AdminOrdersControllerCore >> class AdminEcmoController extends AdminOrdersControllerCore When opening the Admin Module Page an error displayed: Call to a member function trans() on null That happen if I'm following the new module translation system as stated on the references. e.g: (this should work but it doesn't) $this->trans('ID', array(), 'Modules.Ecmo.Adminecmo') Next I was thinking that maybe it doesn't work because in this controller I was extending "AdminOrdersControllerCore" instead "ModuleAdminController", so I try another approach and still get an error (a different error) Call to protected method ModuleCore::trans() from context 'AdminEcmoController' That happen if I'm using this approach : $this->module->trans('ID', array(), 'Modules.Ecmo.Adminecmo') Note: $this->module has been defined on the __construct() method. $this->module = Module::getInstanceByName('ecmo'); Next I try another approach which is working but this approach doesn't following the standard coding as stated on the references. $this->context->getTranslator()->trans('ID', array(), 'Modules.Ecmo.Adminecmo') Note: $this->context has been defined on the __construct() method. $this->context = Context::getContext(); Now let's continue with the other Admin controller on my module: AdminEcmoTwo.php which is extending ModuleAdminController >> class AdminEcmoTwoController extends ModuleAdminController and the same problem happening so the same workaround also applied. The Question: Is this a bugs or just an error on my module ? Why $this->trans method doesn't work on my module Admin Controller ? I didn't check the bugs tracker yet but already searching the similar topic on the forum but did not find an answer. I didn't yet digging into the related core Prestashop to figuring out why this problem happening. Also this discussion yet talking about the translation my module front controller.
  8. PrestaShop Meetup Session 7 insya allah diadakan pada Hari : Sabtu 7 April 2018 Pukul : 17.00 WIB s/d 21.30 WIB Lokasi : Ludwick Café Bandung https://goo.gl/maps/og43rE7TiMx Jalan Budi Luhur I No.11B, Gegerkalong, Sukasari Kota Bandung, Jawa Barat 40153 (022) 87783428 https://www.meetup.com/Prestashop-Bandung-Ecommerce-Meetup/events/249029029/
  9. ganti nama directory /admin/ dengan nama lain, jgn lupa hapus directory /install/
  10. sama saja utk web server localhost maupun live, coba anda cermati lagi uraian diatas dan coba anda implementasikan.
  11. Untuk diketahui bagi yang mengalami masalah `lola` alias loading lama, khusunya saat mengunjungi halaman Admin Dashboard dan Admin Modules. Saat mengunjungi halaman Admin Modules, PrestaShop anda akan berupaya untuk terkoneksi ke situs PrestaShop Addons untuk memeriksa dan mengambil daftar dan data modules (native, must have, bought) berdasarkan file berekstensi XML yang diciptakan dan disimpan di ../config/xml/ File-file XML tsb akan diperbarui kembali dalam jangka waktu tertentu (ada yang per minggu dan ada yang perhari) Process tsb akan memakan waktu lama bahkan bisa berakhir error, apabila : Koneksi internet yang anda gunakan lambat Ada permasalahan DNS pada jaringan internet yang digunakan (tidak peduli secepat apapun koneksi internet anda) sehingga koneksi ke situs PrestaShop Addons dari Indonesia terganggu Ada permasalahan pada sistem/situs PrestaShop Addons sendiri (*.prestashop.com, addons.prestashop.com, *.prestastore.com) Ada permasalahan dengan networking server anda Memory limit server anda kurang memadai Bagaimana solusinya ? Jika memiliki VPN, silahkan coba gunakan koneksi melalui VPN. JIka bisa dan memiliki tunelling, silahkan gunakan koneksi internet dengan tunelling. Kedua hal tsb akan meyelesaikan masalah jika penyebab permasalahan adalah DNS sebagaimana disebutkan pada poin-2 Salah satu caranya adalah menonaktifkan pemeriksaan dan pengambilan data modules tersebut, dengan cara mengedit classes file ../classes/modules.Module.php Untuk PrestaShop 1.6 lihat line: 1445-1537 sedangkan untuk PrestaShop 1.7 lihat line: 1388-1484 Sebelum // Get Default Country Modules and customer module $files_list = array( array('type' => 'addonsNative', 'file' => _PS_ROOT_DIR_.self::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 'loggedOnAddons' => 0), array('type' => 'addonsMustHave', 'file' => _PS_ROOT_DIR_.self::CACHE_FILE_MUST_HAVE_MODULES_LIST, 'loggedOnAddons' => 0), array('type' => 'addonsBought', 'file' => _PS_ROOT_DIR_.self::CACHE_FILE_CUSTOMER_MODULES_LIST, 'loggedOnAddons' => 1), ); foreach ($files_list as $f) { ... code php lainnya disini ... } Sesudah (ubah menjadi sebagai berikut) : // Get Default Country Modules and customer module // $files_list = array( // array('type' => 'addonsNative', 'file' => _PS_ROOT_DIR_.self::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 'loggedOnAddons' => 0), // array('type' => 'addonsMustHave', 'file' => _PS_ROOT_DIR_.self::CACHE_FILE_MUST_HAVE_MODULES_LIST, 'loggedOnAddons' => 0), // array('type' => 'addonsBought', 'file' => _PS_ROOT_DIR_.self::CACHE_FILE_CUSTOMER_MODULES_LIST, 'loggedOnAddons' => 1), // ); $files_list = array(); if ($files_list) { foreach ($files_list as $f) { ... code php lainnya disini ... } } Perubahan dilakukan dengan menonaktifkan 5 baris code dengan php commenting (tambah // didepan baris kode) kemudian mendefinisikan variable $file_list sebagai array kosong. Dengan demikian proses pemeriksaan dan pengambilan data modules (native, must have, bought) tidak akan dilakukan karena array variabel $files_list ditentukan menjadi array kosong dan proses foreach loop tidak akan dilakukan dan tidak akan ada koneksi diperlukan ke situs PrestaShop Addons dan pemuatan halaman Admin Modules pun akan berlangsung dengan cepat. Konsekwensi yang perlu diketahui dari perubahan diatas. Data module terkait, tidak akan diperiksa, tidak akan diperbarui, tidak akan ditampilkan. Daftar module yang ditampilkan di Admin Modules anda hanya akan menampilkan daftar modules yang ada di dalam direktori ../modules/ dan data modules yang sebelumnya telah berhasil dimuat (tersimpan dalam file XML). Jika merasa tidak perlu memperoleh data modules terkini berikut segala informasi pembaruannya, maka silahkan lakukan hal berikut ini : Hapus semua file XML dalam direktori ../config/xml/ Tidak perlu khawatir dengan proses penghapusan file XML tsb, karena tidak akan menyebabkan error apapun, dan file XML yang dihapus akan diciptakan kembali oleh sistem PrestaShop. Edit classes file ../classes/Tools.php dan cari/ubah : (berlaku untuk PrestaShop 1.6 dan 1.7) Sebelum protected static $is_addons_up = true; Sesudah (ubah menjadi sebagai berikut) : protected static $is_addons_up = false; dengan demikian nantinya saat generasi file XML dilakukan, beberapa file XML konten nya akan kosong dan yang lainnya hanya seperlunya. Bagi yang tidak ingin memperoleh dan tidak ingin menampilkan informasi PrestaShop di Admin Dashboard karena proses informasi tsb dapat menyebabkan `lola` juga saat membuka/mengunjungi halaman admin Dashboard karena alasan yg sama, silahkan lakukan hal berikut : Hapus file XML ../config/xml/blog-en.xml dan ../config/xml/blog-id.xml (serta yang lainnya jika terdapat bahasa lainnya yang terpasang di PrestaShop anda) Edit file ../controllers/admin/AdminDashboardController.php (berlaku untuk PrestaShop 1.6 dan 1.7) Tambahkan 2 baris kode PHP dalam method ajaxProcessGetBlogRss() public function ajaxProcessGetBlogRss() { $return = array();// tambahkan ini die(Tools::jsonEncode($return));// dan ini ... code php asli/lainnya disini ... } Selain dari pada apa yang telah diuraikan diatas, jika masih mengalami `lola` di Admin, maka periksa module-module pihak ketiga yang aktif digunakan serta periksa konfigurasi server hosting anda.
  12. Coba periksa dengan browser developer tools, mungkin filed tsb tersembunyikan (hidden) karena CSS.
  13. Hi ricardo21ferreira By default it can't, because currently there are only 2 option values for "Set order status to" : Use the last order status Reminder #n Is there any specific reason why you don't want to change the status ? It used as a reminder history, so Admin (You) know that a particular customer order has been reminded and it used by the module as identifier for the next occurrences (next actions) Same case for "Cancel" order. If this module automatically cancel order after N days without change the order status, then for the next occurence this module won't know which order that has been cancelled. Of course it can be modified to fulfill what you need, so the reminder won't change the status but it will need modifications.
  14. "Cannot retrieve test results" mean no data yet, and it can be happen if Google Analytics (ganalytics) module yet installed & configured. If you just install the Google Analytics API (gapi) module but yet install Google Analytics (ganalytics) module then there wont be any analytics data. You have to install Google Analytics (ganalytics) module first and make sure it working well then wait for a few days until the analytics data gathered. Next Google Analytics API (gapi) module can be installed & configured and and you will get the result.
  15. Product meta_title characters limit is controller by it's classes Product.php, size = 128 it's also set as `Length/Values` of database table ps_product_lang column meta_title If you want to have more than 128 characters, you have to modify/override Product class, set the size value more than 128 also don't forget to change the related DB table columns as mentioned above However it's not recommended, and I suggest you to create custom module which able to add extra text after meta_title where the module should have it's own database table to store the necessary/related data.
  16. I believe you are talking about module mailalert You should select the shop context instead all shop context (it's available on the top, before Cart icon) Then you can set different Merchant Email address per shop and save Almost all modules settings can had it's own settings value for each shop
  17. Reason: cURL error 28: Connection timed out after 5001 milliseconds Koneksi cURL dari server anda ke situs PrestaShop (module repository) time out kemungkinan : situs PrestaShop module repository sedang down (coba lagi di lain waktu) Open SSL di server hosting anda perlu di upgrade (kontak hosting anda) Masalah DNS pada server hosting anda (kontak hosting anda)
  18. Configure module Main Menu Add New Link : Label : Home (en) / Beranda (id) Link : http://domain.com Save Pada bagian Menu Top Link > Available items, scroll ke bawah dan klik "Home" Kemudian klik "Add" hingga menu "Home" masuk ke bagian Selected Items Atur posisi menu dengan memilih menu yang ada di Selected Item kemudian klik tombol ^ / v Save
  19. Untuk mengembalikan situs anda ke versi PrestaShop yang sebelumnya adalah restore full backup situs versi sebelumnya. Namun sebaiknya anda Upgrade PrestaShop ke versi terakhir v.1.6.1.17
  20. Jika ingin tampil seperti apa yang terlihat di webindoshop.com silahkan ikuti petunjuk dibawah ini : Edit module template file /themes/default-bootstrap/modules/blockcontactinfos/blockcontactinfos.tpl Tambahkan kode HTML smarty berikut diakhir bagian tepat sebelum </section> : <div class="text-center clearfix"> <a class="_blank ssl_seal" href="https://sslanalyzer.comodoca.com/?url=domain.com" title="SSL Analyzer Report" target="_blank"> <img class="img-responsive" alt="SSL Seal" src="https://domain.com/themes/default-bootstrap/img/sslseal.png"> <img class="img-responsive" alt="Comodo Secure Seal" src="https://domain.com/themes/default-bootstrap/img/comodo_secure_seal_113x59_transp.png"></a> </div> Edit CSS file /themes/default-bootstrap/css/global.css Lalu tambahkan css berikut : .ssl_seal img { display: inline-block; text-decoration: none; }
  21. Permasalahan terkait 3rd party module sebaiknya menghubungi developer module yang bersangkutan. Bila developer kurang responsif, coba lampirkan module yang dimaksud di thread ini agar rekan-rekan lain bisa mencobanya. Tracking link yang terkait ke pesanan pelanggan dan terkirim melalui email, by default umumnya bisa di perbarui dengan memperbarui Kurir terkait di Halaman Admin > Shipping > Carriers Jika karena sesuatu hal atau module yang anda gunakan menyebabkan pembaruan link tracking yang dimaksud tidak bisa dilakukan, maka anda masih bisa memperbaruinya di database baik melalui antarmuka pengelolaan database berbasis web seperti phpMyAdmin atau menggunakan aplikasi pengelolaan database seperti HeidiSQL. Cari DB table `carrier` lalu filter datanya agar hanya menampilkan kurir yang aktif (active = 1) dan tdk dihapus (deleted = 0), kemudian perbarui nilai yang ada pada kolom `url` format nilai kolom `url` umumnya sbb : http://domain-tracking.com/@ Perbarui dengan cukup tuliskan @ atau kosongkan. Anda juga bisa memperbarui template email otomatis yang berisikan link tracking dengan memperbarui file templatenya untuk menghilangkan HTML link-nya. Email template file: ../mails/ISO/in_transit.html & ../mails/ISO/in_transit.txt ISO = iso code negara, indonesia = id, Inggris = en, dst
  22. Jika ingin dalam 1 produk, maka buat opsi kombinasi Contoh Produk : Tiket Wahana Kombinasi : 1 > Tiket Masuk: Senin, Selasa, Rabu, Kamis, Jum'at, Sabtu, MInggu 2 > Tiket Permainan Tambahan : Tidak, Bom Bom Car, Gokart, Roller Coaster, Memancing, Kora-Kora, Ontang-Anting 3 > Tiket Paket Hemat : Tidak, BGR, MKO Kombinasi 1 nilai defaultnya terserah anda, misalnya = Senin Kombinasi 2 & 3 nilai defaultnya = Tidak Setiap nilai/opsi pada masing-masing kombinasi diatas, bisa di bedakan Harganya (Price Impact),
  23. Menampilkan SSL Trust logo tidak harus menggunakan code snippets (javascript) dari SSL cert. provider terkait dan bisa dengan menampilkan logo image dengan/tanpa `click to action` (link URL) ke SSL cert. analyzer. Menampilkan SSL Trust logo menggunakan HTML image, lebih bebas utk menampilkan logo image sesuai selera anda dan juga akan relatif lebih cepat dimuat dibandingkan menggunakan code snippets (javascript). Silahkan ikuti saran dari duredo diatas, atau gunakan code HTML berikut (dgn `click to action`), jgn lupa ganti domain.com dengan domain anda : <a class="_blank ssl_seal" href="https://sslanalyzer.comodoca.com/?url=domain.com" title="SSL Analyzer Report" target="_blank"> <img class="img-responsive" alt="SSL Seal" src="https://domain.com/themes/default-bootstrap/img/sslseal.png"> <img class="img-responsive" alt="Comodo Secure Seal" src="https://domain.com/themes/default-bootstrap/img/comodo_secure_seal_113x59_transp.png"> </a> Code tsb dapat anda tempatkan di manapun yang anda inginkan. Umumnya di tempatkan di footer sehingga tampil disemua halaman. Jika masih ingin menggunakan code snippets (javascript) silahkan ikuti petunjuk instalasinya sebagaimana di pandu pada https://ssl.comodo.com/free-trust-logo.php Download TrusLogo image file yang di inginkan (simpan dalam komputer anda) Upload TrusLogo image file tsb via FTP ke directory instalasi PrestaShop anda, misalnya ke dalam directory `img` dalam theme yang aktif digunakan : .../public_html/themes/default-bootstrap/img/comodo_secure_seal_100x85_transp.png Kunjungi/lihat TrusLogo image tsb di browser anda pada URL : https://domain-anda.com/themes/bootstrap-default/img/comodo_secure_seal_100x85_transp.png pastikan gambar dimuat dengan baik dan anda bisa melihat gambar tsb Kembali ke https://ssl.comodo.com/free-trust-logo.php kemudian click "Continue to verify" Pada input field "URL of image file" isikan link URL sebagaimana disebutkan pada point-3 kemudian klik "VERIFY" Lanjutkan dengan klik "Continue to Position TrustLogo" Anda akan melihat 2 code snippets : 1 utk ditempatkan sebelum </head> tag (modifikasi theme file header.tpl) 2 utk ditempatkan sebelum </body> tag (modifikasi theme file footer.tpl)
  24. You can set default page to "Modules" but you cannot redirect to specific module configuration page. You can also set default page to specific "Admin Module Page" if it already registered as an Admin Menu. If you still wanna set default page to specific module configuration page, then you must do several changes as follow : create module admin controller file simply with just a __construct() method and add redirection inside it <?php class Admin[REPLACE_WITH_MODULE_NAME]ConfigController extends ModuleAdminController { public function __construct() { parent::__construct(); Tools::redirectAdmin( $this->context->link->getAdminLink('AdminModules'). '&module_name=[replace_with_module_name]&configure=[replace_with_module_name]' ); } } create new Admin Menu pointing to the newly created module controller (Admin > Administration > Menu) Name: "as you wish" Class : "Admin[REPLACE_WITH_MODULE_NAME]ConfigController" Module : "real_module_name" Status : YES Parent: Home edit your admin profile you will see the new Admin Menu on the dropdown of "Default Page" field option select the newly created menu as your default page
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More