Difficulty Adding a Custom Field in Aimeos Models Item and Issues with Saving
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 48
- Joined: 30 Apr 2023, 12:46
Difficulty Adding a Custom Field in Aimeos Models Item and Issues with Saving
I am currently working on extending the Aimeos e-commerce framework by adding a custom field to the order item. I have successfully created the corresponding database column by overwriting order.php file in the setup/default/schema directory. Additionally, I've declared the necessary setter and getter methods for the new field in the Standard.php file located in MShop/Order/Item.
I've followed the suggestions provided by a fellow member in a related forum post post5939.html However, I'm encountering difficulties in saving the new field using. Despite attempting various implementations, the data doesn't persist when using this method.
I had to with using after the default , but this approach involves two separate database transactions, which is not an ideal solution.
I would greatly appreciate any guidance or insights from the community on the best practices for adding custom fields to the order item and ensuring their successful persistence using the method.
php8.1 , laravel, linux
I've followed the suggestions provided by a fellow member in a related forum post post5939.html However, I'm encountering difficulties in saving the new field using
Code: Select all
$manager->save(...)
I had to with using
Code: Select all
$context->db()->update(...)
Code: Select all
$manager->save(...)
I would greatly appreciate any guidance or insights from the community on the best practices for adding custom fields to the order item and ensuring their successful persistence using the
Code: Select all
$manager->save(...)
php8.1 , laravel, linux
Re: Difficulty Adding a Custom Field in Aimeos Models Item and Issues with Saving
It's much simpler, just read this article:
https://aimeos.org/docs/latest/models/extend-managers/
https://aimeos.org/docs/latest/models/extend-managers/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

-
- Posts: 48
- Joined: 30 Apr 2023, 12:46