Override ext/ai-laravel
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Override ext/ai-laravel
Hi
I am trying to override this file here >> ext/ai-laravel/lib/custom/config/mshop/customer.php
is that possible I want to add it to my own ext folder
please help
Thanks
I am trying to override this file here >> ext/ai-laravel/lib/custom/config/mshop/customer.php
is that possible I want to add it to my own ext folder
please help
Thanks
Re: Override ext/ai-laravel
Yes, create a file "mshop.php" in the "./lib/custom/config/" directory of your extension with the same array structure and add the SQL statements you want to overwrite.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Override ext/ai-laravel
Thanks
What about the files here
Ext/ai-Laravel/lib/src/Mshop/Customer/Manager/Laravel.php. Can I over ride these ??
What about the files here
Ext/ai-Laravel/lib/src/Mshop/Customer/Manager/Laravel.php. Can I over ride these ??
Re: Override ext/ai-laravel
I created that file mshop.php and I changed the query but it's still not working ? Does it suppose to be mshop.php ?
Re: Override ext/ai-laravel
You can overwrite the manager class to. Create a new class in your extension in the
./lib/custom/src/MShop/Customer/Manager/Myproject.php
extend from
\Aimeos\MShop\Customer\Manager\Laravel
and overwrite the methods you need. Afterwards, configure your shop to use your new class with
https://aimeos.org/docs/Configuration/C ... nager/name
./lib/custom/src/MShop/Customer/Manager/Myproject.php
extend from
\Aimeos\MShop\Customer\Manager\Laravel
and overwrite the methods you need. Afterwards, configure your shop to use your new class with
https://aimeos.org/docs/Configuration/C ... nager/name
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Override ext/ai-laravel
what about this
I created that file mshop.php and I changed the query but it's still not working ? Does it suppose to be mshop.php ?
its still doesnt work.
I am trying to do the command line :
php artisan aimeos:account test@email.com --admin
and I am getting an error coming from ext/ai-laravel/custom/config/mshop/customer.php , ( I dont want to edit this file here to fix the error) I need to override it
so I override it in my ext/mydir/lib/custom/config/mshop.php but its not picking up that one?
I created that file mshop.php and I changed the query but it's still not working ? Does it suppose to be mshop.php ?
its still doesnt work.
I am trying to do the command line :
php artisan aimeos:account test@email.com --admin
and I am getting an error coming from ext/ai-laravel/custom/config/mshop/customer.php , ( I dont want to edit this file here to fix the error) I need to override it
so I override it in my ext/mydir/lib/custom/config/mshop.php but its not picking up that one?
Re: Override ext/ai-laravel
To enforce the correct order, please add "ai-laravel" to the "depends" section in the manifest.php of your project specific extension:
Here's an example file for your "./ext/mydir/lib/custom/config/mshop.php":
Code: Select all
'depends' => array(
'aimeos-core',
'ai-admin-extadm',
'ai-admin-jqadm',
'ai-admin-jsonadm',
'ai-client-html',
'ai-client-jsonapi',
'ai-controller-jobs',
'ai-laravel',
),
Code: Select all
<?php
return array(
'customer' => array(
'manager' => array(
'laravel' => array(
'insert' => array(
'ansi' => '
INSERT INTO "users" (
"siteid", "name", "company", "vatid", "salutation", "title",
"firstname", "lastname", "address1", "address2", "address3",
"postal", "city", "state", "countryid", "langid", "telephone",
"telefax", "website", "email", "longitude", "latitude", "label",
"birthday", "status", "vdate", "password",
"updated_at", "editor", "created_at"
) VALUES (
?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?
)
',
),
'update' => array(
'ansi' => '
UPDATE "users"
SET "siteid" = ?, "name" = ?, "company" = ?, "vatid" = ?,
"salutation" = ?, "title" = ?, "firstname" = ?, "lastname" = ?,
"address1" = ?, "address2" = ?, "address3" = ?, "postal" = ?,
"city" = ?, "state" = ?, "countryid" = ?, "langid" = ?,
"telephone" = ?, "telefax" = ?, "website" = ?, "email" = ?,
"longitude" = ?, "latitude" = ?, "label" = ?, "birthday" = ?,
"status" = ?, "vdate" = ?, "password" = ?, "updated_at" = ?, "editor" = ?
WHERE "id" = ?
',
),
),
),
),
);
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star