Rail Balco
Members-
Posts
30 -
Joined
-
Last visited
Profile Information
-
Location
Czech republic
-
First Name
Jan
-
Last Name
Prokeš
-
Activity
Freelancer
Recent Profile Visitors
1,545,733 profile views
Rail Balco's Achievements
Newbie (1/14)
1
Reputation
-
Hi, according to info from january 2017 we should not use new translation system for modules. I guess this is still actuall. Do we know when we should switch to a new system? http://build.prestashop.com/news/new-translation-system-prestashop-17/ http://developers.prestashop.com/module/05-CreatingAPrestaShop17Module/06-ModuleTranslation.html
-
Prestashop 1.6.1.7, Default Display Message to Customer to "Yes"
Rail Balco replied to sumsel's topic in General topics
Hi and sorry for reviving necro. I have very same issue. I need to change behavior of described button, as in screenshot: https://www.screencast.com/t/Gd17oSBOukw I have found mailalerts module, however it does not change default behavior of this option. I believe that marked option "Order edit" (screenshot: https://www.screencast.com/t/eB16N195nk6 ) should be responsible for sending notifications to a customer when an order has been edited. However I still need to switch aforementioned button as in first screenshot. If this button is set to "No", it overrides mailalerts module behavior, therefore not send anything. Any idea on different solution? -
Hello! I'm working on Admin module and I have to add field to a product page. Since product page cannot be extended in this version, I have to work on hooks and Javascript. My issue is, I've done what I was supposed to do, however I'm failing to go through token validation. I'm on site https://myserver.eu/admin/index.php/product/form/12?_token=TyEoISTXRQCH5Bv-Odi9IpTihpvzVIjFn7tQfDZDj6Q#tab-step3 And sending AJAX to https://myserver.eu/admin/index.php?controller=AdminMyModuleController&method=ajaxMyCustomMethod&token=d054ee102bdc9bb4bdf523478ea64b4f& In JS i retrieve token like this: $.ajax({ ajax : true, url: `https://myserver.eu/admin/index.php?controller=AdminMyModuleController&method=ajaxMyCustomMethod&token=` + window.employee_token, type: 'GET', contentType: 'application/json', data: JSON.stringify(data), dataType: 'json', success: 'success', error: function () { response([]); } }); However I'm receiving invalid Token error in response. Can it be I'm retrieving token while being on site of another controller, and I'm sending AJAX to my controller, therefore (if token is generated from url or controller name) sent Token is different then expected one? So far I have failed to search where is token generated when it needs to be sent from JS file, so I don't know how it is generated, I only assume it is somehow from address. So far, I've found that Presta is using Bloodhound search engine, so I only found their tokenizers.
-
Presta ignoring PS_DISP_UNAVAILABLE_ATTR
Rail Balco replied to Rail Balco's topic in Configuring and using PrestaShop
Ok so I'll answer myself. Presta is not ignoring this setting. If there is product of colors yellow and green and sizes S, M and L, it will display all options that are available in whatever combination. Means, green product with S size is on stock, while yellow product on S size is 0 quantity, in FO S size will be always displayed. If customer tries to go on unavailable combination, it will kick him back to last available combo. That is not exactly preferable solution :/ We rather turned off this option and are looking for another solution. -
Hello there, we are using PS 1.7.2.2 and we are having difficulties using option "Display unavailable product attributes on the product page" in Shop parameters -> Product Settings, When we select "NO", in mysql table configuration is appropriate field PS_DISP_UNAVAILABLE_ATTR value changed to 0. However behavior in FO is following: customer can see sold combinations, when he clicks sold combination (0 quantity), his choice goes back to original one he was looking at. Anyone having experience with this? Seems like a bug to me. Pretty annoying one btw, we are loosing really a LOT of customers because of this behavior.
-
Product information will not save every time
Rail Balco replied to ardo376's topic in Configuring and using PrestaShop
what version of PS are you using? -
Product information will not save every time
Rail Balco replied to ardo376's topic in Configuring and using PrestaShop
Contact your hosting/VPS provider and ask him on auto_increment_increment value and ask him to set this value to 1 if it is not. However this problem is having several different reasons... -
Quick question: anyone having idea what is ReflectionClass?
-
Admin controller Page not Found
Rail Balco replied to Rail Balco's topic in Addons, modules and themes developers
Ok so I'll answer myself... When installing tabs I assigned wrong tabParentName, this is correct way of how to install tabs... public function installTab($className, $tabName, $tabParentId, $tabParentName = false) { $tab = new Tab(); $tab->active = 1; $tab->class_name = $className; $tab->name = array(); foreach (Language::getLanguages(true) as $lang) { $tab->name[$lang['id_lang']] = $tabName; } if ($tabParentName) { $tab->id_parent = (int) Tab::getIdFromClassName($tabParentName); } else { $tab->id_parent = $tabParentId; } $tab->module = $this->name; return $tab->add(); } -
Im working on my own module, that is supposed to work with controller in BO. When I install this module, my custom tab shows up in admin menu, but when I click on link, I get "Page not found". I am creating this module with help of a few articles on net. Can anyone help me by pointing out what am I doing wrong? I'm starting to be in dead end... Thing is, that I expect to see at least "Hello world!" as is in tpl file that I'm calling in initContent(), instead I get this "Page not found". Even no error or exception (I have debug: ON and Dev_mode: true When I try to var_dump("hi there!");die(); on the beginning of __construct() in controller, there's no change. Still "Page not found". Edit: oh yes, and URL that is being called by menu tab is https://mydomain.com/admin_dev/index.php?controller=AdminWarehouseAddress&token=17f4840de8ab769b454601993723b96a This is my main class skl_warehouseaddress.php if (!defined('_PS_VERSION_')) { exit; } class skl_warehouseaddress extends Module { public function __construct() { $this->name = 'skl_warehouseaddress'; $this->tab = 'shipping_logistics'; $this->version = '1.0.0'; $this->author = 'Jan Prokeš'; $this->need_instance = 0; $this->ps_versions_compliancy = array('min' => '1.7', 'max' => _PS_VERSION_); $this->bootstrap = TRUE; parent::__construct(); $this->displayName = $this->l('SKL Warehouse Addresses'); $this->description = $this->l('Warehouse address manager'); $this->confirmUninstall = $this->l('Are you sure you want to uninstall?'); if (!Configuration::get('SKL_WAREHOUSEADDRESS_NAME')) $this->warning = $this->l('No name provided'); } public function install() { Db::getInstance()->execute(' CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'warehouseaddress` ( `id_stock_position` int(11) unsigned NOT NULL AUTO_INCREMENT, `id_stock_available` INT( 11 ) UNSIGNED NOT NULL, `code` varchar(32) NOT NULL, PRIMARY KEY (`id_stock_position`), UNIQUE `UNIQUE_POSITION_CODE` ( `code` ) ) ENGINE = ' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET = utf8; '); if(parent::install()){ if($this->installTab('IMPROVE', 'AdminWarehouseAddress', 'Warehouse Addresses')){ return true; } } } This is controller class AdminWarehouseAddressController extends ModuleAdminController { public function __construct() { parent::__construct(); $this->context = Context::getContext(); } public function initContent() { parent::initContent(); $this->context->smarty->assign(array()); $this->setTemplate('view.tpl'); } public function renderView() { return parent::renderView(); } public function renderList() { return parent::renderList(); } } this is model class WarehouseAddress extends ObjectModel { public $id_stock_position; /** @var int ID pozice */ public $id_stock_available; /** @var int ID produktu na pozici */ public $code; /** @var varchar EAN/SKU */ /** * @see ObjectModel::$definition */ public static $definition = array( 'table' => 'warehouseaddress', 'primary' => 'id_stock_position', 'multilang' => false, 'fields' => array( 'id_stock_available' => array( 'type' => self::TYPE_INT, 'validate' => 'isUnsigned', 'required' => true), 'code' => array( 'type' => self::TYPE_STRING, 'size' => 32, 'required' => true) ) ); } and this is tepl file, that I expect to see <section > <div>Hello world !</div> </section>
-
Hi Prak, did you solve your issue? Looks like I'm having similar one. I have succeeded in creating my own tab in admin menu, but when I go to controller url, I get "Page not found".
- 6 replies
-
- back-office
- module
-
(and 2 more)
Tagged with:
-
Hi I'm working on module that is using Cron. I have set all I need and when I go to file skl_advancedsubscriber-cron.php (the one I quote below) directly, script runs OK. As you can see, I am using FileLogger to get output to logfile. <?php include(dirname(__FILE__).'/../../config/config.inc.php'); include(dirname(__FILE__).'/../../init.php'); $file = _PS_ROOT_DIR_ . '/app/logs/cronTest.log'; $logger = new FileLogger(); $logger->setFilename($file); $logger->logMessage('Include', 1); include(dirname(__FILE__).'override/modules/mailchimpintegration/mailchimpintegration.php'); $logger->logMessage('Trying init MailChimpIntegrationOverride', 1); $McOverride = new MailChimpIntegrationOverride(); $logger->logMessage('Init MailChimpIntegrationOverride', 1); $McOverride->syncEmlSubsciption(Configuration::get(SKL_EMAILSUBSCRIPTION_GDPR_LAST_UPDATE)); Configuration::updateValue('SKL_EMAILSUBSCRIPTION_GDPR_LAST_UPDATE', Date("Y-m-d H:i:s", Time())); But when I use system CRON, suddenly my script stops on line $McOverride = new MailChimpIntegrationOverride(); By changing 'include' to 'require' I realized script can't access to Mailchimp overriding class override/modules/mailchimpintegration/mailchimpintegration.php Please note this file DOES NOT CHANGE, when I access skl_advancedsubscriber-cron.php directly I get input I am expecting, but when CRON scheduled task is trying to access this, script ends with HTTP500. Anyone having experience with this? Any idea what might be a solution?
-
If they are in same <form> tag, then they are same form. I'm trying to create two different <form> tags so my save button does not meddle with the other save button. Any solution found, so far?
-
I can't save changes to my products in Prestashop 1.7
Rail Balco replied to donscalos's topic in 1.7.2.x [Current]
Looks like this issue has many different reasons, i suggest to look for what is causing your exact problems. Mine was solved by installing presta on better hosting. Have a look on BOOM-3901 on forge.