design of Progress Messages, etc
-
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]
- The topic ‘design of Progress Messages, etc’ is closed to new replies.