Emails : link to product detail leads to 404

Help for integrating the Laravel package
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!
User avatar
aimeos
Administrator
Posts: 7882
Joined: 01 Jan 1970, 00:00

Re: Emails : link to product detail leads to 404

Post by aimeos » 07 Jul 2019, 09:39

The Laravel router is still buggy and uses arbitrary GET parameters for optional URL parameters. The URLs in the e-mails now contain the language to show the pages to the users in their language. To work around this, you should use "{locale}" as part of the shop routes (maybe also optional and at the end). Another option would be that we add an empty d_pos parameter as workaround.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
aimeos
Administrator
Posts: 7882
Joined: 01 Jan 1970, 00:00

Re: [SOLVED] Emails : link to product detail leads to 404

Post by aimeos » 07 Jul 2019, 12:35

We've added empty default values for d_prodid and d_pos as workaround for Laravel so after updating, you should get:

Code: Select all

baseurl/shop/Label//?site=default&locale=fr&currency=EUR
But the URLs aren't nice. On the command line we don't really know if the additional parameters are required or not. Therefore, a new configuration setting exists which you can use to filter out those parameters you don't need:

Code: Select all

client/html/catalog/detail/url/filter => ['d_prodid', 'site', 'locale', 'currency']
Afterwards, you should have URLs like "baseurl/shop/Label" even in the e-mails. Can you confirm?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
aimeos
Administrator
Posts: 7882
Joined: 01 Jan 1970, 00:00

Re: [SOLVED] Emails : link to product detail leads to 404

Post by aimeos » 07 Jul 2019, 13:05

To test the new code use:

Code: Select all

composer req "aimeos/ai-client-html:2019.07.x-dev"
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
aimeos
Administrator
Posts: 7882
Joined: 01 Jan 1970, 00:00

Re: Emails : link to product detail leads to 404

Post by aimeos » 08 Jul 2019, 09:40

True, haven't thought about that and the code contains an array_flip() to be able to compare keys now.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply