Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Prices #3477

Open
bhsmither opened this issue Jan 24, 2024 · 4 comments
Open

Missing Prices #3477

bhsmither opened this issue Jan 24, 2024 · 4 comments

Comments

@bhsmither
Copy link
Contributor

As a follow-on from #3476, when, for whatever reason, there became no enabled currencies for the storefront visitor, the prices might still be getting calculated for display (I will need to double-check).

Likewise, in a different (cookie-based) session, once the prices are no longer being calculated for display (because there are no enabled currencies - for whatever reason), and then currencies do become enabled, the prices are not calculated for display.

The reason suspected is that $SESSION keeps a record of what currency (and language) is being used. So, if a new session is started while no currency is enabled, this new session will have no record of having a currency, and will never have a record as long as this session is being used.

The visitor will need to know that cookies will need to be cleared, and know how to do it.

Suggest that everytime, when an existing cookie-based session is being restored/reloaded, to check for a few essential elements: chosen language - default if none, and chosen currency - default if none.

Suggest, for a logged-in customer, add a column in CubeCart_customer to record preferred currency just the same as preferred language.

Then, as with determining the source of the session's language, also in like manner, determine the source of the session's currency.

@bhsmither
Copy link
Contributor Author

Perhaps in Language->__construct(), when assigning language to $this->language, extract the default_currency from that language's config.xml file and record that in $SESSION.

@bhsmither
Copy link
Contributor Author

Well, now it's working. Weird.

@bhsmither
Copy link
Contributor Author

I believe it is because, in Store Settings, the Default Currency drop-down selector gets populated with all currencies that are enabled at that time.

However, this does not reflect what is actually the state of the Config array -- a currency could still be a member of the Config, yet the Default Currency shows blank.

Likewise, a currency could not be a member of Config, yet the Default Currency is populated and shows the first option.

That is because there is no "--Please Select--" option to indicate that there is missing a currency as a member of Config.

This is misleading.

The admin would have to Save the settings - even if nothing changes - so that the displayed option of the Default Currency selector gets loaded into Config.

@GummyPriest
Copy link

It sounds like the issue here is with how the Default Currency setting is being displayed versus what is actually saved in the system. If a currency is missing from the Config but still appears in the drop-down, or if it’s blank even though it's still technically part of the Config, that can definitely lead to confusion. The lack of a "--Please Select--" option makes it harder for the admin to realize something is off. Forcing the admin to save the settings to sync the display with the actual configuration feels like an unnecessary extra step. It would be much clearer if the UI reflected the actual state of the Config right away! Macy’s Insite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants