Saving delivery or payment service error

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
whatdaro
Posts: 42
Joined: 19 May 2021, 17:48

Saving delivery or payment service error

Post by whatdaro » 23 Nov 2021, 15:01

Aimeos Ver: 2021.10.2
OS: Linux

hi Aimeos team,
I'm trying to save new delivery and payment services however they fail when I include price information.
If I create a new service without price information it completes and saves fine.
When I enter a price and try to save it fails with this error:

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'value' cannot be null:
INSERT INTO "mshop_price" (
"type", "currencyid", "domain", "label",
"quantity", "value", "costs", "rebate", "taxrate",
"status", "mtime", "editor", "siteid", "ctime"
) VALUES (
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
)
["default","AUD","service","",1,null,"888.00","0.00","\"\":\"20.00\"",1,"2021-11-23 14:51:34","jl@somewhere.com","1.","2021-11-23 14:51:34"]
#0 /var/www/html/ecom/shopten/vendor/aimeos/aimeos-core/lib/mshoplib/src/MShop/Price/Manager/Standard.php(511): Aimeos\MW\DB\Statement\DBAL\Prepared->execute()



I believe the problem is with this file \vendor\aimeos\aimeos-core\lib\mshoplib\src\MShop\Price\Manager\Standard.php
this line:

$stmt->bind( $idx++, $item->getValue() );
is retrieving a null value. I've tried entering values in all available fields for entry form in the admin control panel, but still have the issue.
Could you please let me know where this getValue() function is trying to retrieve the data from, thanks.

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: Saving delivery or payment service error

Post by aimeos » 25 Nov 2021, 13:55

You use PostgreSQL, don't you?

The mshop_price.value column already allows NULL values for ~4 month, so it's included in 2021.10.x:
https://github.com/aimeos/aimeos-core/b ... ce.php#L48

Just check:
- Run "php artisan aimeos:setup" to make sure the tables are up to date
- Does mshop_price.value actually allow NULL values in the database?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
whatdaro
Posts: 42
Joined: 19 May 2021, 17:48

Re: Saving delivery or payment service error

Post by whatdaro » 25 Nov 2021, 19:12

aimeos wrote: 25 Nov 2021, 13:55 You use PostgreSQL, don't you?

Just check:
- Run "php artisan aimeos:setup" to make sure the tables are up to date
- Does mshop_price.value actually allow NULL values in the database?
I'm using MariaDB
I checked mshop_price.value was not set up to allow NULL.
I did do an Aimeos update but for some reason this table was not updated.

I ran "php artisan aimeos:setup", now it is working as expected, is this command part of the update process?

thanks for your help.

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: Saving delivery or payment service error

Post by aimeos » 26 Nov 2021, 07:45

whatdaro wrote: 25 Nov 2021, 19:12 I ran "php artisan aimeos:setup", now it is working as expected, is this command part of the update process?
Yes, if you update, you have to run this command.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply