1
2
3
4
5
/* CS CART 2.x */
javascript:(function(){/*Scanner Postage Tracking7 Aug 2013Quick fix as the scanner adds 5 numerals at the start of the Australia Post Express Post tracking codes and does a carriage returnRMW Web Publishing*/if($('#content_add_shipment:visible').length>0){var scanned=$('#shipment_comments').val();if(scanned.length>0){scanned=scanned.trim();scanned=scanned.slice(4);/* example '997960402908127094' return 60402908127094 */if(scanned.length===14){$('#tracking_number').val(scanned).focus();$('#shipment_comments').val('');}else{alert('Something sus happened - the code is not correct. Please fix manually');return;}}else{alert('Please scan code into the "Comments" field');}/* Set Carrier to Australia Post */$('#carrier_key option[value="AUP"]').attr('selected','selected');/* Set Order Status to Posted */$('#order_status option[value="C"]').attr('selected','selected');/* Set Notification to True */$('#shipment_notify_user').attr('checked','checked');}else{alert('CS Cart "New Shipment" dialogue not active');}})()

/* CS CART 4.x */
javascript:!function(){!function(){if($('form[name=%22shipments_form%22]:visible').length%3E0){var%20e=$(%22%23shipmentcomments%22).val();if(e.length%3E0){if(e=e.trim(),e=e.slice(4),14!==e.length)return%20void%20alert(%22Somethings%20wrong%20-%20the%20code%20is%20not%20correct.%20Please%20fix%20manually%22);$(%22%23tracking_number%22).val(e).focus(),$(%22%23shipmentcomments%22).val(%22%22)}else%20alert('Please%20scan%20code%20into%20the%20%22Comments%22%20field');$('%23carrier_key%20option[value=%22aup%22]').prop(%22selected%22,!0),$('%23order_status%20option[value=%22C%22]').prop(%22selected%22,!0),$(%22%23shipment_notify_user%22).prop(%22checked%22,!0)}else%20alert('Unable%20to%20find%20CS%20Cart%20%22New%20Shipment%22%20modal')}()}();