Announcement

Collapse
No announcement yet.

Formatting Shipping Options

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Formatting Shipping Options

    Hi, I'm setting up a special shipping option as a promo for Valentine's Day. I'd like to change the formatting so that it is bold and red on the checkout page.

    I tried using jQuery to add a class to my special shipping method so that I could style it, but when I try to match on it, the shipping method doesn't exist on my page.

    Has anyone been successful in formatting the text for shipping methods?
    Joanne Barker
    VS Web Design
    [email protected]

  • #2
    If your using checkout singlepage updating this function will probably help

    PHP Code:
    jQuery.ajax({
        
    urlurl,
        
    dataType'html',
        
    type'POST',
        
    dataparams,
        
    cachefalse,
        
    success: function (strResult) {
            
    jQuery("#shipResult").html(strResult);
        },
        
    complete: function (strResult) {
            
    updateajax(type2);
        },
        
    errorreportError
    }); 
    Then somewhere in the success callback, after jQuery("#shipResult") you could add your class.

    Havent tested this.

    Good luck.
    Michael

    JES Restaurant Equipment

    Comment


    • #3
      Thanks mtbottoms and jleclair for pointing me in the ajax direction.

      Here's the code I ended up using:

      Code:
      <script>
      	$(document).ajaxStop(function() {
      		//alert("Found me");
      		$( ".item" ).each(function() {
      			var str=$(this).html();
      			if( str.indexOf("Valentine") !=-1)	{
      				//alert('Found string');
      				$(this).addClass("valship");
      			}
      		});
      	})
      </script>
      I could just simply wait for the ajax to stop and then proceed with my changes.

      Big thanks to you both! You are awesome!
      Joanne Barker
      VS Web Design
      [email protected]

      Comment

      Working...
      X