several product direct to the same product
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!
-
- Expert
- Posts: 274
- Joined: 27 Jun 2019, 16:19
several product direct to the same product
Hi )
Versions information:
Problem description:
I have four similar products, this is generated links to their detail pages:
/Jade_Blau_Weis_glanz_ADON_Blau/29
/Jade_Blau_Weis_glanz_ADON_Blau/30
/Jade_Blau_Weis_glanz_ADON_Blau/31
/Jade_Blau_Weis_glanz_ADON_Blau/32
The problem is that the output on detail page is always only for one product! Seems it doesn't use id of product..
I looked at
and output of dumps is only $name, $id and $code variables are null.
Please, give me idea where the problem may be ?
Versions information:
Code: Select all
aimeos/ai-admin-jqadm 2019.10.6 Aimeos ai-admin-jqadm extension
aimeos/ai-admin-jsonadm 2019.10.2 Aimeos ai-admin-jsonadm extension
aimeos/ai-client-html 2019.10.10 Aimeos ai-client-html extension
aimeos/ai-client-jsonapi 2019.10.2 Aimeos JSON API extension
aimeos/ai-controller-frontend 2019.10.3 Aimeos ai-controller-frontend extension
aimeos/ai-controller-jobs 2019.10.4 Aimeos ai-controller-jobs extension
aimeos/ai-gettext 2019.10.1 Aimeos Gettext extension
aimeos/ai-laravel 2019.10.2 Laravel adapter for Aimeos web shops and e-commerce solutions
aimeos/ai-payments 2019.10.1 Payment extension for Aimeos web shops and e-commerce solutions
aimeos/ai-swiftmailer 2019.10.1 SwiftMailer adapter for Aimeos web shops and e-commerce solutions
aimeos/aimeos-core 2019.10.7 Full-featured e-commerce components for high performance online shops
aimeos/aimeos-laravel 2019.10.1 Professional, full-featured and high performance Laravel e-commerce package for online shops and complex B2B projects
I have four similar products, this is generated links to their detail pages:
/Jade_Blau_Weis_glanz_ADON_Blau/29
/Jade_Blau_Weis_glanz_ADON_Blau/30
/Jade_Blau_Weis_glanz_ADON_Blau/31
/Jade_Blau_Weis_glanz_ADON_Blau/32
The problem is that the output on detail page is always only for one product! Seems it doesn't use id of product..
I looked at
Code: Select all
$code = $config->get( 'client/html/catalog/detail/prodcode-default' );
$name = $view->param( 'd_name' );
$cntl = \Aimeos\Controller\Frontend::create( $context, 'product' )->uses( $domains );
dump($name);
dump($id);
dump($code);
$productItem = ( $id ? $cntl->get( $id ) : ( $code ? $cntl->find( $code ) : $cntl->resolve( $name ) ) );
$this->addMetaItems( $productItem, $expire, $tags );
$products = $productItem->getRefItems( 'product' );
$this->addMetaItems( $products, $expire, $tags );
Please, give me idea where the problem may be ?
Re: several product direct to the same product
Your product names should be unique so they can be distinguished by their name. If this is not the case, you can use this configuration to force using the "d_prodid" parameter instead of the name:
https://aimeos.org/docs/Configuration/C ... url/filter
https://aimeos.org/docs/Configuration/C ... url/filter
Code: Select all
client/html/catalog/detail/url/filter = []
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