Content of the page

Fancy Product Designer


Content of the article

Plugin link: http://fancyproductdesigner.com/

  • open file: wp-content/plugins/fancy-product-designer/woo/class-wc-cart.php
  • add next code: (works if "Multiple Allowed" is "Yes")
    <?php
    
    if (class_exists('WOOCS')) {
        global $WOOCS;
        if ($WOOCS->is_multiple_allowed) {
            $currrent = $WOOCS->current_currency;
            if ($currrent != $WOOCS->default_currency) {
                $currencies = $WOOCS->get_currencies();
                $rate = $currencies[$currrent]['rate'];
                $_POST['fpd_product_price'] = $_POST['fpd_product_price'] / $rate;
            }
        }
    }
    
  • Open file wp-content\plugins\fancy-product-designer\inc\class-frontend.php and add next javascript code (see the screen below):
    if (woocs_current_currency != 'undefined' && woocs_current_currency['rate'] != 'undefined')
    {
        var dec = 1;
        if (woocs_current_currency['decimals'])
        {
            dec = Math.pow(10, woocs_current_currency['decimals']);
                                                               
        }
        pluginOptions.customTextParameters.price = Math.round(pluginOptions.customTextParameters.price * woocs_current_currency['rate'] * dec) / dec;
        pluginOptions.customImageParameters.price = Math.round(pluginOptions.customImageParameters.price * woocs_current_currency['rate'] * dec) / dec;
                                                           
    }
Faster WordPress Hosting