craftcms / commerce

Fully integrated ecommerce for Craft CMS.
https://craftcms.com/commerce
Other
215 stars 169 forks source link

[5.x]: Unable to set a stores primary currency #3425

Closed phillmorgan28 closed 4 months ago

phillmorgan28 commented 4 months ago

What happened?

Description

We are currently unable to set a store's primary currency. The option to set a new currency as primary is not available in the control panel

Steps to reproduce

  1. Setup a new currency
  2. Look around for the option to set a new primary

Expected behavior

A button available to mark the new currency as primary

Actual behavior

No option

Craft CMS version

5.0.0-beta.6

Craft Commerce version

5.0.0-beta.1

PHP version

8.3

Operating system and version

Ubuntu Linux

Database type and version

MariaDB 11.3.2

Image driver and version

No response

Installed plugins and versions

-

linear[bot] commented 4 months ago

PT-1297 [5.x]: Unable to set a stores primary currency

nfourtythree commented 4 months ago

Hi @phillmorgan28

Thank you for your message.

You should be able to set a store's primary currency when creating a new store. If you wish to change a current store's primary currency you must first make sure there are no orders or carts in that store.

Hope this helps, thanks!

phillmorgan28 commented 4 months ago

Hi @nfourtythree. Thanks for the response. I did consult the documentation and found this already. This installation is brand new, with zero orders and no active or inactive carts in existence, and I cannot find an option to change the pre-existing stores primary currency.

Thanks

phillmorgan28 commented 4 months ago

Please see below screenshots showing no option available

Screenshot 2024-03-12 155944 Screenshot 2024-03-12 155955 Screenshot 2024-03-12 160001 Screenshot 2024-03-12 160008 Screenshot 2024-03-12 160020

nfourtythree commented 4 months ago

Hi @phillmorgan28

Thank you for your reply, if you head to the Stores section of the settings, click on your store and you should see a dropdown for currency where you will be able to change it.

Payment currencies are the alternate currencies that the store can take payment in on top of its base currency.

CleanShot 2024-03-12 at 16 01 59@2x

Thanks!

phillmorgan28 commented 4 months ago

HI @nfourtythree This option is not available to me

image

nfourtythree commented 4 months ago

Hi @phillmorgan28

If you have deleted any carts or orders, be sure to run garbage collection to make sure they have been fully removed.

This can be done via the garbage collection CLI command.

./craft gc/run

Thanks

phillmorgan28 commented 4 months ago

Perfect! It was due to the single deleted cart that was created when I installed Commerce!

Many thanks!

As a suggestion, perhaps rather than removing the setting from view completely, present a disabled drop-down with some guidance? Although it's in the documentation to delete these items, it may not be clear that the trashed items must also be deleted to enable the ability to switch.

nfourtythree commented 4 months ago

Great that it is working!

And we will definitely take this feedback on board as we look to make improvements.

Thanks!