

movieseals
Gold member-
Posts
451 -
Joined
-
Last visited
-
Days Won
7
Content Type
Profiles
Forums
Gallery
Downloads
Articles
Store
Blogs
Everything posted by movieseals
-
Not sure if it is a matter of believing or not, at least in my case. It is more of a matter of correctly understanding. What is obvious for you guys might not be for people who are just selling things and not technicians. I am agnostic when it comes to caches. I just want a smooth user experience. If things do not need to be cached, then they shouldn't. It would just be nice to know which one. Some seem obvious, such as the cart, yet even "full page cached" it appears to still work as intended. Better than with other cache modules I have had. I assume user login and accounts should not be cached either. Cache seems to flush when product quantities change. So perhaps a little more clear guidance could lead to a compromise that would benefit everyone. Just saying.
-
Well, here is an anomaly. I get this error on the front page: YOU CANNOT PLACE A NEW ORDER FROM YOUR COUNTRY. SLOVENIA I am in Canada, not Slovenia. The country of Slovenia is inactive, both in countries and in the geolocation section. I am on TB 1.1.x and in the Maxmind module, the database is OK - it is a fresh one downloaded from the Maxmind site. I disabled the full cache for the cart, to no avail.
-
@datakickSo far everything seems to work as intended but if I understand you correctly, it shouldn't? At least in some instances? Is there something I should particularly look for? I will keep looking, but so far every tests I made work: orders, new customers, blog posts, searches, etc. The only thing that appears to be funky is guest checkout so far. I have not finished testing everything but so far so good. I have 65,000 products so hopefully I do not need to check every single one of them! @pedalman Sure, I will look into doing something like that, once I can confirm that everything works as intended, as some of the devs here seem to think there might still be issues.
-
Hey guys! Just a word to talk about the full page cache in TB. I have been on Prestashop for about 3 years and a little more than a year now on TB. I much prefer my experience with TB than with Prestashop, especially support wise. The people here are great. I have ALWAYS had issues with speed with my site. I score high grades on various speed tests: image opimization, js and css optimization, etc. I have a site that sells comic books and graphic novels, so big images and lots of them is basically a must. As a result, despite using webp wherever I can, I always had issues with speed. TTFB (Time to First Byte) was always the worst. I have been struggling with this for years. It had become my holy grail - and a great source of frustrations. And tonight I had an epiphany. I was already using the full page cache in TB, with the redis server cache setup. It would improve my TTFB intermittently but on webpagetest.org, I would inevitably oscillate between an F (most times) or a C (very infrequently). I always cached all the hooks, that section is all green. I had used the controller section sparingly, mainly because I had little understanding of what it exactly cache. It is not clear I think from a pedestrian point of view. So I cached what I thought would not be a big deal. I was mostly afraid of caching something that should remain dynamic. And still struggled with TTFB. So tonight, I decided to cache everything in the Controllers section. And then ran several tests to see if it caused any issues. So far so good. And to my surprise, I now get a consistent A in webpagetest.org. Everything seems to work fine on both backend and front end. For years, I have bought modules after modules to supposedly help with caching, with worst results than the vanilla TB full page cache I was clearly not even using properly! On GTmetrix I get a Pagespeed score of B! 85%, which I never ever got close to and on YSlow, I score a 77%. Still room for improvement but lightyears ahead of what I used to get! My heavily filled with images site now loads in 2.5 to 3.5 seconds on average. All that to say, this is so far the best, most efficient cache system I have seen for a Prestashop style operation. You guys just need to explain better how it works because it really does work like fire! Thank you so much!!! Really!
-
@datakick Where would I find the place that generates this error message? I looked into shopping-cart.tpl, order-opc.tpl,order-carrier.tpl,order-address.tpl,errors.tpl but to no avail. I see where the error is generated in order-opc.tpl but it seems to call to authentication.tpl and while there are errors listed in there, nothing appears to be related to shipping.
-
@datakickThank you for the explanation. However, it used to work fine and I changed nothing. Out of desperation, as I am losing money hand over fist since customers cannot checkout, I decided to recreate ALL my carriers. Something has gone wrong with carriers. I tried to do lettermail for example, which has a weight limit of 500 grams. It worked. However, suddenly, the 30 kg limit appears and it will not let me save. The 30 kg limit is for another carrier and has nothing to do with lettermail and I never entered it in the first place. I think it is what is causing the 'weight' error. If I try to delete the 30 kg nonsense, it deletes my last entry for the 500 grams... It is totally bonkers!
-
I have the same error if people are not logged in: THE PRODUCT SELECTION CANNOT BE DELIVERED BY THE AVAILABLE CARRIER(S): IT IS TOO HEAVY. PLEASE AMEND YOUR CART TO LOWER ITS WEIGHT. If you are logged in BEFORE adding anything to cart, the error does not appear. And everything goes smooth. If you login AFTER adding anything to cart with an existing account, the error is there. However, payment goes through and the order is generated. If you are a guest or visitor, the error appears and it keeps appearing and screwing up payment even after they create an account. The payment goes through but the order is not created. Any help?
-
OK. It appears that the issue is related to guest or visitors logins - if a user is logged in with his account as a customer, there is no error message. However, if he first add items to his cart as a guest or visitor, until he actually logs in, the following error message appears: THE PRODUCT SELECTION CANNOT BE DELIVERED BY THE AVAILABLE CARRIER(S): IT IS TOO HEAVY. PLEASE AMEND YOUR CART TO LOWER ITS WEIGHT. No matter what shipping I set up, including pickup in store which has a limit of 1000 kg, this message appears... It prevents orders from being completed and it freaks customers out. Help!
-
I started having the same issues lately but I do not have Advanced stock management set. It used to work fine but intermittently, it will claim that the order is too heavy for the carriers, whereas it is not. I cannot find what is causing this, as no settings where changed for the carriers in a long time.
-
You need to create the province in Localizations>States It normally works flawlessly - I dunno why things went all wonky this week. Some was due to PHP 7.3, which might be an issue, some of it I cannot pinpoint yet.
-
You do not need a module for that - you can do it with the actual system and it works - at least it still does for me for that specific carrier type. And while we are on the subject, it would be cool if the language could be applied to the Carrier Name, because the laws here require that on the French site everything should be in French and the fact that only one name in one language is allowed makes things difficult... Here is my setup, if it can help you... Do not use the free shipping, just set the amount to zero. The free shipping thing is buggy and it yields weird results. It will appear free to customers anyways.
-
I just started having the same problem under TB 1.1.x. It used to work fine and it was not changed. But I get this error all the time now. It is intermittent but more often than not, the error appears.
-
Hi again! A new issue has popped up. Customers get the following message sometimes when attempting to check out: THERE IS 1 ERROR THE PRODUCT SELECTION CANNOT BE DELIVERED BY THE AVAILABLE CARRIER(S): IT IS TOO HEAVY. PLEASE AMEND YOUR CART TO LOWER ITS WEIGHT. I have searched the forum and some other users mentioned that issue but their fix do not seem to work for me at the moment. The weight is way below the limits in all cases and the settings are the same they have always been (and working without issue before). Even worst, the issue is intermittent - sometimes it happens, sometimes it doesn't and I have not been able to figure out the pattern. Anybody else has encountered this and managed to fix this issue? Losing lots of sales because most people just abandon their cart instead of contacting us.
-
URGENT: Yet another payment module not working
movieseals replied to movieseals's question in Technical help
Will do. I had gone to the website and downloaded the latest update, but it still has that issue. -
URGENT: Yet another payment module not working
movieseals replied to movieseals's question in Technical help
I misunderstood you. Rookie mistake. 😞 It works now. Thank you so much for your assistance! -
URGENT: Yet another payment module not working
movieseals replied to movieseals's question in Technical help
If I change line 51 with $this->module->execPayment($cart); now the entire site gives a 500 error. -
URGENT: Yet another payment module not working
movieseals replied to movieseals's question in Technical help
Here is the whole code. I put line 50 in red, and everything from 247: <?php /** * This file is part of module Interac Email Money Transfer * * @author Bellini Services <[email protected]> * @copyright 2007-2017 bellini-services.com * @license readme * * Your purchase grants you usage rights subject to the terms outlined by this license. * * You CAN use this module with a single, non-multi store configuration, production installation and unlimited test installations of PrestaShop. * You CAN make any modifications necessary to the module to make it fit your needs. However, the modified module will still remain subject to this license. * * You CANNOT redistribute the module as part of a content management system (CMS) or similar system. * You CANNOT resell or redistribute the module, modified, unmodified, standalone or combined with another product in any way without prior written (email) consent from bellini-services.com. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ if (!defined('_PS_VERSION_')) exit; class iemt extends PaymentModule { private $_html = ''; private $_postErrors = array(); public function __construct() { $this->name = 'iemt'; $this->tab = 'payments_gateways'; $this->version = '2.0.0'; $this->ps_versions_compliancy = array('min' => '1.6', 'max' < '1.7'); $this->author = 'Bellini Services'; $this->controllers = array('validation'); $this->is_eu_compatible = 0; $this->currencies = true; $this->currencies_mode = 'checkbox'; $this->need_instance = 1; $this->bootstrap = true; parent::__construct(); $this->displayName = $this->l('Interac Email Money Transfer'); $this->description = $this->l('Accepts payments by Interac Email Money Transfer'); $this->confirmUninstall = $this->l('Are you sure you want to delete your details ?'); } public function install() { if (!parent::install() OR !$this->registerHook('adminOrder') OR !$this->registerHook('header') OR !$this->registerHook('payment') OR !$this->registerHook('paymentReturn')) return false; /* Set database */ if (!Db::getInstance()->Execute('CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'interac_order` ( `id_order` int(10) unsigned NOT NULL, `challenge_answer` varchar(255) NOT NULL, PRIMARY KEY (`id_order`) ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8')) return false; copy(dirname(__FILE__).'/mails/en/iemt.html', dirname(__FILE__).'/../../mails/en/iemt.html'); copy(dirname(__FILE__).'/mails/en/iemt.txt', dirname(__FILE__).'/../../mails/en/iemt.txt'); if (!Configuration::get('INTERAC_OS_PENDING_PAYMENT')) { $orderState = new OrderState(); $orderState->send_email = true; $orderState->name = array(); $orderState->template = array(); foreach (Language::getLanguages() AS $language) { $orderState->name[$language['id_lang']] = 'Waiting for Interac Email Payment'; $orderState->template[$language['id_lang']] = 'iemt'; } $orderState->color = 'lightblue'; $orderState->hidden = false; $orderState->delivery = false; $orderState->logable = false; $orderState->invoice = false; if ($orderState->add()) copy(dirname(__FILE__).'/../../img/os/'.Configuration::get('PS_OS_CHEQUE').'.gif', dirname(__FILE__).'/../../img/os/'.(int)$orderState->id.'.gif'); Configuration::updateValue('INTERAC_OS_PENDING_PAYMENT', (int)$orderState->id); } Configuration::updateValue('INTERAC_PAYMENT_EMAIL', Configuration::get('PS_SHOP_EMAIL')); return true; } public function uninstall() { if (!parent::uninstall()) return false; return true; } public function getContent() { if (Tools::isSubmit('SubmitIEMT')) { $this->_postValidation(); if (!count($this->_postErrors)) $this->_postProcess(); else foreach ($this->_postErrors as $err) $this->_html .= $this->displayError($err); } else $this->_html .= '<br />'; $this->_html .= $this->_displayIemt(); $this->_html .= $this->renderForm(); return $this->_html; } protected function _postValidation() { if (Tools::isSubmit('SubmitIEMT')) { if (!Tools::getValue('INTERAC_PAYMENT_EMAIL')) $this->_postErrors[] = $this->l('The Payment Email is required.'); } } protected function _postProcess() { if (Tools::isSubmit('SubmitIEMT')) Configuration::updateValue('INTERAC_PAYMENT_EMAIL', pSQL(Tools::getValue('INTERAC_PAYMENT_EMAIL'))); $this->_html .= $this->displayConfirmation($this->l('Settings updated')); } protected function _displayIemt() { return $this->display(__FILE__, 'views/templates/hook/infos.tpl'); } public function renderForm() { $fields_form = array( 'form' => array( 'legend' => array( 'title' => $this->l('Contact details'), 'icon' => 'icon-envelope' ), 'input' => array( array( 'type' => 'text', 'label' => $this->l('Payment Email'), 'name' => 'INTERAC_PAYMENT_EMAIL', 'size' => 100, 'required' => true ), ), 'submit' => array( 'title' => $this->l('Save'), ) ), ); $helper = new HelperForm(); $helper->show_toolbar = false; $helper->table = $this->table; $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT')); $helper->default_form_language = $lang->id; $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0; $this->fields_form = array(); $helper->id = (int)Tools::getValue('id_carrier'); $helper->identifier = $this->identifier; $helper->submit_action = 'SubmitIEMT'; $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name; $helper->token = Tools::getAdminTokenLite('AdminModules'); $helper->tpl_vars = array( 'fields_value' => $this->getConfigFieldsValues(), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id ); return $helper->generateForm(array($fields_form)); } public function getConfigFieldsValues() { return array( 'INTERAC_PAYMENT_EMAIL' => Tools::getValue('INTERAC_PAYMENT_EMAIL', Configuration::get('INTERAC_PAYMENT_EMAIL')), ); } private function isCheckout() { //return true if the controller is in the array $controllers = array('order', 'order-opc', 'orderopc', 'quick-order'); $controller = Tools::getValue('controller'); if (in_array($controller, $controllers)) return true; else return false; } public function hookHeader() { if (!$this->active) return; $isCheckout = $this->isCheckout(); if (!$isCheckout) return; $this->context->controller->addJquery(); $this->context->controller->addJQueryPlugin('fancybox'); } public function hookPayment($params) { if (!$this->active) return; $validation_url = $this->context->link->getModuleLink($this->name, 'validation', array(), true); $this->context->smarty->assign(array( 'iemt_validation_url' => $validation_url, 'mess_error' => $this->l('Please provide a challenge answer'), 'this_path_iemt' => $this->getPathUri(), )); return $this->display(__FILE__, 'views/templates/front/payment.tpl'); } public function execPayment($cart_old) { if (!$this->active) return; $customer = $this->context->customer; $currency = $this->context->currency; $cart = $this->context->cart; $total = (float)$cart->getOrderTotal(true, Cart::BOTH); //todo: validate $challengeAnswer, redirect to payment page with error $challengeAnswer = pSQL(Tools::getValue('challenge')); //todo: validate $challengeAnswer, redirect to payment page with error $mailVars = array( '{shop_phone}' => Configuration::get('PS_SHOP_PHONE'), '{payment_email}' => Configuration::get('INTERAC_PAYMENT_EMAIL'), '{challenge_answer}' => $challengeAnswer, '{history_url}' => $this->context->link->getPageLink('history', true, $this->context->language->id, null, false, $this->context->shop->id), '{my_account_url}' => $this->context->link->getPageLink('my-account', true, $this->context->language->id, null, false, $this->context->shop->id), '{guest_tracking_url}' => $this->context->link->getPageLink('guest-tracking', true, $this->context->language->id, null, false, $this->context->shop->id), ); $this->validateOrder((int)$cart->id, Configuration::get('INTERAC_OS_PENDING_PAYMENT'), $total, $this->displayName, null, $mailVars, (int)$currency->id, false, $customer->secure_key, $this->context->shop); $order = new Order($this->currentOrder); if (Validate::isLoadedObject($order)) { Db::getInstance()->Execute(' INSERT INTO `'._DB_PREFIX_.'interac_order` (`id_order`, `challenge_answer`) VALUES ('.(int)$order->id.', \''.pSQL($challengeAnswer).'\')'); } // Redirect the user to the order confirmation page / history $redirect = $this->context->link->getPageLink('order-confirmation', true, null, array('id_order' => (int)$this->currentOrder, 'id_cart' => (int)$cart->id, 'key' => $customer->secure_key, 'id_module' => $this->id)); Tools::redirect($redirect); } public function hookPaymentReturn($params) { if (!$this->active) return; if ($params['objOrder']->module != $this->name) return; $id_order = $params['objOrder']->id; $this->context->smarty->assign(array( 'iemt_total_paid' => $params['objOrder']->total_paid, 'iemt_id_currency' => $params['objOrder']->id_currency, 'total' => $params['currency'].$params['total_to_pay'], 'challengeAnswer' => $this->_getChallengeAnswer((int)($id_order)), 'paymentEmail' => Configuration::get('INTERAC_PAYMENT_EMAIL'), 'shopPhone' => Configuration::get('PS_SHOP_PHONE'), )); $this->context->smarty->assign('order_name', $params['objOrder']->getUniqReference()); return $this->display(__FILE__, 'views/templates/front/confirmation.tpl'); } public function hookAdminOrder($params) { $order = new Order((int) ($params['id_order'])); $challengeAnswer = $this->_getChallengeAnswer((int)($order->id)); if (!$challengeAnswer) { return false; } $html = '<div class="col-lg-7"><div class="panel"><h3><i class="icon-money"></i> '.$this->l('Interac Challenge Answer').'</h3><div class="row">'. '<div style="float:left;">' . $this->l('Challenge Answer') . ' : ' . Tools::htmlentitiesUTF8($challengeAnswer) . '</div>'. '</div></div></div>'; return $html; } private function _getChallengeAnswer($id_order) { if (!(int)$id_order) return false; return Db::getInstance()->getValue(' SELECT `challenge_answer` FROM `'._DB_PREFIX_.'interac_order` WHERE `id_order` = '.(int)$id_order); } } -
Using Bellini's Interac module, which used to work fine, with the TB compatible version and TB 1.1.x - latest version. I did check the configuration table in the DB for INTERAC_OS_PENDING_PAYMENT and it had indeed the wrong order status, which I fixed, but unlike my other module, the customer still gets a 500 error and I get this in the logs: Decoded exception Too few arguments to function iemt::execPayment(), 0 passed in /home/zbookstore/public_html/modules/iemt/controllers/front/validation.php on line 51 and exactly 1 expected in file modules/iemt/iemt.php at line 237 Source file: modules/iemt/iemt.php 218: $this->context->controller->addJquery(); 219: $this->context->controller->addJQueryPlugin('fancybox'); 220: } 221: 222: public function hookPayment($params) 223: { 224: if (!$this->active) 225: return; 226: 227: $validation_url = $this->context->link->getModuleLink($this->name, 'validation', array(), true); 228: $this->context->smarty->assign(array( 229: 'iemt_validation_url' => $validation_url, 230: 'mess_error' => $this->l('Please provide a challenge answer'), 231: 'this_path_iemt' => $this->getPathUri(), 232: )); 233: 234: return $this->display(__FILE__, 'views/templates/front/payment.tpl'); 235: } 236: 237: public function execPayment($cart_old) 238: { 239: if (!$this->active) 240: return; 241: 242: $customer = $this->context->customer; 243: $currency = $this->context->currency; 244: $cart = $this->context->cart; 245: $total = (float)$cart->getOrderTotal(true, Cart::BOTH); 246: 247: //todo: validate $challengeAnswer, redirect to payment page with error Stack trace 1. modules/iemt/controllers/front/validation.php:51 source iemt->execPayment() 32: { 33: $cart = $this->context->cart; 34: if ($cart->id_customer == 0 || $cart->id_address_delivery == 0 || $cart->id_address_invoice == 0 || !$this->module->active) 35: Tools::redirect('index.php?controller=order&step=1'); 36: 37: // Check that this payment option is still available in case the customer changed his address just before the end of the checkout process 38: $authorized = false; 39: foreach (Module::getPaymentModules() as $module) 40: { 41: if ($module['name'] == 'iemt') 42: { 43: $authorized = true; 44: break; 45: } 46: } 47: 48: if (!$authorized) 49: die($this->module->l('This payment method is not available.', 'validation')); 50: 51: $this->module->execPayment(); 52: } 53:} 2. classes/controller/Controller.php:197 source IemtValidationModuleFrontController->postProcess() 178: } else { 179: $this->$property = $value; 180: } 181: } 182: 183: /** 184: * Starts the controller process 185: * 186: * @since 1.0.0 187: * @version 1.0.0 Initial version 188: */ 189: public function run() 190: { 191: $this->init(); 192: if ($this->checkAccess()) { 193: if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) { 194: $this->setMedia(); 195: } 196: 197: $this->postProcess(); 198: 199: if (!empty($this->redirect_after)) { 200: $this->redirect(); 201: } 202: 203: if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) { 204: $this->initHeader(); 205: } 206: 207: if ($this->viewAccess()) { 3. classes/controller/FrontController.php:255 source ControllerCore->run() 236: * @see Controller::run() 237: * @since 1.0.0 238: * 239: * @version 1.0.0 Initial version 240: */ 241: public function postProcess() 242: { 243: } 244: 245: /** 246: * Starts the controller process 247: * 248: * Overrides Controller::run() to allow full page cache 249: * 250: * @since 1.0.7 251: */ 252: public function run() 253: { 254: if (! PageCache::isEnabled()) { 255: return parent::run(); 256: } 257: 258: $debug = Configuration::get('TB_PAGE_CACHE_DEBUG'); 259: $cacheEntry = PageCache::get(); 260: if (! $cacheEntry->exists()) { 261: if ($debug) { 262: header('X-thirtybees-PageCache: MISS'); 263: } 264: return parent::run(); 265: } 4. classes/Dispatcher.php:852 source FrontControllerCore->run() 833: return; 834: } 835: break; 836: 837: default: 838: throw new PrestaShopException('Bad front controller chosen'); 839: } 840: 841: // Instantiate controller 842: try { 843: // Loading controller 844: $controller = Controller::getController($controllerClass); 845: 846: // Execute hook dispatcher 847: if (isset($paramsHookActionDispatcher)) { 848: Hook::exec('actionDispatcher', $paramsHookActionDispatcher); 849: } 850: 851: // Running controller 852: $controller->run(); 853: } catch (PrestaShopException $e) { 854: $e->displayMessage(); 855: } 856: } 857: 858: /** 859: * Retrieve the controller from url or request uri if routes are activated 860: * 861: * @param int|null $idShop 862: * 5. ./index.php:33 source DispatcherCore->dispatch() 14: * If you did not receive a copy of the license and are unable to 15: * obtain it through the world-wide-web, please send an email 16: * to [email protected] so we can send you a copy immediately. 17: * 18: * DISCLAIMER 19: * 20: * Do not edit or add to this file if you wish to upgrade PrestaShop to newer 21: * versions in the future. If you wish to customize PrestaShop for your 22: * needs please refer to https://www.thirtybees.com for more information. 23: * 24: * @author thirty bees <[email protected]> 25: * @author PrestaShop SA <[email protected]> 26: * @copyright 2017-2018 thirty bees 27: * @copyright 2007-2016 PrestaShop SA 28: * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 29: * PrestaShop is an internationally registered trademark & property of PrestaShop SA 30: */ 31: 32:require(dirname(__FILE__).'/config/config.inc.php'); 33:Dispatcher::getInstance()->dispatch();
-
URGENT: Some payment modules are unable to generate orders
movieseals replied to movieseals's question in Technical help
@datakick Thank you so much. I guess the PAYBYPHONE_OS_CALL got changed when we used an old backup - the order status was indeed wrong for some reason and even resetting the module had not fixed it, so changing it straight in the DB fixed it! Many thanks! -
URGENT: Some payment modules are unable to generate orders
movieseals replied to movieseals's question in Technical help
Perfect. Gives me a clearer *for me and my level of knowledge* clue to investigate! Thanks so much! -
URGENT: Some payment modules are unable to generate orders
movieseals replied to movieseals's question in Technical help
First, thank you so much for answering. So I need to change the order status ID? It used to work fine so I am not sure what changed there. This is line 46 $this->module->validateOrder($cart->id, Configuration::get('PAYBYPHONE_OS_CALL'), $total, $this->module->displayName, null, $mailVars, (int)$currency->id, false, $customer->secure_key); -
URGENT: Some payment modules are unable to generate orders
movieseals replied to movieseals's question in Technical help
Anybody? -
URGENT: Some payment modules are unable to generate orders
movieseals posted a question in Technical help
I get the following log and the customers get an error 500: Decoded exception Can't load Order status in file classes/module/PaymentModule.php at line 408 Source file: classes/module/PaymentModule.php 389: $this->context = Context::getContext(); 390: } 391: $this->context->cart = new Cart((int) $idCart); 392: $this->context->customer = new Customer((int) $this->context->cart->id_customer); 393: // The tax cart is loaded before the customer so re-cache the tax calculation method 394: $this->context->cart->setTaxCalculationMethod(); 395: 396: $this->context->language = new Language((int) $this->context->cart->id_lang); 397: $this->context->shop = ($shop ? $shop : new Shop((int) $this->context->cart->id_shop)); 398: ShopUrl::resetMainDomainCache(); 399: $idCurrency = $currencySpecial ? (int) $currencySpecial : (int) $this->context->cart->id_currency; 400: $this->context->currency = new Currency((int) $idCurrency, null, (int) $this->context->shop->id); 401: if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_delivery') { 402: $contextCountry = $this->context->country; 403: } 404: 405: $orderStatus = new OrderState((int) $idOrderState, (int) $this->context->language->id); 406: if (!Validate::isLoadedObject($orderStatus)) { 407: Logger::addLog('PaymentModule::validateOrder - Order Status cannot be loaded', 3, null, 'Cart', (int) $idCart, true); 408: throw new PrestaShopException('Can\'t load Order status'); 409: } 410: 411: if (!$this->active) { 412: Logger::addLog('PaymentModule::validateOrder - Module is not active', 3, null, 'Cart', (int) $idCart, true); 413: die(Tools::displayError()); 414: } 415: 416: // Does order already exists ? 417: if (Validate::isLoadedObject($this->context->cart) && $this->context->cart->OrderExists() == false) { 418: if ($secureKey !== false && $secureKey != $this->context->cart->secure_key) { Stack trace 1. modules/paybyphone/controllers/front/validation.php:46 source PaymentModuleCore->validateOrder(arguments) 2. classes/controller/Controller.php:197 source paybyphoneValidationModuleFrontController->postProcess() 178: } else { 179: $this->$property = $value; 180: } 181: } 182: 183: /** 184: * Starts the controller process 185: * 186: * @since 1.0.0 187: * @version 1.0.0 Initial version 188: */ 189: public function run() 190: { 191: $this->init(); 192: if ($this->checkAccess()) { 193: if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) { 194: $this->setMedia(); 195: } 196: 197: $this->postProcess(); 198: 199: if (!empty($this->redirect_after)) { 200: $this->redirect(); 201: } 202: 203: if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) { 204: $this->initHeader(); 205: } 206: 207: if ($this->viewAccess()) { 3. classes/controller/FrontController.php:253 source ControllerCore->run() 234: * @see Controller::run() 235: * @since 1.0.0 236: * 237: * @version 1.0.0 Initial version 238: */ 239: public function postProcess() 240: { 241: } 242: 243: /** 244: * Starts the controller process 245: * 246: * Overrides Controller::run() to allow full page cache 247: * 248: * @since 1.0.7 249: */ 250: public function run() 251: { 252: if (! PageCache::isEnabled()) { 253: return parent::run(); 254: } 255: 256: $debug = Configuration::get('TB_PAGE_CACHE_DEBUG'); 257: $cacheEntry = PageCache::get(); 258: if (! $cacheEntry->exists()) { 259: if ($debug) { 260: header('X-thirtybees-PageCache: MISS'); 261: } 262: return parent::run(); 263: } 4. classes/Dispatcher.php:852 source FrontControllerCore->run() 833: return; 834: } 835: break; 836: 837: default: 838: throw new PrestaShopException('Bad front controller chosen'); 839: } 840: 841: // Instantiate controller 842: try { 843: // Loading controller 844: $controller = Controller::getController($controllerClass); 845: 846: // Execute hook dispatcher 847: if (isset($paramsHookActionDispatcher)) { 848: Hook::exec('actionDispatcher', $paramsHookActionDispatcher); 849: } 850: 851: // Running controller 852: $controller->run(); 853: } catch (PrestaShopException $e) { 854: $e->displayMessage(); 855: } 856: } 857: 858: /** 859: * Retrieve the controller from url or request uri if routes are activated 860: * 861: * @param int|null $idShop 862: * 5. ./index.php:33 source DispatcherCore->dispatch() 14: * If you did not receive a copy of the license and are unable to 15: * obtain it through the world-wide-web, please send an email 16: * to [email protected] so we can send you a copy immediately. 17: * 18: * DISCLAIMER 19: * 20: * Do not edit or add to this file if you wish to upgrade PrestaShop to newer 21: * versions in the future. If you wish to customize PrestaShop for your 22: * needs please refer to https://www.thirtybees.com for more information. 23: * 24: * @author thirty bees <[email protected]> 25: * @author PrestaShop SA <[email protected]> 26: * @copyright 2017-2018 thirty bees 27: * @copyright 2007-2016 PrestaShop SA 28: * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 29: * PrestaShop is an internationally registered trademark & property of PrestaShop SA 30: */ 31: 32:require(dirname(__FILE__).'/config/config.inc.php'); 33:Dispatcher::getInstance()->dispatch() -
Hi! Not it is not meant to speed up the site - I do have another module to do a full page cache and I have found that used in conjunction with the quite fast native TB help improve the speed of loading a little. There is an option to punch holes in the full page caches for modules, so I did that and it fixed the issue! Thank you so much.
-
You oriented me towards a solution. Thank you very much!