• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

  • Register
  • Login
  • Search
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups

How to change currency in fronted?

General Discussion
3
17
2.3k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V
    Vaishali Agarwal last edited by 21 May 2020, 15:52

    @sathish

    In default theme change currency from here, https://prnt.sc/sl6dt1

    In Velocity theme, you could change currency from here, https://prnt.sc/sl6fac

    Thanks.

    A 1 Reply Last reply 2 Jul 2020, 07:57 Reply Quote 0
    • about a month later
    • A
      AshJi @Vaishali Agarwal last edited by 2 Jul 2020, 07:57

      @Vaishali-Agarwal I was also looking for same but in 1.1 version there is no Currency dropdown.

      6be88e7a-1e3e-4260-bc5b-b3497823e35a-image.png

      I tried to setup a new currency INR with Code as 'Rs', and then modified 'default' "Channel" with default currency as INR and I get exception in 'Velocity Theme'.

      But if I change theme to 'default', exception is no longer there but currency is still displayed in USD.

      Trying to get property 'code' of non-object (View: /Users/agupta/PlayGround/bagisto/bagisto-bagisto-v1.1.2-0-gc88ca31/bagisto-bagisto-c88ca31/resources/themes/velocity/views/UI/header.blade.php) (View: /Users/agupta/PlayGround/bagisto/bagisto-bagisto-v1.1.2-0-gc88ca31/bagisto-bagisto-c88ca31/resources/themes/velocity/views/UI/header.blade.php) (View: /Users/agupta/PlayGround/bagisto/bagisto-bagisto-v1.1.2-0-gc88ca31/bagisto-bagisto-c88ca31/resources/themes/velocity/views/UI/header.blade.php) (View: /Users/agupta/PlayGround/bagisto/bagisto-bagisto-v1.1.2-0-gc88ca31/bagisto-bagisto-c88ca31/resources/themes/velocity/views/UI/header.blade.php)
      
      1 Reply Last reply Reply Quote 0
      • V
        Vaishali Agarwal last edited by 2 Jul 2020, 08:03

        Hi @AshJi
        currency option in channel : Channel->Currency should be all selected

        Thanks

        A 1 Reply Last reply 2 Jul 2020, 08:54 Reply Quote 0
        • A
          AshJi @Vaishali Agarwal last edited by 2 Jul 2020, 08:54

          @Vaishali-Agarwal thanks for the quick response. Not sure whether I fully comprehend your suggestion though. Here is what my setting is for Channel. Please suggest what different I should be doing.

          e55e8482-9bf2-467f-8ad3-e592a26a04c7-image.png

          A 1 Reply Last reply 2 Jul 2020, 09:02 Reply Quote 0
          • A
            AshJi @AshJi last edited by 2 Jul 2020, 09:02

            Never mind I got it. For reference of other folks, here is how setting should be - Select all the currencies under 'Currencies'

            afda16aa-c634-47d3-970c-0784a1702f8d-image.png

            1 Reply Last reply Reply Quote 0
            • 29 days later
            • A
              AshJi last edited by 31 Jul 2020, 11:03

              @AshJi said in How to change currency in fronted?:

              Select all the currencies

              Hi @Vaishali-Agarwal I am facing a peculiar issue with currency in production. I have setup the currency to INR as suggestion above. But when I try to add new product or edit existing products, it still shows $ sign in 'Pricing" section.

              ed4c04f1-7846-4ed8-81c0-cd93010d1e71-image.png

              Screenshot 2020-07-31 at 4.30.39 PM.png

              Screenshot 2020-07-31 at 4.32.54 PM.png

              1 Reply Last reply Reply Quote 0
              • V
                Vaishali Agarwal last edited by 31 Jul 2020, 11:31

                @AshJi
                when we set the default currency from the channel then it's only used for the frontend, to change the admin end default currency, it's configuration change from the config/app.php file https://prnt.sc/trqov8

                1 Reply Last reply Reply Quote 0
                • A
                  AshJi last edited by 31 Jul 2020, 12:14

                  @Vaishali-Agarwal I made the changes in config/app.php and ran this command

                  php artisan config:clear
                  

                  Now I can see ₹ symbol in Shop - Home, Product Detail, Cart etc but when I open 'Edit Product' or 'New Product' in Admin then it still shows $ symbol. Do I need to change somewhere else as well?

                  Screenshot 2020-07-31 at 4.30.39 PM.png

                  1 Reply Last reply Reply Quote 0
                  • V
                    Vaishali Agarwal last edited by 31 Jul 2020, 12:16

                    @AshJi
                    could you run php artisan config:cache

                    1 Reply Last reply Reply Quote 0
                    • A
                      AshJi last edited by 31 Jul 2020, 12:27

                      @Vaishali-Agarwal said in How to change currency in fronted?:

                      php artisan config:cache

                      Ran the command but no difference in Admin.

                      a98897f6-d17c-4534-863c-eeb040eb0fe2-image.png

                      1 Reply Last reply Reply Quote 0
                      • A
                        AshJi last edited by 31 Jul 2020, 12:37

                        Should I have to restart the server to address the Currency issue? What will be the command to restart the server on Google CLoud server

                        php artisan serve
                        

                        or

                        sudo service apache2 restart
                        

                        Please confirm.

                        1 Reply Last reply Reply Quote 0
                        • V
                          Vaishali Agarwal last edited by 31 Jul 2020, 13:46

                          @AshJi

                          No need to restart the server configuration but still if you want to restart your server then run

                          sudo service apache2 restart
                          

                          can you go to .env file and add the APP_CURRENCY=INR then flush the cache or see if still having same issue?

                          1 Reply Last reply Reply Quote 0
                          • A
                            AshJi last edited by 31 Jul 2020, 14:11

                            @Vaishali-Agarwal in .env file variable 'APP_CURRENCY' had value 'USD'. I changed it to 'INR' and ran below commands

                            php artisan view:clear
                            php artisan cache:clear
                            composer dump-autoload
                            

                            Open Admin in incognito mode. But currency is still in USD. I noticed that while doing SQL query, it is still fetching details from currency table for 'USD' even though the env variable is 'INR'

                            Screenshot 2020-07-31 at 7.39.19 PM.png Screenshot 2020-07-31 at 7.39.39 PM.png

                            1 Reply Last reply Reply Quote 0
                            • A
                              AshJi last edited by 31 Jul 2020, 15:21

                              is this a bug in Bagisto?

                              1 Reply Last reply Reply Quote 0
                              • V
                                Vaishali Agarwal last edited by 31 Jul 2020, 15:23

                                @AshJi
                                no it's not an bug, may be u missed something
                                kindly check all the below solution:
                                https://forums.bagisto.com/topic/451/how-to-change-currency-and-locale-for-admin

                                https://forums.bagisto.com/topic/1129/update-the-base-currency-in-admin-panel/3

                                https://forums.bagisto.com/topic/50/how-can-i-change-the-base-currency-symbol-on-admin-dashboard

                                1 Reply Last reply Reply Quote 0
                                • A
                                  AshJi last edited by 31 Jul 2020, 18:41

                                  @Vaishali-Agarwal said in How to change currency in fronted?:

                                  may be u missed something

                                  This isn't much helpful 😞

                                  Anyway I investigated found the issue. It seems that Bagisto is fetching currency details picking code from both from cache and "currency" variable. I noticed that following 2 SQLs were executed on each page

                                  select * from `currencies` where `code` = 'INR'
                                  select * from `currencies` where `code` = 'USD'
                                  

                                  In /bootstrap/cache/config.php APP_CURRENCY was set to 'USD'. I changed it to 'INR' and fixed the problem. I will lated delete the cache and try.

                                  1 Reply Last reply Reply Quote 0
                                  11 out of 17
                                  • First post
                                    11/17
                                    Last post