{"id":1939,"date":"2015-01-31T02:15:40","date_gmt":"2015-01-31T02:15:40","guid":{"rendered":"https:\/\/preview.cleangetawaycomedy.com\/?page_id=1939"},"modified":"2015-01-31T02:15:40","modified_gmt":"2015-01-31T02:15:40","slug":"checkout","status":"publish","type":"page","link":"https:\/\/cleangetawaycomedy.com\/?page_id=1939","title":{"rendered":"Checkout"},"content":{"rendered":"<h1>Checkout<\/h1>\n<p>  <div id=\"emptyCartMsg\">\n  <h3>Your Cart Is Empty<\/h3>\n      <p><a href='https:\/\/cleangetawaycomedy.com' class=\"SimpleEcommCartButtonSecondary\" title=\"Continue Shopping\">Continue Shopping<\/a>\n    <\/div>\n  \n<script type=\"text\/javascript\" charset=\"utf-8\">\n\/* <![CDATA[ *\/\n  $jq = jQuery.noConflict();\n\n  $jq('document').ready(function() {\n    $jq('#shipping_method_id').change(function() {\n      $jq('#SimpleEcommCartCartForm').submit();\n    });\n    \n    $jq('#live_rates').change(function() {\n      $jq('#SimpleEcommCartCartForm').submit();\n    });\n    \n    $jq('.showEntriesLink').click(function() {\n      var panel = $jq(this).attr('rel');\n      $jq('#' + panel).toggle();\n      return false;\n    });\n    \n    $jq('#change_shipping_zip_link').click(function() {\n      $jq('#set_shipping_zip_row').toggle();\n      return false;\n    });\n\t\n\tselectState();\n\tshowHideState();\n\t$jq('#shipping_country').change(function(){\n\t\tshowHideState();\n\t});\n\t$jq('#billing_country').change(function(){\n\t\tshowHideState();\n\t});\n\t\n\t$jq('#SimpleEcommCartCheckoutButton').click(function(){\n\t\tif($jq('#agreeTermsAndCondition').val()=='on') ;\/\/ do nothing\n\t\telse return true;\n\t\t\n\t\tif($jq('#agreeTermsAndCondition:checked').val()=='on')\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\talert('You have to agree the Terms & Conditions');\n\t\t\treturn false;\n\t\t}\n\t});\n\tpopulateCheckoutButtonURL();\n\t \n\t$jq('#checkout_select').change(function(){ \n\t\tpopulateCheckoutButtonURL();\n\t});\n  });\n  function selectState()\n  {\n  \tvar shipping_country = $jq('#shipping_country').val();\n\tvar billing_country = $jq('#billing_country').val();\n\t\n  \tvar shipping_state = $jq('#hdnShippingState').val();\n\tvar billing_state = $jq('#hdnBillingState').val();\n\t\n\tif(shipping_country == 'US~United States' )\n\t{\n\t\t$jq('#shipping_state_usa').val(shipping_state);\n\t}\n\telse\n\t{\n\t\t$jq('#shipping_state_canada').val(shipping_state);\n\t}\n\tif(billing_country == 'US~United States' )\n\t{\n\t\t$jq('#billing_state_usa').val(billing_state);\n\t}\n\telse\n\t{\n\t\t$jq('#billing_state_canada').val(billing_state);\n\t}\n  }\n  function showHideState()\n  {\n  \t$jq('#shipping_state_usa').hide();\n  \t$jq('#shipping_state_canada').hide();\n\t$jq('#billing_state_usa').hide();\n  \t$jq('#billing_state_canada').hide();\n\t\n\t\n  \tvar shipping_country = $jq('#shipping_country').val();\n\tvar billing_country = $jq('#billing_country').val();\n\t\n  \tif(shipping_country == 'US~United States' )\n\t{\n\t\t$jq('#shipping_state_usa').show();\n\t}\n\telse\n\t{\n\t\t$jq('#shipping_state_usa').hide();\n\t}\n\t\n\tif(shipping_country == 'CA~Canada' )\n\t{\n\t\t$jq('#shipping_state_canada').show();\n\t}\n\telse\n\t{\n\t\t$jq('#shipping_state_canada').hide();\n\t}\n\t\n\tif(billing_country == 'US~United States' )\n\t{\n\t\t$jq('#billing_state_usa').show();\n\t}\n\telse\n\t{\n\t\t$jq('#billing_state_usa').hide();\n\t}\n\t\n\tif(billing_country == 'CA~Canada' )\n\t{\n\t\t$jq('#billing_state_canada').show();\n\t}\n\telse\n\t{\n\t\t$jq('#billing_state_canada').hide();\n\t}\n  }\n  function populateCheckoutButtonURL()\n  {\n  \t\/\/\n  \tvar selected = $jq('#checkout_select').val();\n\tvar url=$jq('#SimpleEcommCartCheckoutButton').attr('href');\n\t\n\tvar index = url.indexOf('checkout_select');\n\tif(index>-1)\n\t{\n\t\t\/\/update\n\t\turl=url.substring(0,index - 1);\n\t}\n\t\n\tvar index_of_question_mark=url.indexOf('?');\n\tif(index_of_question_mark > -1){\n\t\turl+='&checkout_select='+selected;\n\t}\n\telse\n\t{\n\t\turl+='?checkout_select='+selected;\n\t}\n\t\n\t$jq('#SimpleEcommCartCheckoutButton').attr('href',url);\n  }\n\/* ]]> *\/\n<\/script>\n<br \/>\n<\/p>\n<div id=\"wp_fb_like_button\" style=\"margin:5px 0;float:none;height:350px;\"><script src=\"http:\/\/connect.facebook.net\/en_US\/all.js#xfbml=1\"><\/script><fb:like href=\"https:\/\/cleangetawaycomedy.com\/?page_id=1939\" send=\"false\" layout=\"standard\" width=\"450\" show_faces=\"true\" font=\"arial\" action=\"like\" colorscheme=\"light\"><\/fb:like><\/div>","protected":false},"excerpt":{"rendered":"<p>Checkout<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":1937,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"spay_email":""},"jetpack_shortlink":"https:\/\/wp.me\/P2j74Q-vh","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cleangetawaycomedy.com\/index.php?rest_route=\/wp\/v2\/pages\/1939"}],"collection":[{"href":"https:\/\/cleangetawaycomedy.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cleangetawaycomedy.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cleangetawaycomedy.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/cleangetawaycomedy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1939"}],"version-history":[{"count":0,"href":"https:\/\/cleangetawaycomedy.com\/index.php?rest_route=\/wp\/v2\/pages\/1939\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/cleangetawaycomedy.com\/index.php?rest_route=\/wp\/v2\/pages\/1937"}],"wp:attachment":[{"href":"https:\/\/cleangetawaycomedy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1939"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}