• Hi! First of all I want to thank you for the very helpful plugin. But I have few questions that I can’t solve on my own.
    #1 How can I change the text color for “Validating Progress Messages”? I need to have the “valid Progress Messages” in green color and “not valid Progress Messages” in red color. I have studied the sources of your plugin and I developed the following CSS for it.
    .woocommerce-validated div#alg_wc_eu_vat_progress {
    color: #6eb738;
    }
    .woocommerce-invalid div#alg_wc_eu_vat_progress {
    color: red;
    }
    But I see this solution is unstable. For example. I add invalid EU VAT to the billing form. And I have “not valid Progress Messages” in red color after it. It is OK, but if I will click in any place of the billing form I see “not valid Progress Messages” turns to green color, because the parent class turns from “woocommerce-invalid” to “woocommerce-validated”.
    Please answer me, how can I set different colors for different “Validating Progress Messages”?

    #2 I don’t need to show “Progress Messages” for specific countries which I have excluded from VAT validation in the settings of your plugin. I haven’t been able to find any way to do this other than developing this additional JS like this.
    add_action( ‘woocommerce_after_checkout_form’, ‘cond_hide_or_show_checkout_field’, 9999 );
    function cond_hide_or_show_checkout_field() {
    wc_enqueue_js( ”
    jQuery(document).ready(function() {
    var countryname = jQuery(‘#billing_country option:selected’).text().toLowerCase();
    show_hide_fields(countryname);
    ….
    function show_hide_fields(curcountry){
    if (curcountry == ‘albania’ ||
    curcountry == ‘andorra’ ||
    ….
    {jQuery(‘#alg_wc_eu_vat_progress’).css({ ‘visibility’: ‘hidden’})
    } else {
    jQuery(‘#alg_wc_eu_vat_progress’).css({ ‘visibility’: ‘visible’})
    }
    It is working OK. But I understand that this is not a right way, this is a crutch. I need to exclude “Progress Messages” for 15 countries in two languages. It is 30 countries total. It is 30 different manually added strings in JS. The probability of error is very high in this solution.
    Maybe, could you describe your directions to solve this task?

    I’m waiting fr your replies. Thank you in advance.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Omar AlDabbas

    (@omardabbas)

    Hi @fandc

    First, please accept my sincere apologies for the delay.

    For the first point, I already have it 3 shots in development, but each time I try another theme, it stops working, it’s a bit challenging to have a CSS class that works for all themes without any issue, so I think it’s easier to be handled by theme CSS files, we’re not allowed to ask for access here so I’m not sure how to help further.

    For the 2nd point, there is an option in the plugin to hide progress message in preserved countries, doesn’t that serve your need?

    Omar

    Thread Starter Aleks Smirnov

    (@fandc)

    Hi Omar! Thanks for your reply.
    For the first point, perhaps additional different class names could be added for div with the valid VAT number message, for div with the invalid VAT number message, and for div with the validating process message. I think this might solve my issue.
    For the second point. Thank you for your help. It is working for me.
    Best regards.
    Aleks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘design of Progress Messages, etc’ is closed to new replies.