<commit_before><?php
    $baseCurrencyCode = (string)Mage::app()->getBaseCurrencyCode();
    $allowedCurrencies = Mage::getModel('directory/currency')->getConfigAllowCurrencies(); 
    $rates = Mage::getModel('directory/currency')->getCurrencyRates($baseCurrencyCode, array_values($allowedCurrencies));
    $currentCurrencyCode = (string)Mage::app()->getStore()->getCurrentCurrencyCode();
    $currentCurrencySymbol = Mage::app()->getLocale()->currency($currentCurrencyCode)->getSymbol();
?>

<script type="text/javascript">

    window.clerkAsyncInit = function() {
        Clerk.config({
            key: '<?php echo Mage::helper('clerk')->getApiKey(); ?>',
            templateFormatters: {
                form_key: function () {
                    return '<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>';
                },
                currency_converter: function (price_in_base_currency) {
                    return {
                        price: price_in_base_currency * <?php echo $rates[$currentCurrencyCode]?>,
                        code: '<?php echo $currentCurrencyCode; ?>',
                        symbol: '<?php echo $currentCurrencySymbol; ?>'
                    };
                }
            }
        });
    };
    (function(){
        var e = document.createElement('script'); e.type='text/javascript'; e.async = true;
        e.src = document.location.protocol + '//api.clerk.io/static/clerk.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(e, s);
    })();

</script>
<commit_msg>hkb requested changes<commit_after><?php
    $baseCurrencyCode = (string)Mage::app()->getBaseCurrencyCode();
    $allowedCurrencies = Mage::getModel('directory/currency')->getConfigAllowCurrencies(); 
    $rates = Mage::getModel('directory/currency')->getCurrencyRates($baseCurrencyCode, array_values($allowedCurrencies));
    $currentCurrencyCode = (string)Mage::app()->getStore()->getCurrentCurrencyCode();
    $currentCurrencySymbol = Mage::app()->getLocale()->currency($currentCurrencyCode)->getSymbol();
?>

<script type="text/javascript">

    window.clerkAsyncInit = function() {
        Clerk.config({
            key: '<?php echo Mage::helper('clerk')->getApiKey(); ?>',
            templateFormatters: {
                form_key: function () {
                    return '<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>';
                },
                currency_converter: function (price_in_base_currency) {
                    return price_in_base_currency * <?php echo $rates[$currentCurrencyCode]; ?>
                },
                currency_code: function () {
                    return '<?php echo $currentCurrencyCode; ?>'
                },
                currency_symbol: function () {
                    return '<?php echo $currentCurrencySymbol; ?>'
                }
            }
        });
    };
    (function(){
        var e = document.createElement('script'); e.type='text/javascript'; e.async = true;
        e.src = document.location.protocol + '//api.clerk.io/static/clerk.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(e, s);
    })();

</script>

{'fraction_non_alphanumeric': 0.1577805331680099, 'fraction_numerical': 0.0006199628022318661, 'mean_word_length': 2.597547380156076, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '337283', 'n_tokens_mistral': 881, 'n_tokens_neox': 862, 'n_words': 127}