Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-652

Commerce : Setting up multi currency webshop does not work

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: High High
    • None
    • 3.3.4
    • Commerce
    • eZ Commerce

    Description

      It doesn't seem to work to set up a commerce site with multiple currencies, that is one siteaccess with EUR, and a different one with PL (zloty)

      Steps to reproduce:

      • Have a shop which is using EUR currency.
      • Add a "pl" siteaccess.
      • I have added 'PLN' currency to the siso_core.default.configuration_files parameter array ( the actual settings are listed later in this comment, MyCommerceBundle/src/Resources/config /ezcommerce_currencies.yaml)
      • in Price config in admin (/admin/eshop/configuration_settings#main__content#tab ), I have configured:
      • Default:
        • Currency conversion rate :
          EUR:1
          PLN: 4.5
        • Default currency : EUR
        • Base currency: EUR
      • Pl:
        • Currency conversion rate :
          EUR:1
          PLN: 4.5
        • Default currency : PLN
        • Base currency: EUR

      However, I am not able to see prices is Zloty. Only way I am able to force that is to set Zloty as default currency for the whole shop :

      • Default: ( so setting it for "Default" instead of for "Pl" )
      • Default currency : PLN

      PS : when testing this, it seems the system will try to get the currency for the current user ( current session) for some reason, so you need to remove the session when changing the settings above or moving from en to pl siteaccess...

      config:

      # MyCommerceBundle/src/Resources/config/ezcommerce_currencies.yaml
      siso_core.default.standard_price_factory.fallback_currency:
          group: price
          type: selectbox
          choices : ['EUR','GBP','USD','CAD','PLN']
      
      siso_core.default.standard_price_factory.base_currency:
          group: price
          type: selectbox
          choices : ['EUR','GBP','USD','CAD','PLN']
      
      siso_core.en.standard_price_factory.fallback_currency:
          group: price
          type: selectbox
          choices : ['EUR','GBP','USD','CAD','PLN']
      
      siso_core.de.standard_price_factory.fallback_currency:
          group: price
          type: selectbox
          choices : ['EUR','GBP','USD','CAD','PLN']
      
      siso_core.pl.standard_price_factory.fallback_currency:
          group: price
          type: selectbox
          choices : ['EUR','GBP','USD','CAD','PLN']
      
      siso_core.default.currency_list:
          group: price
          type: array
          keys: true
          keys_choices: ['EUR','GBP','USD','CAD','PLN']
      

      This config file is appended in an bundle :

          // MyCommerceBundle/src/DependencyInjection/EzSystemsMyCommerceExtension.php
          public function load(array $configs, ContainerBuilder $container)
          {
              (...)
      
              $configFiles = $container->getParameter('siso_core.default.configuration_files');
              array_unshift($configFiles,  realpath(__DIR__ . '/../Resources/config/ezcommerce_currencies.yaml'));
              $container->setParameter('siso_core.default.configuration_files', $configFiles);
          }
      

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              vidar.langseid@ibexa.co Vidar Langseid
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: