Announcement

Collapse
No announcement yet.

Shipping Class selection

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

    Shipping Class selection

    G'day,

    Iv'e done a search but I can't find whether this has been covered before. I wouild like to change our shipping class drop down box to be defaulted to a "Please Select" option, so our customers have to physically choose their class so instead of:
    HTML Code:
     <tr><td class="checkout-field-label"><span class="actrequired">Class of Service:</span></td><td class="checkout-field-input"> <SELECT ID='lstClass' NAME='ShippingClass'>
    
    <OPTION SELECTED  Value='29'>STANDARD POST ($0.00)
    <OPTION  Value='8'>EXPRESS POST X1 ($7.50)
    </SELECT>
    </td></tr>
    I would like:

    HTML Code:
    <tr><td class="checkout-field-label"><span class="actrequired">Class of Service:</span></td><td class="checkout-field-input"> <SELECT ID='lstClass' NAME='ShippingClass'>
    
    <OPTION SELECTED  value=''>Please select a shipping service.
    <option Value='29'>STANDARD POST ($0.00)
    <OPTION  Value='8'>EXPRESS POST X1 ($7.50)
    </SELECT>
    </td></tr>
    Any help would be great!!

    Thanks,

    Andy

    #2
    Originally posted by Andy_89 View Post
    G'day,

    Iv'e done a search but I can't find whether this has been covered before. I wouild like to change our shipping class drop down box to be defaulted to a "Please Select" option, so our customers have to physically choose their class
    This selector is built by the perl files during the order process using the orderxx.html files as templates so you will need to do some work on the order scripts to change the selector.

    One other way that might work, but I haven't tested it, that does not involve changing the scripts and therefore not affected by upgrades, would be to include javascript into the html file to process the selector after the page is loaded. If you use jQuery it is a relatively simple task to add an extra option to the drop down selector.

    EDIT:
    this will work in order01.html in the head section (from V11 site)

    Code:
       
    <script language="javascript" type="text/javascript">
    $(document).ready(function() {
        $('#lstClass').prepend('<option value=\"\" selected=\"\">Please select a shipping service</option>');
    }
    </script>
    just needs to have jquery loaded into the page, if user does not select they get the default selection.

    The id="1stClass" comes from a V11 site not sure if its the same on earlier versions, just look at the page on a live site to see if it is different.

    There is a live demo on my V11 beta test site actinic-beta.toddesigns.co.uk if you place an order (no payments are taken and no goods are ever delivered)
    Last edited by malbro; 02-Sep-2011, 02:05 PM. Reason: added sample code

    Malcolm

    SellerDeck Accredited Partner,
    SellerDeck 2016 Extensions, and
    Custom Packages

    Comment

    Working...
    X