Fragen und Antworten

Wird geladen
Hallo customer.full_name!

Lorem ipsum dolor sit amet, consectetur idesiu. Fusce id purus eu elit mattis congue nec id tortor.

Q: Wie lange hält die Stromquelle?
Schreiben Sie hier Ihre Antwort

Message!

` $('body').append(notification_html); function getUrlQueryString(names, urls) { urls = urls || window.location.href; urls && urls.indexOf("?") > -1 ? urls = urls .substring(urls.indexOf("?") + 1) : ""; var reg = new RegExp("(^|&)" + names + "=([^&]*)(&|$)", "i"); var r = urls ? urls.match(reg) : window.location.search.substr(1) .match(reg); if (r != null && r[2] != "") return unescape(r[2]); return null; }; var shop_id = getUrlQueryString('ssid'); var question_id = getUrlQueryString('question_id'); var et_id = getUrlQueryString('et_id'); var logs_id = getUrlQueryString('logs_id'); var email_url = getUrlQueryString('email_url'); var user_name = getUrlQueryString('user_name'); // console.log(shop_id, question_id, et_id, email_url, user_name); $('.super-email-load-wrap').show(); var orderPdtObj = { shop_id: shop_id, question_id: question_id, }; $.ajax({ type : "GET", contentType: "application/json;charset=UTF-8", url : "https://dr.supersds.com/review/get_product_info_by_question", data : orderPdtObj, success : function(result) { result = JSON.parse(result); console.log(result); if (result.status == 'success') { $('.reviewEmailPdtImg').attr('src', result.data.product_photo_url); $('.reviewEmailPdtName').html(result.data.product_title); $('.edit-wrap .qAnswers-wrap .questions .questions-value').html(result.data.question + '?'); $('.super-email-load-wrap').hide(); } }, error : function(e){ console.log(e); // console.log(e.responseText); $('.super-email-load-wrap').hide(); }, complete(XMLHttpRequest,status){ $('.super-email-load-wrap').hide(); if(status=='timeout'){ //超时的回调 // console.log('timeout'); } } }); $.ajax({ type : "GET", contentType: "application/json;charset=UTF-8", url : "https://dr.supersds.com/user/shopify_page", data : {et_id: et_id, logs_id: logs_id}, success : function(result) { result = JSON.parse(result); console.log('获取变量配置信息数据') // console.log(result); if (result.status == 'success') { var logs_list = result.data.logs_list var email_template_list = result.data.email_template_list console.log(email_template_list) console.log(logs_list) if (email_template_list.length == 0) { // console.log('There is a problem with the data format, stop executing the following code'); return false } var email_subject = email_template_list.email_subject var message_body = email_template_list.message_body var email_footer = email_template_list.email_footer // $('.submit-reviews-wrap button').css({ // color: email_template_list.button_color // }) // $('.submit-reviews-wrap button').html(email_template_list.button_title) $('.email-logo-wrap img').attr('src', email_template_list.shop_logo_url) $('.email_banner img').attr('src', email_template_list.email_banner) email_subject = email_subject.replace(/{{customer.city}}/g, logs_list.customer_city); email_subject = email_subject.replace(/{{customer.country}}/g, logs_list.customer_country); email_subject = email_subject.replace(/{{customer.email}}/g, logs_list.customer_email); email_subject = email_subject.replace(/{{customer.first_name}}/g, logs_list.customer_first_name); email_subject = email_subject.replace(/{{customer.full_name}}/g, logs_list.customer_full_name); email_subject = email_subject.replace(/{{customer.last_name}}/g, logs_list.customer_last_name); email_subject = email_subject.replace(/{{customer.state}}/g, logs_list.customer_state); email_subject = email_subject.replace(/{{shop.name}}/g, logs_list.shop_name); email_subject = email_subject.replace(/{{shop.url}}/g, logs_list.shop_url); $('.email-subject-wrap').html(email_subject); message_body = message_body.replace(/{{customer.city}}/g, logs_list.customer_city); message_body = message_body.replace(/{{customer.country}}/g, logs_list.customer_country); message_body = message_body.replace(/{{customer.email}}/g, logs_list.customer_email); message_body = message_body.replace(/{{customer.first_name}}/g, logs_list.customer_first_name); message_body = message_body.replace(/{{customer.full_name}}/g, logs_list.customer_full_name); message_body = message_body.replace(/{{customer.last_name}}/g, logs_list.customer_last_name); message_body = message_body.replace(/{{customer.state}}/g, logs_list.customer_state); message_body = message_body.replace(/{{shop.name}}/g, logs_list.shop_name); message_body = message_body.replace(/{{shop.url}}/g, logs_list.shop_url); $('.message_body').html(message_body); email_footer = email_footer.replace(/{{customer.city}}/g, logs_list.customer_city); email_footer = email_footer.replace(/{{customer.country}}/g, logs_list.customer_country); email_footer = email_footer.replace(/{{customer.email}}/g, logs_list.customer_email); email_footer = email_footer.replace(/{{customer.first_name}}/g, logs_list.customer_first_name); email_footer = email_footer.replace(/{{customer.full_name}}/g, logs_list.customer_full_name); email_footer = email_footer.replace(/{{customer.last_name}}/g, logs_list.customer_last_name); email_footer = email_footer.replace(/{{customer.state}}/g, logs_list.customer_state); email_footer = email_footer.replace(/{{shop.name}}/g, logs_list.shop_name); email_footer = email_footer.replace(/{{shop.url}}/g, logs_list.shop_url); email_footer = email_footer.replace(/{{tools.unsubscribe}}/g, logs_list.unsubscribe); email_footer = email_footer.replace(/{{unsubscribe}}/g, 'Unsubscribe'); $('.email_footer').html(email_footer); } }, error : function(e){ console.log(e); // console.log(e.responseText); }, complete(XMLHttpRequest,status){ if(status=='timeout'){ // console.log('timeout'); } } }); $(document).on("click", "#sdsSubmitQABtn", function(){ var answerVal = $('#super-answer-text').val(); $('.super-email-load-wrap').show(); var answerData = { question_id: question_id, customer_id: shop_id, answer: answerVal, answer_customer: user_name, answer_customer_email: email_url }; var params = { answer: answerData }; $.ajax({ type : "POST", contentType: "application/json;charset=UTF-8", url : "https://dr.supersds.com/review/submit_answer", data : JSON.stringify(params), success : function(result) { var resultData = JSON.parse(result); console.log(resultData); $('.super-email-load-wrap').hide(); $('.super-email-notification-wrap .super-email-notification-title').html(resultData.message); $('.super-email-notification-wrap').removeClass('hidden').addClass('visible'); setTimeout(() => { $('.super-email-notification-wrap').removeClass('visible').addClass('hidden'); }, 4000) if (resultData.status == 'success') { localStorage.setItem('reviewPostSuccess', JSON.stringify(resultData)); setTimeout(() => { // window.open('thank-you-review'); window.open('thank-you-review', '_self'); }, 500); } }, error : function(e){ console.log(e); // console.log(e.responseText); $('.super-email-load-wrap').hide(); $('.super-email-notification-wrap .super-email-notification-title').html(e.message); $('.super-email-notification-wrap').removeClass('hidden').addClass('visible'); setTimeout(() => { $('.super-email-notification-wrap').removeClass('visible').addClass('hidden'); }, 4000) }, complete(XMLHttpRequest,status){ if(status=='timeout'){ //超时的回调 // console.log('timeout'); } } }); }); });