Currency Session

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!
gkarthick87
Posts: 4
Joined: 15 Apr 2024, 09:39

Currency Session

Post by gkarthick87 » 17 Apr 2024, 15:44

Hi,

I have selected the currency and I want to maintain this selection using session instead of using url parameter like "?locale=en&currency=USD" on each time redirecting from one page to another page.

Please advise on it.

Thanks

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

Re: Currency Session

Post by aimeos » 19 Apr 2024, 12:41

No, it's not possible to store the locale and currency in the session and remove them from the URL. This would cause massive caching problems where pages with wrong languages/currencies would be served because the URL isn't unique any more.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

gkarthick87
Posts: 4
Joined: 15 Apr 2024, 09:39

Re: Currency Session

Post by gkarthick87 » 19 Apr 2024, 14:01

Okay. Understood.
Then I want to set a cookie to keep the browser session on to redirect the repeat visitor to the old selection so for that how can I set the cookie to maintain the previous currency selection?

Thanks

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

Re: Currency Session

Post by aimeos » 22 Apr 2024, 11:48

Implement a Laravel middleware that does the redirect based on the cookie content.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply