Skip to content
This repository was archived by the owner on Jul 5, 2023. It is now read-only.
This repository was archived by the owner on Jul 5, 2023. It is now read-only.

Handle Multi-currency #2

@alanburke

Description

@alanburke

Hi Bojan

I'm using this example module to start the port of
https://www.drupal.org/project/commerce_donate to D8.

One issue encountered that you may be able to help with.

This example module doesn't work with Multi-currency.
I've started by amending the code to respect the current currency when adding an item to the cart - that bit is fine, and I understand it.

However when I switch currency, using the block provided by https://www.drupal.org/project/commerce_currency_resolver , I get a fatal error now

The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">Drupal\commerce_price\Exception\CurrencyMismatchException</em>:  in <em class="placeholder">Drupal\commerce_price\Price-&gt;assertSameCurrency()</em> (line <em class="placeholder">296</em> of <em class="placeholder">modules/contrib/commerce/modules/price/src/Price.php</em>)

Any advice of where to start fixing that.

Thanks for the code - great work as always!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions