Pilou Posted September 27, 2022 Posted September 27, 2022 Hi, I tried to migrate a Ps 1.6.24 to Tb 1.4 Bleeding Edge The migration worked perfectly. Now, I wanted to install Mollie module payment. Install ok, first config ok and then if I choose to configure it again, I have a 500 error With Debug mode ON, I have this Error Class 'AttributeCore' not found in file /home/*****/public_html/_thirtybees/modules/mollie/src/Builder/FormBuilder.php at line 420 Source file: /home/*****/public_html/_thirtybees/modules/mollie/src/Builder/FormBuilder.php 401: $input[] = [ 402: 'type' => 'mollie-methods', 403: 'name' => Config::METHODS_CONFIG, 404: 'paymentMethods' => $molliePaymentMethods, 405: 'countries' => $this->countryService->getActiveCountriesList(), 406: 'tab' => $generalSettings, 407: 'onlyOrderMethods' => array_merge(Config::KLARNA_PAYMENTS, ['voucher']), 408: 'displayErrors' => Configuration::get(Config::MOLLIE_DISPLAY_ERRORS), 409: 'methodDescription' => TagsUtility::ppTags( 410: $this->module->l('Click [1]here[/1] to read more about the differences between the Payment and Orders API.', self::FILE_NAME), 411: [ 412: $this->module->display($this->module->getPathUri(), 'views/templates/admin/mollie_method_info.tpl'), 413: ] 414: ), 415: 'showCustomLogo' => Configuration::get(Config::MOLLIE_SHOW_CUSTOM_LOGO), 416: 'customLogoUrl' => $this->creditCardLogoProvider->getLogoPathUri() . "?{$dateStamp}", 417: 'customLogoExist' => $this->creditCardLogoProvider->logoExists(), 418: 'voucherCategory' => Configuration::get(Config::MOLLIE_VOUCHER_CATEGORY), 419: 'categoryList' => \Category::getCategories($this->module->getContext()->language->id, true, false), 420: 'productAttributes' => Attribute::getAttributes($this->module->getContext()->language->id), 421: 'klarnaPayments' => Config::KLARNA_PAYMENTS, 422: 'klarnaStatuses' => [Config::MOLLIE_STATUS_KLARNA_AUTHORIZED, Config::MOLLIE_STATUS_KLARNA_SHIPPED], 423: ]; 424: 425: return $input; 426: } 427: 428: protected function getAdvancedSettingsSection() 429: { 430: $advancedSettings = 'advanced_settings'; Line 419 is in red.. Have an idea how to correct this please ? Kind regards, Pilou
0 datakick Posted September 28, 2022 Posted September 28, 2022 edit this line https://github.com/mollie/PrestaShop1.6/blob/a6a4602d0901c050d509acc18664de2a1ea91e3b/src/Builder/FormBuilder.php#L15 and change it from use AttributeCore as Attribute; to use ProductAttribute as Attribute;
0 Pilou Posted September 29, 2022 Author Posted September 29, 2022 Hi datakick, Thanks a lot, it finaly works. I made a test order and the result in my BO and in the customer account is "Awaiting payment by bank check" in place of Payment accepted or something like that. Where can I correct this please ? Kind regards, Pilou
0 datakick Posted September 29, 2022 Posted September 29, 2022 probably store misconfiguration. Look into your db: select name, value from tb_configuration where name like 'PS_OS_%' This will show you mapping for hard-coded/build-in order states. In my case, it says that PS_OS_PAYMENT = 1 Modules and core will use order state with id 1 when the order is paid. Now check that this ID value matches the correct order state. In my case it matches, id 1 == Payment accepted. I assume in your case it will point to the wrong status. The fix is to update data in tb_configuration table. 1
0 Pilou Posted October 4, 2022 Author Posted October 4, 2022 Hello, I have another error with the Mollie module.. ThirtyBeesException Property OrderState->name is empty in file /home/***/public_html/_thirtybees/classes/ObjectModel.php at line 1143 Source file: /home/***/public_html/_thirtybees/classes/ObjectModel.php 1124: 1125: // If the object has not been loaded in multilanguage, then the value is the one for the current language of the object 1126: if (!is_array($values)) { 1127: $values = [$this->id_lang => $values]; 1128: } 1129: 1130: // The value for the default must always be set, so we put an empty string if it does not exists 1131: if (!isset($values[$idLangDefault])) { 1132: $values[$idLangDefault] = ''; 1133: } 1134: 1135: foreach ($values as $idLang => $value) { 1136: if (is_array($this->update_fields) && empty($this->update_fields[$field][$idLang])) { 1137: continue; 1138: } 1139: 1140: $message = $this->validateField($field, $value, $idLang); 1141: if ($message !== true) { 1142: if ($die) { 1143: throw new PrestaShopException($message); 1144: } 1145: 1146: return $errorReturn ? $message : false; 1147: } 1148: } 1149: } 1150: 1151: return true; 1152: } 1153: Stack trace 1. classes/ObjectModel.php:424 source ObjectModelCore->validateFieldsLang() 2. classes/ObjectModel.php:854 source ObjectModelCore->getFieldsLang() 3. modules/mollie/src/Service/SettingsSaveService.php:329 source ObjectModelCore->update() 4. modules/mollie/src/Service/SettingsSaveService.php:321 source Mollie\Service\SettingsSaveService->updateKlarnaStatuses(arguments) 5. modules/mollie/src/Service/SettingsSaveService.php:217 source Mollie\Service\SettingsSaveService->handleKlarnaInvoiceStatus() 6. modules/mollie/mollie.php:254 source Mollie\Service\SettingsSaveService->saveSettings(arguments) 7. controllers/admin/AdminModulesController.php:1660 source Mollie->getContent() 8. controllers/admin/AdminModulesController.php:1523 source AdminModulesControllerCore->postProcessCallback() 9. classes/controller/Controller.php:204 source AdminModulesControllerCore->postProcess() 10. classes/Dispatcher.php:861 source ControllerCore->run() 11. admin312vvy24f/index.php:58 source DispatcherCore->dispatch() Can you help me once more please ? Kind regards, Pilou
Question
Pilou
Hi,
I tried to migrate a Ps 1.6.24 to Tb 1.4 Bleeding Edge
The migration worked perfectly.
Now, I wanted to install Mollie module payment.
Install ok, first config ok and then if I choose to configure it again, I have a 500 error
With Debug mode ON, I have this
Error Class 'AttributeCore' not found in file /home/*****/public_html/_thirtybees/modules/mollie/src/Builder/FormBuilder.php at line 420 Source file: /home/*****/public_html/_thirtybees/modules/mollie/src/Builder/FormBuilder.php 401: $input[] = [ 402: 'type' => 'mollie-methods', 403: 'name' => Config::METHODS_CONFIG, 404: 'paymentMethods' => $molliePaymentMethods, 405: 'countries' => $this->countryService->getActiveCountriesList(), 406: 'tab' => $generalSettings, 407: 'onlyOrderMethods' => array_merge(Config::KLARNA_PAYMENTS, ['voucher']), 408: 'displayErrors' => Configuration::get(Config::MOLLIE_DISPLAY_ERRORS), 409: 'methodDescription' => TagsUtility::ppTags( 410: $this->module->l('Click [1]here[/1] to read more about the differences between the Payment and Orders API.', self::FILE_NAME), 411: [ 412: $this->module->display($this->module->getPathUri(), 'views/templates/admin/mollie_method_info.tpl'), 413: ] 414: ), 415: 'showCustomLogo' => Configuration::get(Config::MOLLIE_SHOW_CUSTOM_LOGO), 416: 'customLogoUrl' => $this->creditCardLogoProvider->getLogoPathUri() . "?{$dateStamp}", 417: 'customLogoExist' => $this->creditCardLogoProvider->logoExists(), 418: 'voucherCategory' => Configuration::get(Config::MOLLIE_VOUCHER_CATEGORY), 419: 'categoryList' => \Category::getCategories($this->module->getContext()->language->id, true, false), 420: 'productAttributes' => Attribute::getAttributes($this->module->getContext()->language->id), 421: 'klarnaPayments' => Config::KLARNA_PAYMENTS, 422: 'klarnaStatuses' => [Config::MOLLIE_STATUS_KLARNA_AUTHORIZED, Config::MOLLIE_STATUS_KLARNA_SHIPPED], 423: ]; 424: 425: return $input; 426: } 427: 428: protected function getAdvancedSettingsSection() 429: { 430: $advancedSettings = 'advanced_settings';
Line 419 is in red..
Have an idea how to correct this please ?
Kind regards,
Pilou
5 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now