{"id":70393,"date":"2024-03-27T08:42:40","date_gmt":"2024-03-27T07:42:40","guid":{"rendered":"https:\/\/swisstechauto.ch\/guthaben-auf-der-geschenkkarte\/"},"modified":"2024-03-27T08:42:40","modified_gmt":"2024-03-27T07:42:40","slug":"guthaben-auf-der-geschenkkarte","status":"publish","type":"page","link":"https:\/\/swisstechauto.ch\/de\/guthaben-auf-der-geschenkkarte\/","title":{"rendered":"Guthaben auf der Geschenkkarte"},"content":{"rendered":"<div class=\"wps-gift-card-balance-shortcode\"><div class=\"wps-shortcode-balance-form\"><p><label for=\"wps_shortcode_gift_card_email\">Email Address:<\/label><input type=\"email\" id=\"wps_shortcode_gift_card_email\" class=\"wps-shortcode-input\" placeholder=\"Enter your email\" required \/><\/p><p><label for=\"wps_shortcode_gift_card_code\">Gift Card Code:<\/label><input type=\"text\" id=\"wps_shortcode_gift_card_code\" class=\"wps-shortcode-input\" placeholder=\"Enter gift card code\" required \/><\/p><p><button type=\"button\" id=\"wps_shortcode_check_balance\" class=\"button wps-shortcode-button\" style=\"background-color: #663399; color: #fff; border: none; padding: 10px 20px; cursor: pointer; width: 100%; border-radius: 3px;\">Kontostand pr\u00fcfen<\/button><\/p><div id=\"wps_shortcode_loader\" style=\"display: none; text-align: center; margin: 10px 0;\"><span class=\"wps-shortcode-spinner\" style=\"display: inline-block; width: 20px; height: 20px; border: 3px solid #663399; border-top-color: transparent; border-radius: 50%; animation: wps-spin 1s linear infinite;\"><\/span><span>Checking...<\/span><\/div><div id=\"wps_shortcode_balance_result\" style=\"margin-top: 15px;\"><\/div><\/div><\/div><style>.wps-gift-card-balance-shortcode .wps-shortcode-input {width: 100%;padding: 8px;border: 1px solid #ddd;border-radius: 3px;box-sizing: border-box;}.wps-gift-card-balance-shortcode label {display: block;margin-bottom: 5px;font-weight: 600;}.wps-gift-card-balance-shortcode p {margin-bottom: 15px;}.wps-gift-card-balance-shortcode .wps-shortcode-button:hover {opacity: 0.9;}@keyframes wps-spin {to { transform: rotate(360deg); }}#wps_shortcode_balance_result .wps-balance-info {background: #f8f9fa;padding: 15px;border-radius: 5px;border-left: 4px solid #663399;}#wps_shortcode_balance_result .wps-error {color: #d63638;padding: 10px;background: #ffe6e6;border-radius: 3px;border-left: 4px solid #d63638;}<\/style><script type=\"text\/javascript\">jQuery(document).ready(function($) {$(\"#wps_shortcode_check_balance\").on(\"click\", function() {var email = $(\"#wps_shortcode_gift_card_email\").val().trim();var code = $(\"#wps_shortcode_gift_card_code\").val().trim();if (!email || !code) {$(\"#wps_shortcode_balance_result\").html(\"<div class=\\\"wps-error\\\">Please enter both email and gift card code.<\/div>\");return;}$(\"#wps_shortcode_loader\").show();$(\"#wps_shortcode_balance_result\").html(\"\");$(\"#wps_shortcode_check_balance\").prop(\"disabled\", true);$.ajax({url: \"https:\/\/swisstechauto.ch\/wp-admin\/admin-ajax.php\",type: \"POST\",data: {action: \"wps_uwgc_check_gift_balance_org\",email: email,coupon: code,wps_wgm_nonce_check: \"1871921cb6\"},dataType: \"json\",success: function(response) {$(\"#wps_shortcode_loader\").hide();$(\"#wps_shortcode_check_balance\").prop(\"disabled\", false);if (response.result === true) {$(\"#wps_shortcode_balance_result\").html(\"<div class=\\\"wps-balance-info\\\">\" + response.html + \"<\/div>\");setTimeout(function() {initializeShortcodeCopyButtons();}, 100);} else {$(\"#wps_shortcode_balance_result\").html(\"<div class=\\\"wps-error\\\">\" + response.message + \"<\/div>\");}},error: function() {$(\"#wps_shortcode_loader\").hide();$(\"#wps_shortcode_check_balance\").prop(\"disabled\", false);$(\"#wps_shortcode_balance_result\").html(\"<div class=\\\"wps-error\\\">An error occurred. Please try again.<\/div>\");}});});$(\"#wps_shortcode_gift_card_email, #wps_shortcode_gift_card_code\").on(\"keypress\", function(e) {if (e.which === 13) {$(\"#wps_shortcode_check_balance\").click();}});function initializeShortcodeCopyButtons() {$(\".wps-copy-balance-btn\").off(\"click\").on(\"click\", function() {var button = $(this);var couponCode = button.attr(\"data-coupon\");var originalText = button.text();var buttonColor = \"#663399\";if (navigator.clipboard && navigator.clipboard.writeText) {navigator.clipboard.writeText(couponCode).then(function() {button.text(\"Copied!\");button.css(\"background\", \"#28a745\");setTimeout(function() {button.text(originalText);button.css(\"background\", buttonColor);}, 2000);}).catch(function(err) {console.error(\"Failed to copy:\", err);});} else {var textArea = document.createElement(\"textarea\");textArea.value = couponCode;textArea.style.position = \"fixed\";textArea.style.left = \"-999999px\";document.body.appendChild(textArea);textArea.select();try {document.execCommand(\"copy\");button.text(\"Copied!\");button.css(\"background\", \"#28a745\");setTimeout(function() {button.text(originalText);button.css(\"background\", buttonColor);}, 2000);} catch (err) {console.error(\"Failed to copy:\", err);}document.body.removeChild(textArea);}});}});<\/script>\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-70393","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/swisstechauto.ch\/de\/wp-json\/wp\/v2\/pages\/70393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swisstechauto.ch\/de\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/swisstechauto.ch\/de\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/swisstechauto.ch\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swisstechauto.ch\/de\/wp-json\/wp\/v2\/comments?post=70393"}],"version-history":[{"count":0,"href":"https:\/\/swisstechauto.ch\/de\/wp-json\/wp\/v2\/pages\/70393\/revisions"}],"wp:attachment":[{"href":"https:\/\/swisstechauto.ch\/de\/wp-json\/wp\/v2\/media?parent=70393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}