Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #703678

    All woocommerce prices are presented as ,00.

    Does anybody know the trick to change prices from ,00 into .- (only for prices ending with ,00)

    See : https://www.celebrationevents.nl/licht-en-geluid-verhuur/geluidsinstallatie-huren/

    #704734

    Hey Gilbert,

    Thank you for using Enfold.

    Please add this code in the functions.php file:

    add_action('wp_footer', 'ava_custom_script');
    function ava_custom_script(){
    ?>
    <script type="text/javascript">
    (function($) {
    	function a() {
    		$('.woocommerce-Price-amount').text(function(i, text) {
    		  return text.replace(',00', '.-');
    		});
            }
    
    	a();
    })(jQuery);
    </script>
    <?php
    }

    If the script is not working, please post the login details here so that we can check the site.

    NOTE: We updated the code above.

    Best regards,
    Ismael

    #704767

    I tried the code but got an error massage :
    Parse error: syntax error, unexpected ‘&’ in /home/vhosts/celebrationevents.nl/httpdocs/wp-content/themes/enfold/functions.php on line 567

    I Hope you can fix it.

    #705147

    Hi,

    Thanks for the login details, I see that you have the parent theme active – you will lose the changes made to it on updates. Could you try activating the child theme and add the code Ismael sent in its functions.php instead maybe?

    Best regards,
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.