Select Page

How to change the currency code for menu items?

Forum Forums Divi Product Support Bonjour – Divi Child Theme How to change the currency code for menu items?

This topic contains 0 replies, has 1 voice, and was last updated by  admin 2 years, 1 month ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #130

    admin
    Keymaster

    This requires a small bit of change in Javascript.

    To do this, you can either:
    1) Access your Cpanel and open file manager. Browse to the files (check the path of the URL).
    2) Or access the files via FTP.

    File to change
    wp-content/themes/bonjour/js/main.js

    Highlighted in line 5 and line 7, change the currency code $ to desired currency code.
    Line 5 tells Javascript what to look for in your text as the currency code identifier.
    Line 7 prints out the currency code.

    Below is an example of changing from $ to €

    var arr = data.split('€');
    $(this).css('display','flex');
    $(this).html(""+arr[0] + "    €" +arr[1]+ "");

    Easy as that. Feel free to ask anything in this thread relating to currency code changes in Bonjour Divi Child Theme.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.