Page 1 of 2

problem with second price of the products

Posted: 07 Feb 2022, 16:16
by crazyforester
Hi,
I have the following :
aimeos 21.10.4
TYPO3 10.4.21
I have a problem with the currency in the basket. I have products with two currencies.'///
Locale selector works fine after selection of the second currency. Problem appears when the product is added in the basket. Although it is selected the second currency we see in the basket the product in the first currency.
Problem appears in the list view of the products too. It is selected the second currency, but in the detail view of the product again the first currency.
Just to mention, there is currency=EUR&locale=.. in the url
The site has only one language, but prices are in two currencies

I have the same problem in an old installation and it were discussed here
language+currency menu in TYPO3 bootstrap
and the offered solution is not applicable in the case
thanks in advance

Re: problem with second price of the products

Posted: 08 Feb 2022, 17:11
by aimeos
This looks like the "currency" parameter gets lost when you click on another link or want to add something to the basket. Can you confirm?

Re: problem with second price of the products

Posted: 08 Feb 2022, 21:08
by crazyforester
The situation is the following.
For example I see the detail page of the product and I switch to other currency of the product with the locale selector (locale selector is on the same page). I see in the address field of the browser the new currency "[currency]=EUR" and locale is in the default language. Everything is normal up to now, but when I click to "Add to the basket" and basket appears the price of the product is in the default currency, not in the EUR as it is set "[currency]=EUR"
Site has only one language and prices of the products are in two currencies.

Also I noticed the problem when I have a list of products with the default currency and I switch to second currency with Locale selector then all the prices are in the second currency . It is set "[currency]=EUR". When I click on the product to see the detail view again I see the default currency, not the selected one.

Re: problem with second price of the products

Posted: 10 Feb 2022, 07:52
by aimeos
crazyforester wrote: 08 Feb 2022, 21:08 Also I noticed the problem when I have a list of products with the default currency and I switch to second currency with Locale selector then all the prices are in the second currency . It is set "[currency]=EUR". When I click on the product to see the detail view again I see the default currency, not the selected one.
Can you confirm that the "[currency]=EUR" parameter is not in the URL in the detail page when you change from list view to the detail page?

Re: problem with second price of the products

Posted: 10 Feb 2022, 10:30
by crazyforester
when I go from list page (I have clicked the second currency in my case EUR) to detail view then I see in the URL
currency=EUR&locale=bg and price is again in the default currency
then If I click again on the Locale selector and price is in the second currency EUR
I see in the URL ai[currency]=EUR
but when I click to "Add to the basket" and basket appears the price of the product is in the default currency, not in the EUR as it is set "[currency]=EUR"

Re: problem with second price of the products

Posted: 11 Feb 2022, 14:23
by aimeos
OK, now it's clear. Either the "ai" prefix isn't added for "currency" parameter or the currency parameter isn't used from request parameter directly

Re: problem with second price of the products

Posted: 11 Feb 2022, 15:20
by crazyforester
Thank you for your reply. Would you recommend any solution or try to make the configuration in other way?

Re: problem with second price of the products

Posted: 14 Feb 2022, 07:51
by aimeos
We are thinking about how to fix that issue. One option would be to use the global "C" parameter instead of "ai[currency]" because "L" must be global too.

Re: problem with second price of the products

Posted: 15 Feb 2022, 09:51
by aimeos
Can you try to set this TS-config:

Code: Select all

plugin.tx_aimeos.settings.client.html.locale.select.currency.param-name = C
This should use "&C=EUR" as parameter so it should be used in all URLs.

Re: problem with second price of the products

Posted: 15 Feb 2022, 13:50
by crazyforester
thank you for your reply, but it doesn't work

I have set in the main template Setup
plugin.tx_aimeos.settings.client.html.locale.select.currency.param-name = C

when I'm at the list and select Locale selector then I see ai[C]=EUR&ai[locale]=bg
and no change of the price. It is in the default currency.

When I'm it the detail page of the product and use Locale selector then again the price is in the default currency and I see ai[C]=EUR in the browser