{"id":10242,"date":"2021-09-11T11:21:32","date_gmt":"2021-09-11T11:21:32","guid":{"rendered":"https:\/\/redseafilmfest.com\/?page_id=10242"},"modified":"2021-09-11T11:21:32","modified_gmt":"2021-09-11T11:21:32","slug":"cart","status":"publish","type":"page","link":"https:\/\/redseafilmfest.com\/en\/cart\/","title":{"rendered":"View Cart"},"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>Your Cart<\/h1>\n\n        \n\n        <div class=\"total\">TOTAL <span id=\"total\" class=\"value\">0<\/span> SAR<\/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\">Terms & Conditions:<\/u><br>Red Sea International Film Festival are excited to be holding this World Premiere. The Filmmakers have kindly agreed to share this film with our audience and they hope audiences around the world see the film without any of the wonderful surprises being spoilt. We ask that you do not write a full review of the movie before the 23 of December, and sign the accompanying form and bring it to the premiere.You can of course say how you feel about the film on social media.<\/label>\n    <\/div>        <\/div>\n\n        <div class=\"actions\">\n            <a class=\"action secondary\" href=\"\/en\/films-2025\">CONTINUE SHOPPING<\/a>\n                    <\/div>\n        <div class=\"termssec\">\n        <div style=\"padding: 20px 0px;\">By completing your purchase, you agree to the <span class='open-my-popupen'  style=\"text-decoration: underline;cursor: pointer;\">Terms and Conditions<\/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":134,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-10242","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/redseafilmfest.com\/en\/wp-json\/wp\/v2\/pages\/10242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/redseafilmfest.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/redseafilmfest.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/redseafilmfest.com\/en\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/redseafilmfest.com\/en\/wp-json\/wp\/v2\/comments?post=10242"}],"version-history":[{"count":1,"href":"https:\/\/redseafilmfest.com\/en\/wp-json\/wp\/v2\/pages\/10242\/revisions"}],"predecessor-version":[{"id":10243,"href":"https:\/\/redseafilmfest.com\/en\/wp-json\/wp\/v2\/pages\/10242\/revisions\/10243"}],"wp:attachment":[{"href":"https:\/\/redseafilmfest.com\/en\/wp-json\/wp\/v2\/media?parent=10242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}