Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #3687

    Mikhail M
    Participant

    How to change the size of Sale Badge (or it’s form from round to rectangle and change wrapping of the text from diagonal to straight) to to meet the Russian translation of the word “Sale” Now it’s not enough space to it. Take a look at capture – I mark it with green arrow. http://yadi.sk/d/hkzlh78WFR29X

    #3707

    Kory
    Keymaster

    Hey Mikhail,

    The following CSS selector will give you the ability to update the Sale Badge. You can enter it in the Custom section of the Customizer, or the style.css file of your child theme if you are using one:

    .woocommerce .onsale,
    .woocommerce-page .onsale {
      width: 90px;
      border-radius: 0;
      -webkit-transform: none;
         -moz-transform: none;
          -ms-transform: none;
           -o-transform: none;
              transform: none;
    }

    This should take care of all of the issues you mentioned in your post above. If you need to add anything else, feel free to add whatever you need, thanks!

    #124854

    kozijnen-inkoop
    Participant

    Not sure I can ask a question here.

    When I use the code above I get a really ugly sale badge. The “sale” is automatically translated to Dutch on my site making the text really large. Can I revert it back to English?

    #125061

    Darshana
    Moderator

    @kozijnen-inkoop

    Could you please provide us with a URL to your website ? So that we can take a closer look and assist you with a possible solution for your situation. You may open a separate ticket if you don’t want to share your URL in public.

    Thank You!

    #125487

    kozijnen-inkoop
    Participant

    http://overkappingenshop.nl/winkel/

    The product “Terrasverwarmer” is currently for sale.

    #125767

    Kosher K
    Member

    Hi There,

    You can try adjusting the position of sale badge by simply adding this code below in Customizer > Custom > CSS

    .woocommerce .onsale, .woocommerce-page .onsale {
    	top: -10px;
    	left: -45px;
    }

    or if you want to revert it back to english, you can add this code below in Customizer> CUstom > Javascript

    (function($){ 
    	$('.onsale').text('Sale!');
    })(jQuery)

    Hope that helps, Have a great day

    #126170

    kozijnen-inkoop
    Participant

    Thanks for the fix.

    #126240

    Kosher K
    Member

    No Problem,

    Cheers

    #129086

    kozijnen-inkoop
    Participant

    I had to change the stack to Integrity and now the text is off again. I tried using the Javascript but this doesn’t work.

    url: https://overkappingenshop.nl

    #129319

    Kosher K
    Member

    Hi There,

    Please remove this code below from your Customizer’s Javascript field,

    <meta name="sitelock-site-verification" content="5139" />
    <!-- Google Code for Verkoop Conversion Page -->
    <script type="text/javascript">
    /* <![CDATA[ */
    var google_conversion_id = 974073986;
    var google_conversion_language = "en";
    var google_conversion_format = "3";
    var google_conversion_color = "ffffff";
    var google_conversion_label = "3ew8CL-e9FYQguG80AM";
    var google_remarketing_only = false;
    /* ]]> */
    </script>
    <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
    </script>
    <noscript>
    <div style="display:inline;">
    <img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/974073986/?label=3ew8CL-e9FYQguG80AM&guid=ON&script=0"/>
    </div>
    </noscript>

    add it on your child theme functions.php

    add_action('wp_head','additional_head_script');
    function additional_head_script() { ?>
    <meta name="sitelock-site-verification" content="5139" />
    <?php
    }
    add_action('wp_footer','additional_footer_script');
    function additional_footer_script() { ?>
    <!-- Google Code for Verkoop Conversion Page -->
    <script type="text/javascript">
    /* <![CDATA[ */
    var google_conversion_id = 974073986;
    var google_conversion_language = "en";
    var google_conversion_format = "3";
    var google_conversion_color = "ffffff";
    var google_conversion_label = "3ew8CL-e9FYQguG80AM";
    var google_remarketing_only = false;
    /* ]]> */
    </script>
    <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
    </script>
    <noscript>
    <div style="display:inline;">
    <img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/974073986/?label=3ew8CL-e9FYQguG80AM&guid=ON&script=0"/>
    </div>
    </noscript>
    <?php
    }

    Hope that helps,

    Have a great day