creating managers
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!
Re: creating managers
Run this command to create/update/migrate the table structure and data:
Code: Select all
php artisan aimeos:setup
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: creating managers
Thank you, knowing of the command made me check closer what I did wrong.
I got confused by the namespace Aimeos\Upscheme\Task and had placed my task inside the directory 'src\Aimeos\Upscheme\Task' instead of 'setup\default'.
I got confused by the namespace Aimeos\Upscheme\Task and had placed my task inside the directory 'src\Aimeos\Upscheme\Task' instead of 'setup\default'.
- mahammadareef
- Posts: 54
- Joined: 14 Oct 2022, 11:54
Re: creating managers
Code: Select all
public function search( \Aimeos\Base\Criteria\Iface $search, array $ref = [], int &$total = null ) : \Aimeos\Map
{
$context = $this->context();
$conn = $context->db( $this->getResourceName() );
$items = [];
$required = ['contact'];
$level = \Aimeos\MShop\Locale\Manager\Base::SITE_SUBTREE;
$level = $context->config()->get( 'mshop/contact/manager/sitemode', $level );
$cfgPathSearch = 'mshop/contact/manager/search';
$cfgPathCount = 'mshop/contact/manager/count';
$results = $this->searchItemsBase( $conn, $search, $cfgPathSearch, $cfgPathCount,
$required, $total, $level );
// dd($results);
try
{
while( ( $row = $results->fetch() ) !== null ) {
[quote]$items[$row['contact.id']] = $this->applyFilter( $this->createItemBase( $row ) );[/quote]
}
}
catch( \Exception $e )
{
$results->finish();
throw $e;
}
// dd(map( $items ));
return map( $items );
}
this is my search code contact/manager/standard class , where iam getting
inUndefined array key "contact.id"
#0 D:\laragon\www\laravel-project\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(259): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'Undefined array...', 'D:\\laragon\\www\\...', 267)
line ....$items[$row['contact.id']] = $this->applyFilter( $this->createItemBase( $row ) );
please help me solve this
Re: creating managers
The column is only named "contact.id" if you use this as alias in your SQL statement in the manager configuration, e.g.:
Code: Select all
SELECT "id" AS "contact.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
-
- Posts: 1
- Joined: 07 Feb 2023, 19:14
Re: creating manager and admin panel
I'm having trouble creating a template.aimeos wrote: ↑14 Nov 2022, 17:27 Create an Aimeos migration first in the ./setup/default/schema/contact.php directory of your extension so your table will be automatically created and updated like this one:
https://github.com/aimeos/aimeos-core/b ... review.php
The corresponding setup task should be like this one in the ./setup/Contact.php directory of your extension:
https://github.com/aimeos/aimeos-core/b ... Review.php
Documentation for migrations and setup tasks is available here:
https://aimeos.org/docs/latest/infrastr ... igrations/
Next, create a manager and item for your new data domain in ./src/MShop/Contact/Manager/Standard.php, ./src/Contact/Item/Standard.php and ./src/MShop/Contact/Exception.php like this one:
https://github.com/aimeos/aimeos-core/t ... hop/Review
You can copy, paste and adapt the files. The corresponding config must be in ./config/mshop/contact.php and should look like this one:
https://github.com/aimeos/aimeos-core/b ... review.php
Finally, create the class file for the admin backend in ./src/Admin/JQAdm/Contact/Standard.php like this one in your extension:
https://github.com/aimeos/ai-admin-jqad ... andard.php
Create the corresponding templates like here:
https://github.com/aimeos/ai-admin-jqad ... adm/review
Configure the permissions and navbar entry of your new admin backend panel like here in the ./config/admin/jqadm/ directory of your extension:
https://github.com/aimeos/ai-admin-jqad ... dmin/jqadm
After doing it, a white page is displayed and the template does not load, even though I have placed the list.php and item.php files in the templates/admin/jqadm/<my panel name> directory of my extension. Please help me
Re: creating managers
This is most likely due to a PHP or VueJS error. Remove everything from your templates and add parts one by one to see where the error occurs.
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