{"id":10859,"date":"2021-09-11T11:21:32","date_gmt":"2021-09-11T11:21:32","guid":{"rendered":"https:\/\/redseafilmfest.com\/?page_id=10859"},"modified":"2021-10-04T22:32:38","modified_gmt":"2021-10-04T22:32:38","slug":"cart","status":"publish","type":"page","link":"https:\/\/redseafilmfest.com\/ar\/cart\/","title":{"rendered":"\u0627\u0644\u0633\u0644\u0629"},"content":{"rendered":"<style>\ndiv.quantityxx {\n    display: flex;\n    flex-direction: row;\n    flex: 1;\n    gap: 15px;\n    \/* grid-area: quantity; *\/\n    max-width: 200px;\n    margin: 60px 0;\n}\n<\/style>\n<script>\n\njQuery(function($) {\n    $('#menu-cart').hide();\n});\n\nfunction reduce_screenings(key){\n    jQuery(function($) {\n        initial_qty = $('.'+key).val();\n        initial_qty= initial_qty-1;\n        \n        if(\"\">initial_qty){\n            $('.'+key).next().show();\n        }\n        if(initial_qty==\"1\"){\n            $('.'+key).prev().hide();\n        }\n        if(initial_qty>0){\n            price = key.split(\"_\");\n            total = parseInt($('#total').html()) - price[3];\n            total_key = parseInt(initial_qty) * parseInt(price[3]);\n            $('#total').html(total);\n            $('#total_'+key).html(total_key);\n             $('.'+key).val(initial_qty)\n            $.post('\/wp-content\/themes\/rsiff\/inc\/shortcodes\/films-cart.php', {key: key,qty: initial_qty}, function(result){\n                if(result==\"refresh\"){\n                    $('#cart_overlay').fadeIn();\n                    window.location.href=location.href;\n                }\n          });\n        }\n\n    });\n}\n\nfunction increase_screenings(key){\njQuery(function($) {\n\n    initial_qty = $('.'+key).val();\n    initial_qty= parseInt(initial_qty)+1;\n    if(\"\"==initial_qty){\n        $('.'+key).next().hide();\n    }\n    if(initial_qty==\"1\"){\n        $('.'+key).prev().hide();\n    }\n    if(initial_qty>\"1\"){\n        $('.'+key).prev().show();\n    }\n    price = key.split(\"_\");\n    total = parseInt($('#total').html()) + parseInt(price[3]);\n    total_key = parseInt(initial_qty) * parseInt(price[3]);\n    \n    $.post('\/wp-content\/themes\/rsiff\/inc\/shortcodes\/films-cart.php', {key: key,qty: initial_qty}, function(result){\n        if(result){\n            if(result==\"refresh\"){\n                $('#cart_overlay').fadeIn();\n                window.location.href=location.href;\n            }\n            else{\n                alert(result)\n            }\n        }\n        else{\n            $('#total').html(total);\n            $('#total_'+key).html(total_key);\n             $('.'+key).val(initial_qty)\n        }\n  });\n\n});\n}\n\n\nfunction delete_screenings(key){\njQuery(function($) {\n\n    initial_qty = $('.'+key).val();\n    $(\".row_\"+key).fadeOut()\n    price = key.split(\"_\");\n    total = parseInt($('#total').html()) - parseInt(price[3]*initial_qty);\n    $('#total').html(total);\n    val = $('.'+key).val()\n    $.post('\/wp-content\/themes\/rsiff\/inc\/shortcodes\/films-cart.php', {key: key,val: val,qty: 0}, function(result){\n            if(result==\"refresh\"){\n                $('#cart_overlay').fadeIn();\n                window.location.href=location.href;\n            }\n  });\n\n});\n}\n\nfunction check_screenings(key){\njQuery(function($) {\n\n    initial_qty = $('.'+key).val();\n    initial_qty= parseInt(initial_qty);\n        \n    if(\"\"==initial_qty){\n        $('.'+key).next().hide();\n    }\n    if(initial_qty==\"1\"){\n        $('.'+key).prev().hide();\n    }\n\n});\n}\n\nfunction check_coupon(refresh){\njQuery(function($) {\n\n    coupon_code = $('#coupon_code').val();\n    if(coupon_code==\"\"){\n        coupon_code=\"NA\";\n    }\n    $.post('\/wp-content\/themes\/rsiff\/inc\/shortcodes\/check_code.php', {coupon_code: coupon_code}, function(result){\n        if(result){\n            result_split = result.split(\"_____\");\n            if(result_split[0]==\"refresh\" && refresh!=\"no_refresh\"){\n                    $('#cart_overlay').fadeIn();\n                    window.location.href=location.href;\n            }\n            else if(refresh==\"refresh\"){\n                    $('#cart_overlay').fadeIn();\n                    window.location.href=location.href;\n            }\n            $('#coupon_code_desc').html(result_split[1])\n        }\n        \n  });\n\n});\n}\n\nfunction no_discount(applied){\n    jQuery(function($) {\n        if(applied==\"no\"){\n            $('#coupon_code_desc').css(\"color\",\"red\");\n        }\n        if(applied==\"yes\"){\n            $('#coupon_code_desc').css(\"color\",\"#018a01\");\n        }\n\n    });\n}\nfunction validate_checkout(){\njQuery(function($) {\n    \n    if($('#coupon_code_desc').html()=='' && $('#coupon_code').val()!=''){\n         check_coupon('');\n    }\n    else if($('#coupon_code_desc').html()!='' && $('#coupon_code').val()==''){\n         check_coupon('refresh');\n    }\n    else{\n        \/\/ window.location.href='checkout?email='+$('#email').val()\n        if ($('#email').val()) { \n            window.location.href='checkout?email='+$('#email').val()\n        } else {\n            window.location.href='checkout'\n        }\n    }\n});\n}\n\n<\/script>\n<style>\n\n.cart_overlay {\n    position: fixed;\n    display: none;\n    width: 100%;\n    height: 92%;\n    top: 8%;\n    left: 0;\n    right: 0;\n    bottom: 0;\n    background-color: rgba(0,0,0,0.6);\n    z-index: 1;\n    backdrop-filter: blur(20px);\n}\n.cart_overlay_text {\n    position: absolute;\n    top: 50%;\n    left: 50%;\n    font-size: 30px;\n    color: white;\n    transform: translate(-50%,-50%);\n    -ms-transform: translate(-50%,-50%);\n    text-align: center;\n}\n<\/style>\n\n<div id=\"cart_overlay\" class=\"cart_overlay\">\n    <div class=\"cart_overlay_text\">Loading...<\/div>\n<\/div>\n\n\n<section id=\"fixed-menu\">\n    <div id=\"cart\" class=\"cart-breakdown\">\n        <h1>\u0627\u0644\u0633\u0644\u0629<\/h1>\n\n        \n\n        <div class=\"total\">\u0627\u0644\u0645\u062c\u0645\u0648\u0639 <span id=\"total\" class=\"value\">0<\/span> \u0631\u064a\u0627\u0644<\/div>\n\n        <div class=\"terms-conditions\" style=\"display: none;\">\n                <div class=\"term-agreement__wrapper\" style=\"display: none;\">\n        <input type=\"checkbox\" checked=\"checked\" id=\"terms-agree\" name=\"terms-agree\" \/>\n        <label for=\"terms-agree\">\u0627\u0644\u0634\u0631\u0648\u0637 \u0648\u0627\u0644\u0623\u062d\u0643\u0627\u0645:<\/u><br>\u064a\u062a\u0634\u0631\u0651\u0641 \u0645\u0647\u0631\u062c\u0627\u0646 \u0627\u0644\u0628\u062d\u0631 \u0627\u0644\u0623\u062d\u0645\u0631 \u0627\u0644\u0633\u064a\u0646\u0645\u0627\u0626\u064a \u0627\u0644\u062f\u0648\u0644\u064a \u0628\u0627\u0633\u062a\u0636\u0627\u0641\u0629 \u0627\u0644\u0639\u0631\u0636 \u0627\u0644\u0639\u0627\u0644\u0645\u064a \u0627\u0644\u0623\u0648\u0644 \u0644\u0647\u0630\u0627 \u0627\u0644\u0641\u064a\u0644\u0645. \u0644\u0642\u062f \u0648\u0627\u0641\u0642 \u0641\u0631\u064a\u0642 \u0627\u0644\u0639\u0645\u0644 \u0639\u0644\u0649 \u062a\u0642\u062f\u064a\u0645 \u0627\u0644\u0641\u064a\u0644\u0645 \u0623\u0645\u0627\u0645 \u0627\u0644\u062c\u0645\u0647\u0648\u0631 \u0641\u064a \u0627\u0644\u0645\u0647\u0631\u062c\u0627\u0646 \u0642\u0628\u0644 \u0645\u0648\u0639\u062f \u0625\u0637\u0644\u0627\u0642\u0647 \u0641\u064a \u0635\u0627\u0644\u0627\u062a \u0627\u0644\u0633\u064a\u0646\u0645\u0627\u060c \u0648\u0644\u0643\u0646 \u0639\u0644\u0649 \u0623\u0645\u0644 \u0627\u0644\u0627\u0644\u062a\u0632\u0627\u0645 \u0628\u062a\u062c\u0646\u0628 \u0625\u0641\u0633\u0627\u062f \u0627\u0644\u0641\u064a\u0644\u0645 \u0639\u0644\u0649 \u0628\u0642\u064a\u0629 \u0627\u0644\u0645\u0634\u0627\u0647\u062f\u064a\u0646 \u0645\u0646 \u062c\u0645\u064a\u0639 \u0623\u0646\u062d\u0627\u0621 \u0627\u0644\u0639\u0627\u0644\u0645. \u0644\u0630\u0627 \u0646\u0631\u062c\u0648 \u0645\u0646\u0643\u0645 \u0639\u062f\u0645 \u0643\u062a\u0627\u0628\u0629 \u0623\u064a \u0646\u0642\u062f \u0623\u0648 \u062a\u062d\u0644\u064a\u0644 \u0644\u0644\u0641\u064a\u0644\u0645 \u0642\u0628\u0644 \u0645\u0648\u0639\u062f \u0625\u0637\u0644\u0627\u0642\u0647 \u0644\u0644\u062c\u0645\u0627\u0647\u064a\u0631 \u064a\u0648\u0645 23 \u062f\u064a\u0633\u0645\u0628\u0631. \u0628\u0627\u0644\u0637\u0628\u0639 \u064a\u0645\u0643\u0646\u0643\u0645 \u0627\u0644\u062a\u0639\u0628\u064a\u0631 \u0639\u0646 \u0631\u0623\u064a\u0643\u0645 \u0628\u0627\u0644\u0641\u064a\u0644\u0645 \u0639\u0628\u0631 \u0648\u0633\u0627\u0626\u0644 \u0627\u0644\u062a\u0648\u0627\u0635\u0644 \u0627\u0644\u0627\u062c\u062a\u0645\u0627\u0639\u064a \u0648\u0644\u0643\u0646 \u062f\u0648\u0646 \u0627\u0644\u062a\u0637\u0631\u0642 \u0625\u0644\u0649 \u0627\u0644\u062a\u0641\u0627\u0635\u064a\u0644. \u064a\u0631\u062c\u0649 \u0627\u0644\u062a\u0648\u0642\u064a\u0639 \u0639\u0644\u0649 \u0627\u0644\u0648\u062b\u064a\u0642\u0629 \u0627\u0644\u0645\u0631\u0641\u0642\u0629 \u0648\u0625\u062d\u0636\u0627\u0631\u0647\u0627 \u0625\u0644\u0649 \u0627\u0644\u0639\u0631\u0636.<\/label>\n    <\/div>        <\/div>\n\n        <div class=\"actions\">\n            <a class=\"action secondary\" href=\"\/ar\/films-2025\">\u0645\u062a\u0627\u0628\u0639\u0629 \u0627\u0644\u0634\u0631\u0627\u0621<\/a>\n                    <\/div>\n        <div class=\"termssec\">\n        <div style=\"padding: 20px 0px;\">\u0628\u0625\u0643\u0645\u0627\u0644 \u0639\u0645\u0644\u064a\u0629 \u0627\u0644\u0634\u0631\u0627\u0621\u060c \u0641\u0625\u0646\u0643 \u062a\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 <span class='open-my-popupar' style=\"text-decoration: underline;cursor: pointer;\">\u0627\u0644\u0634\u0631\u0648\u0637 \u0648\u0627\u0644\u0623\u062d\u0643\u0627\u0645<\/span><\/div>         <\/div>\n    <\/div>\n<\/section>\n\n\n<script>no_discount('no')<\/script>\n<script type=\"text\/javascript\">\n    \/\/ Disable\/Enable checkout button\n    var checkbox = document.getElementById(\"terms-agree\");\n    var checkoutButton = document.getElementById(\"checkout\");\n\n    \/\/ Add an event listener to the checkbox to enable or disable the button\n    checkbox.addEventListener(\"change\", function() {\n        if (checkbox.checked) {\n            checkoutButton.removeAttribute(\"disabled\");\n        } else {\n            checkoutButton.setAttribute(\"disabled\", \"disabled\");\n        }\n    });\n<\/script>\n\n<script>\ncheck_coupon('no_refresh');\n<\/script>\n<!-- Snap Pixel Code -->\n<script type='text\/javascript'>\n(function(e,t,n){if(e.snaptr)return;var a=e.snaptr=function()\n{a.handleRequest?a.handleRequest.apply(a,arguments):a.queue.push(arguments)};\na.queue=[];var s='script';r=t.createElement(s);r.async=!0;\nr.src=n;var u=t.getElementsByTagName(s)[0];\nu.parentNode.insertBefore(r,u);})(window,document,\n'https:\/\/sc-static.net\/scevent.min.js');\n \nsnaptr('init', '4fb11b99-68b8-410d-a26b-da2d1f1577af', {\n'user_email': ''\n});\n \nsnaptr('track', 'PAGE_VIEW');\nsnaptr('track','ADD_CART')\n \n<\/script>\n<!-- End Snap Pixel Code -->\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":20,"featured_media":0,"parent":0,"menu_order":135,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-10859","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/redseafilmfest.com\/ar\/wp-json\/wp\/v2\/pages\/10859","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/redseafilmfest.com\/ar\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/redseafilmfest.com\/ar\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/redseafilmfest.com\/ar\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/redseafilmfest.com\/ar\/wp-json\/wp\/v2\/comments?post=10859"}],"version-history":[{"count":1,"href":"https:\/\/redseafilmfest.com\/ar\/wp-json\/wp\/v2\/pages\/10859\/revisions"}],"predecessor-version":[{"id":10860,"href":"https:\/\/redseafilmfest.com\/ar\/wp-json\/wp\/v2\/pages\/10859\/revisions\/10860"}],"wp:attachment":[{"href":"https:\/\/redseafilmfest.com\/ar\/wp-json\/wp\/v2\/media?parent=10859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}