
{"id":3125,"date":"2019-09-26T17:09:09","date_gmt":"2019-09-26T08:09:09","guid":{"rendered":"https:\/\/aidoll.4woods.jp\/en\/?page_id=3125"},"modified":"2020-06-15T10:26:46","modified_gmt":"2020-06-15T01:26:46","slug":"cart_frame","status":"publish","type":"page","link":"https:\/\/aidoll.4woods.jp\/en\/cart_frame","title":{"rendered":"OrderForm"},"content":{"rendered":"<div id=\"orderform_wrapper\">\n<style>\n#orderform_frame {\n    margin: 0;\n    padding: 0;\n    width: 100%;\n    height: 999px;\n    border: none;\n}\n#orderform_wrapper > p {\n    margin: 0;\n    padding: 0;\n}\n#header_image,\n#bread_crumb,\n#footer_wrapper,\n#return_top {\n    display: none;\n}\n#main_contents {\n    width: 100%!important;\n}\n#main_col {\n    width: 100%!important;\n    margin-bottom: 0;\n    padding: 0!important;\n}\n<\/style>\n<p><script>\n\/\/ iframe\u306e\u8abf\u6574\nfunction adjust_iframe() {\n  let $frame = jQuery('#orderform_frame');\n  let $frame_contents = $frame.contents();\n  \/\/ \u30ae\u30e3\u30e9\u30ea\u30fc\u304c\u8868\u793a\u4e2d\u306e\u5834\u5408\u306f\u3001\u9ad8\u3055\u304c\u4e00\u6642\u7684\u306b\u4e0e\u3048\u3089\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u3053\u306e\u95a2\u6570\u3067\u306e\u8abf\u6574\u306f\u3057\u306a\u3044\n  if (0 < $frame_contents.find('.lg-outer').length) {\n    return;\n  }\n  let $cart_page = $frame_contents.find('#cart_page');\n  if ($cart_page.length == 0) {\n    \/\/ \u30aa\u30fc\u30bf\u3099\u30fc\u30d5\u30a9\u30fc\u30e0\u30d8\u309a\u30fc\u30b7\u3099\u3066\u3099\u306a\u3044\u306e\u3066\u3099\u3001iframe\u5185\u5bb9\u306ebody\u306e\u9ad8\u3055\u3092\u305d\u306e\u307e\u307eiframe\u306e\u9ad8\u3055\u3078\u30bb\u30c3\u30c8\u3057\u3066\u7d42\u4e86\n    $frame.css('height', $frame_contents.find('body').innerHeight() + 'px');\n    return;\n  }\n  \/\/ \u30aa\u30fc\u30bf\u3099\u30fc\u30d5\u30a9\u30fc\u30e0\u30d8\u309a\u30fc\u30b7\u3099\u8868\u793a\u306b\u304a\u3051\u308b\u8abf\u6574\n  \/\/ iframe\u306e\u9ad8\u3055\u3092\u3001#cart_page\u3068\u30a6\u30a3\u30f3\u30c8\u3099\u30a6\u3066\u3099\u9ad8\u3044\u307b\u3046\u3068\u540c\u3057\u3099\u306b\u3059\u308b\n  let h = $cart_page.outerHeight()+200;\n  if (h < window.innerHeight) {\n    h = window.innerHeight;\n  }\n  $frame.css('height', h + 'px');\n  \/\/ \u56fa\u5b9a\u6b04\u3068\u306a\u3063\u3066\u3044\u308b\u3001\u5408\u8a08\u91d1\u984d\u3084\u9001\u4fe1\u30db\u3099\u30bf\u30f3\u306e\u6b04\u306e\u4f4d\u7f6e\n  let menu_height = $frame.offset().top;\n  let info_height = $frame_contents.find('footer.informations').height();\n  \/\/ iframe\u3092\u57fa\u6e96\u3068\u3057\u305ftop\u306e\u4f4d\u7f6e=\u30a6\u30a3\u30f3\u30c8\u3099\u30a6\u306e\u9ad8\u3055-\u30e1\u30cb\u30e5\u30fc\u306e\u9ad8\u3055-\u6b04\u306e\u9ad8\u3055+\u7e26\u30b9\u30af\u30ed\u30fc\u30eb\u306e\u91cf\n  let info_top = window.innerHeight - menu_height - info_height + window.scrollY; \n  $frame_contents.find('footer.informations').css('top', info_top + 'px');\n  \/\/ \u30aa\u30fc\u30bf\u3099\u30fc\u30d5\u30a9\u30fc\u30e0\u306e\u65e2\u5b58\u30b9\u30bf\u30a4\u30eb\u3066\u3099\u3042\u308bbottom:0\u3092\u89e3\u9664\u3059\u308b\n  $frame_contents.find('footer.informations').css('bottom','auto');\n  \/\/ \u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u8a73\u7d30\u30e2\u30fc\u30c0\u30eb\u306e\u8868\u793a\u4f4d\u7f6e\u3068\u9ad8\u3055\u3092\u8abf\u6574\n  var modal_height = window.innerHeight - menu_height;\n  var $detail_modals = $frame_contents.find('.detail_modal');\n  var modal_height_adjust = 0;\n  if (0 < window.pageYOffset) {\n    if (window.pageYOffset < menu_height) {\n      modal_height_adjust = window.pageYOffset;\n    } else {\n      modal_height_adjust = menu_height;\n    }\n  }\n  $detail_modals.css('height', modal_height + modal_height_adjust + 'px');\n  $detail_modals.css('top', window.pageYOffset - modal_height_adjust + 'px');\n}\n\/\/ iframe\u306e\u5185\u5bb9\u304b\u3099\u8aad\u307f\u8fbc\u307e\u308c\u305f\u3001\u3082\u3057\u304f\u306fiframe\u5185\u3066\u3099\u30d8\u309a\u30fc\u30b7\u3099\u9077\u79fb\u3057\u305f\u3068\u304d\nfunction load_iframe() {\n  let $frame = jQuery('#orderform_frame');\n  let $frame_contents = $frame.contents();\n  \/\/ \u5909\u6570\u306e\u521d\u671f\u5316\n  let frame_window = $frame[0].contentWindow;\n  if (typeof frame_window.prices == 'object') {\n    if (frame_window.prices.hasOwnProperty('base')) {\n      frame_window.initPrices(frame_window.prices.base);\n    }\n  }\n  \/\/ \u30a6\u30a3\u30f3\u30c8\u3099\u30a6\u3092\u5148\u982d\u3078\u30b9\u30af\u30ed\u30fc\u30eb\n  window.scrollTo(0, 0);\n  \/\/ iframe\u5185\u3092\u8abf\u6574\n  adjust_iframe();\n  \/\/ adjust_iframe()\u3092\u9069\u5207\u306a\u30bf\u30a4\u30df\u30f3\u30af\u3099\u3066\u3099\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\n  \/\/ \u30cf\u30f3\u30c8\u3099\u30e9\u3092\u8a2d\u5b9a\u3059\u308b\n  \/\/ \u30aa\u30fc\u30bf\u3099\u30fc\u30d5\u30a9\u30fc\u30e0\u306e\u30ea\u30b9\u30c8\u30af\u30ea\u30c3\u30af\u6642\n  $frame_contents.find('#order_list li').on('click', function(e, a, b){\n    setTimeout(function() {\n      adjust_iframe();\n    },300);\n  });\n  \/\/ \u30aa\u30fc\u30bf\u3099\u30fc\u30d5\u30a9\u30fc\u30e0\u306e\u8a73\u7d30\u30aa\u30d5\u309a\u30b7\u30e7\u30f3\u30af\u30ea\u30c3\u30af\u6642\n  \/\/ (\u9078\u629e\u80a2\u306e\u6b04\u304b\u3099\u65b0\u305f\u306b\u73fe\u308c\u308b\u305f\u3081)\n  $frame_contents.find('#order_detail label').on('click', function(e, a, b){\n    setTimeout(function() {\n      adjust_iframe();\n    }, 30);\n  });\n  \/\/ \u30a6\u30a3\u30f3\u30c8\u3099\u30a6\u306e\u30b9\u30af\u30ed\u30fc\u30eb\u3084\u30ea\u30b5\u30a4\u30b9\u3099\u6642\n  jQuery(window).on('scroll resize', function(){\n    adjust_iframe();\n  });\n}\n<\/script><br \/>\n<iframe id=\"orderform_frame\" src=\"\/en\/wp-json\/wp\/v2\/pages\/3125\" scrolling=\"no\" frameborder=\"no\" onload=\"load_iframe()\"><\/iframe>\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-3125","page","type-page","status-publish","hentry"],"aioseo_notices":[],"jetpack_shortlink":"https:\/\/wp.me\/P9OVHP-Op","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/aidoll.4woods.jp\/en\/wp-json\/wp\/v2\/pages\/3125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aidoll.4woods.jp\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/aidoll.4woods.jp\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/aidoll.4woods.jp\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aidoll.4woods.jp\/en\/wp-json\/wp\/v2\/comments?post=3125"}],"version-history":[{"count":5,"href":"https:\/\/aidoll.4woods.jp\/en\/wp-json\/wp\/v2\/pages\/3125\/revisions"}],"predecessor-version":[{"id":3534,"href":"https:\/\/aidoll.4woods.jp\/en\/wp-json\/wp\/v2\/pages\/3125\/revisions\/3534"}],"wp:attachment":[{"href":"https:\/\/aidoll.4woods.jp\/en\/wp-json\/wp\/v2\/media?parent=3125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}