Jump to content

[SOLVED] total price color in cart block depending on value


Recommended Posts

Hi guys

 

The minimum purchase total required in my shop is 10€.

I would like to have in the cart block the total price automatically colorized in red if total<10€ and in green if total >= 10€, so that the customer can see if the order can be validated

 

in order to do this i have tried to add the following function in ajax-cart.js at about line 676.

but since it is written by myself it will never work, because its the 1st time when i am doing this

function colorize(){
 if ($('.ajax_cart_total') < 10)
 {
	 $('.ajax_cart_total').style.color = 'red';
 }
else
 {
	 $('.ajax_cart_total').style.color = 'green';
 }
}

Edited by sooroos (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...