• I have a script that runs on all product pages in order to show total price for the quantity.
    The “total price” text is in Hebrew, but after the latest update i believe it has changed to “?? ????” q marks instead of the Hebrew letters, when i try to edit it it keeps changing back to the q marks after i press save.

    This is the script:

    add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_total_product_price’, 32 );
    function woocommerce_total_product_price() {
    global $woocommerce, $product;
    // let’s setup our divs

    // echo sprintf(‘<div id=”product_total_price” style=”margin-bottom:20px;display:none”>%s %s</div>’,__(‘??”? ????:’,’woocommerce’),'<span class=”price”>’.$product->get_price().'</span>’);
    ?>
    <script>

    jQuery(document).ready(function($){
    $($(“form[class=’variations_form cart’]”)).html($($(“form[class=’variations_form cart’]”)).html() + ‘<?php echo sprintf(‘<div id=”product_total_price” style=”margin-bottom:20px;display:none;text-align: left;; padding-left: 40px;”>%s %s</div>’,__(‘?? ???’,’woocommerce’),'<span class=”price”>’.$product->get_price().'</span>’); ?>’);
    $($(“form[class=’cart’]”)).html($($(“form[class=’cart’]”)).html() + ‘<?php echo sprintf(‘<div id=”product_total_price” style=”margin-bottom:20px;display:none;text-align: left;; padding-left: 40px;”>%s %s</div>’,__(‘?? ???:’,’woocommerce’),'<span class=”price”>’.$product->get_price().'</span>’); ?>’);
    });

    jQuery(function($){

    var price = ‘<?php echo $product->get_price(); ?>’,
    current_cart_total = ‘<?php echo $woocommerce->cart->cart_contents_total; ?>’,
    currency = ‘<?php echo get_woocommerce_currency_symbol(); ?>’;

    $(‘[name=quantity]’).change(function(){
    if (!(this.value <= 1)) {
    var product_total = parseFloat(price * this.value * 1.17),
    cart_total = parseFloat(product_total + current_cart_total);
    $(‘#product_total_price .price’).html( currency + product_total.toFixed(2));
    $(‘#cart_total_price .price’).html( currency + cart_total.toFixed(2));
    }
    $(‘#product_total_price,#cart_total_price’).toggle(!(this.value <= 1));

    });

    });
    </script>
    <?php
    }

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    Hello,

    It looks like your code is a little messed up. Could you try reposting it using the toolbar button?

Viewing 1 replies (of 1 total)
  • The topic ‘unable to display hebrew’ is closed to new replies.