keyword suggestion build
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!
- mahammadareef
- Posts: 54
- Joined: 14 Oct 2022, 11:54
keyword suggestion build
want to show the keyword suggestion in aimeos search like ai-catsuggest package,,
I BUILT schema like this
and also created a new domain for the keyword schema
I hope the steps which I followed till now are correct.......
conditions are
1. the single product can have n number of keywords
2. keywords should be unique
and it also stored in mshop_product_list in the following columns like this
key -> keyword|default|11
type -> default
domain -> keyword
refid -> 50
I want to know the further steps to achieve this .................
I BUILT schema like this
Code: Select all
return array(
'table' => array(
'mshop_keyword' => function( \Aimeos\Upscheme\Schema\Table $table ) {
$table->engine = 'InnoDB';
$table->id()->primary( 'pk_mskey_id' );
$table->string( 'siteid' );
$table->string( 'keyword' );
$table->smallint( 'status' )->default( 1 );
$table->meta();
$table->unique( ['siteid','keyword'], 'unq_mskey_sid_keyword' );
$table->index( ['siteid'], 'idx_mskey_sid' );
$table->index( ['status', 'siteid'], 'idx_mskey_status_sid' );
},
),
and also created a new domain for the keyword schema
Code: Select all
public function up()
{
$this->info( 'Creating keyword schema', 'vv' );
$db = $this->db( 'db-myKeywordDomain' );
foreach( $this->paths( 'default/schema/keyword.php' ) as $filepath )
{
if( ( $list = include( $filepath ) ) === false ) {
throw new \RuntimeException( sprintf( 'Unable to get schema from file "%1$s"', $filepath ) );
}
foreach( $list['table'] ?? [] as $name => $fcn ) {
$db->table( $name, $fcn );
}
}
}
I hope the steps which I followed till now are correct.......
conditions are
1. the single product can have n number of keywords
2. keywords should be unique
and it also stored in mshop_product_list in the following columns like this
key -> keyword|default|11
type -> default
domain -> keyword
refid -> 50
I want to know the further steps to achieve this .................
Re: keyword suggestion build
If you want to manage the keyworks from the backend, you should create a manager and an item implementation.
In any case, you need to write code to add records to the table and to the mshop_product_list table.
In any case, you need to write code to add records to the table and to the mshop_product_list table.
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