Night Nurse Cold Remedy – 160ml (2024)

'; e.target.insertAdjacentHTML('afterend', error); } } }, encreaseQty(e) { if (document.querySelector('.ajaxqtyerror')) { document.querySelector('.ajaxqtyerror').remove(); } let newqty = (document.getElementById('qty2').value * 1) + 1; if (newqty > 0 && newqty <= document.getElementById('maxAllowed').value) { document.getElementById('qty2').value = newqty; } else { let error = '

' + 'The maximum you may purchase is ' + document.getElementById('maxAllowed').value + '.' + '

£8.69

Night Nurse Cold Remedy – 160ml (1)

Just a few questions from our Pharmacist before you checkout to make sure this medicine is safe for you.

GPhC No. 2084549

Night Nurse Cold Remedy – 160ml (2)

0%

' + ''; document.getElementById('question_container1_parent').innerHTML = form; document.getElementById('questionbox').value = 0; document.getElementById('questionbox2').value = 0; document.getElementById('question_container1').innerHTML = response; let $pages = document.getElementsByClassName('itl-questions__page'); let $currentPage = $pages[0]; let $currentQuestion = $currentPage.querySelector('.its-speech-bubble'); setTimeout(function() { $currentQuestion.classList.add('open'); }, 1000); window.dispatchEvent(new Event('resize')); }).catch((error) => { console.log(error) }); document.getElementById('chatbot-progressbar__value').classList.add('text-cyan'); document.getElementById('chatbot-progressbar__value').classList.remove('justify-end', 'bg-cyan', 'text-white'); document.getElementById('chatbot-progressbar__value').style.width = '0%'; document.getElementById('progressbarval').innerHTML = 0; }); let questionset = document.getElementById('questionset').value; let formData = {'form_key': hyva.getFormKey(), 'questionset': questionset, 'bubblehtml': 1}; window.addEventListener('resize', function () { if (document.querySelector('.chatbot-header')) { let subtractHeight = document.querySelector('.chatbot-header').offsetHeight + document.querySelector('.chatbot-footer').offsetHeight + 20 + 'px'; document.querySelector('.chatbot-wrapper-inner').style.height = 'calc(100% - ' + subtractHeight + ')'; document.querySelector('.chatbot-wrapper-inner').style.marginTop = document.querySelector('.chatbot-header').offsetHeight + 10 + 'px'; } }); document.addEventListener('change', selectChanger); function selectChanger(event) { let element = event.target; if (element.classList.contains('dropdowncls')) { let name = element.getAttribute('name'), questionid = name.replace('customquestions[', '').replace(']', ''); if (!(element.classList.contains('requiredfield') && element.options[element.selectedIndex].textContent === 'Please Select') ) { load_answer_next(questionid, element.options[element.selectedIndex].textContent); } } } document.addEventListener('click', radioClick); function radioClick(event) { let element = event.target; if (element.classList.contains('radioclick')) { let name = element.getAttribute('name'), idval = element.getAttribute('id'), questionid = name.replace('customquestions[', '').replace(']', ''); load_answer_next(questionid, document.getElementById(idval + '_span').textContent); } } document.addEventListener('click', clickEdit); function clickEdit(event) { let element = event.target; if (element.closest('.clickanswerbox')) { let idval = element.closest('.clickanswerbox').getAttribute('id'), idval2 = idval.split('-'); element.closest('.clickanswerbox').remove(); document.querySelector('.answeroptions' + idval2[1]).style.display = 'block'; } } document.addEventListener('click', clickNextBtn); function clickNextBtn(event) { let element = event.target; if (element.classList.contains('nextbtn')) { let idval = element.getAttribute('id'), questionid = idval.replace('nextbtn_', ''), valtext = ''; document.querySelectorAll('.checkbox_' + questionid + ':checked').forEach(function (el) { valtext += document.querySelector("#" + el.getAttribute('id') + "_span").textContent + ", "; }); if (!element.classList.contains('requiredfield') && valtext != '') { load_answer_next(questionid, valtext.substring(0, valtext.length - 2)); } } } document.addEventListener('click', clearModal); function clearModal (event) { let element = event.target; if (element.closest('.chatbot-wrapper .btn-close')) { setTimeout(function () { document.getElementById('question_container1_parent').innerHTML = ''; }, 300); } } document.addEventListener('keypress', submitTextBox1); document.addEventListener('focusout', submitTextBox2); function submitTextBox1(event) { let element = event.target; if (element.classList.contains('textboxcls')) { if (event.keyCode === 13) { event.preventDefault(); let name = element.getAttribute('name'), questionid = name.replace('customquestions[', '').replace(']', ''), questionid2 = questionid.split('_'); if (element.value.trim() === '') { element.value = ''; } if (element.value !== '') { load_answer_next(questionid2[0], element.value, questionid2[1]); } } } } function submitTextBox2(event) { let element = event.target; if (element.classList.contains('textboxcls')) { let name = element.getAttribute('name'), questionid = name.replace('customquestions[', '').replace(']', ''), questionid2 = questionid.split('_'); if (element.value.trim() === '') { element.value = ''; } if (element.value !== '') { load_answer_next(questionid2[0], element.value, questionid2[1]); } } } document.addEventListener('focusout', submitMultiselect); function submitMultiselect(event) { let element = event.target; if (element.classList.contains('multiselect')) { let name = element.getAttribute('name'), id = element.getAttribute('id'); let questionid = name.replace('customquestions[', '').replace('][]', ''); let valtext = ''; document.querySelector('#' + id + ' option:selected').forEach(function (el) { valtext += el.textContent + ', '; }); if (!(element.classList.contains('requiredfield') && valtext == '')) { load_answer_next(questionid, valtext.substring(0, valtext.length - 2)); } } } function load_answer_next(name, value, parentid) { parentid = parentid || ''; let questionid = name.replace('customquestions[', '').replace(']', ''), parentclass = ''; if (parentid !== '') { parentclass = ' additionalquest_' + parentid; } if (value !== 'IMAGE_UPLOAD') { document.querySelector('.answeroptions' + questionid).style.display = 'none'; } let LoadQuestion = 1; if (document.getElementsByClassName('addstatus-' + questionid).length > 0) { LoadQuestion = 0; } if (value !== 'IMAGE_UPLOAD') { if (document.getElementById('answerbox-' + questionid)) { document.querySelector('.addstatus-' + questionid + parentclass).remove(); document.getElementById('answerbox-' + questionid).remove(); } let answer = '

' + '

' + '

' + '

' + '' + value + '' + '

...

' + '

' + '

' + '

'; document.querySelector('.nextbubble-' + questionid).insertAdjacentHTML('afterend', answer); } if (LoadQuestion === 1) { setTimeout(function() { LoadNewQuestion(); }, 500); } } function LoadNewQuestion() { let NextBoxId = (document.getElementById('questionbox').value * 1) + 1, NextBoxId2 = (document.getElementById('questionbox2').value * 1) + 1, product_question_id = (document.getElementById('product_question_id').value).split(','), questionset = document.getElementById('questionset').value; if (product_question_id[NextBoxId] > 0) { let formData = { 'form_key': hyva.getFormKey(), 'questionid': product_question_id[NextBoxId], 'bubblehtml': 1 }; fetch(window.location.protocol + '//' + window.location.host + '/question', { method: "POST", headers: { 'Content-type': 'application/json' }, body: JSON.stringify(formData), }).then(response => response.ok ? response.text() : '') .then(response => { if (response !== '') { document.getElementById('question_container1').insertAdjacentHTML('beforeend', response); let $pages = document.getElementsByClassName('itl-questions__page'); let index = 0; let $currentPage = $pages[index]; let $currentQuestion = $currentPage.querySelector( '.its-speech-bubble.nextbubble-' + product_question_id[NextBoxId] ); let $currentContent = $currentPage.querySelector( '.its-speech-bubble__item__content.nextbubblecontent-' + product_question_id[NextBoxId] ); $currentQuestion.scrollIntoView({behavior: 'smooth'}); setTimeout(function () { $currentQuestion.classList.add('open'); }, 1000); document.getElementById('questionbox').value = NextBoxId; document.getElementById('questionbox2').value = NextBoxId2; let progressbarPercentage = Math.round( parseInt(NextBoxId) * 100 / product_question_id.length ); document.getElementById('chatbot-progressbar__value').classList.remove('text-cyan'); document.getElementById('chatbot-progressbar__value').classList.add('justify-end', 'bg-cyan', 'text-white'); document.getElementById('chatbot-progressbar__value').style.width = progressbarPercentage + '%'; document.getElementById('progressbarval').innerHTML = progressbarPercentage; } }); } else { if (!(document.getElementsByClassName('box-tocart custombtn').length > 0)) { let d = '

' + '

' + '

' + '

' + '

-

' + '' + '

+

' + '

' + '' +'

' + '

' + '

'; document.getElementById('question_container1').insertAdjacentHTML('beforeend', d); let index = 0; let $pages = document.getElementsByClassName('itl-questions__page'); let $currentPage = $pages[index]; $currentPage.scrollIntoView({behavior: 'smooth', block: 'end'}); } document.getElementById('chatbot-progressbar__value').classList.remove('text-cyan'); document.getElementById('chatbot-progressbar__value').classList.add('justify-end', 'bg-cyan', 'text-white'); document.getElementById('chatbot-progressbar__value').style.width = '100%'; document.getElementById('progressbarval').innerHTML = '100'; document.querySelector('.its-qty__toggle.plus.manualplus').addEventListener('click', function (e) { if (document.querySelector('.ajaxqtyerror')) { document.querySelector('.ajaxqtyerror').remove(); } let newqty = (document.getElementById('qty').value * 1) + 1; if (newqty > 0 && newqty <= document.getElementById('maxAllowed').value) { document.getElementById('qty').value = newqty; } else { let error = '

' + 'The maximum you may purchase is ' + document.getElementById('maxAllowed').value + '.' + '

'; e.target.insertAdjacentHTML('afterend', error); let $pages = document.querySelector('.itl-questions__page'); let $error = $pages.querySelector('.mage-error'); $error.scrollIntoView({behavior: 'smooth', block: 'end'}); } }); document.querySelector('.its-qty__toggle.minus.manualminus').addEventListener('click', function (e) { if (document.querySelector('.ajaxqtyerror')) { document.querySelector('.ajaxqtyerror').remove(); } let newqty = (document.getElementById('qty').value * 1) - 1; if (newqty > 0 && newqty >= document.getElementById('minAllowed').value) { document.getElementById('qty').value = newqty; } else { if (document.getElementById('minAllowed').value > 1) { let error = '

' + 'The minimum you may purchase is ' + document.getElementById("minAllowed").value + '.' + '

'; e.target.insertAdjacentHTML('afterend', error); } } }); } } } } } let ShowAdditionalQuestion2 = function (qid, additionqid, chkid, chkbox) { const chkid1 = chkid || ''; const chkbox1 = chkbox || ''; if (document.querySelector('.additionalquest_' + qid)) { document.querySelector('.additionalquest_' + qid).remove(); } if (document.querySelector('#parent_additionalquesterrormsg_' + qid)) { document.querySelector('#parent_additionalquesterrormsg_' + qid).remove(); } if (chkbox1 == 'checkbox' && !document.querySelector('#' + chkid1 + ':checked')) { document.querySelector('.additionalquest_' + qid).remove(); } else if (!document.querySelector('.additionalquest_' + qid)) { let formData = { 'form_key': hyva.getFormKey(), 'questionid': additionqid, 'parentid': qid, 'bubblehtml': 1 }; fetch(window.location.protocol + '//' + window.location.host + '/question', { method: 'POST', headers: { 'Content-type': 'application/json' }, body: JSON.stringify(formData), }).then(response => response.ok ? response.text() : '') .then(response => { if (document.querySelector('.additionalquest_' + qid)) { document.querySelector('.additionalquest_' + qid).remove(); } if (document.querySelector('#parent_additionalquesterrormsg_' + qid)) { document.querySelector('#parent_additionalquesterrormsg_' + qid).remove(); } if (document.querySelector('#answerbox-' + qid)) { document.querySelector('#answerbox-' + qid).insertAdjacentHTML('beforeend', response); } else { document.querySelector('.nextbubble-' + qid).insertAdjacentHTML('beforeend', response); } let NextBoxId = (document.querySelector('#questionbox2').value * 1) + 1; let index = 0; let $pages = document.getElementsByClassName('itl-questions__page'); let $currentPage = $pages[index], $currentQuestion = $currentPage.querySelector( '.its-speech-bubble.nextbubble-' + additionqid ); $currentPage.scrollIntoView({behavior: 'smooth', block: 'end'}); setTimeout(function () { $currentQuestion.classList.add('open'); }, 1000); document.getElementById('questionbox2').value = NextBoxId; }); } checkforerrormsg(); } let HideAdditionalQuestion2 = function (qid, additionqid) { document.querySelectorAll('.additionalquest_' + qid).forEach(function (el) { el.remove(); }) if (document.querySelector('#parent_additionalquesterrormsg_' + qid)) { document.querySelector('#parent_additionalquesterrormsg_' + qid).remove(); } checkforerrormsg(); } let ShowErrMsg2 = function (qid, prevent, chkid, chkbox, optionid) { // optional arguments aren't supposed like that in IE const optionid1 = optionid || ''; const chkid1 = chkid || ''; const chkbox1 = chkbox || ''; let ceclass; if (chkbox1 == 'checkbox' && !(document.querySelector('#' + chkid1 + ':checked'))) { document.querySelector('.questerrmsg_' + qid).remove(); } else { if (document.querySelector('.questerrmsg_' + qid)) { document.querySelector('.questerrmsg_' + qid).remove(); } if (prevent == 1) { ceclass = ' border-red-thunderbird'; } else { ceclass = ' border-grey-hit'; } let additionquestid = ''; if (document.querySelector('.diverrmsg_' + qid).getAttribute('id') != '') { additionquestid = ' id="parent_' + document.querySelector('.diverrmsg_' + qid).getAttribute('id') + '"'; } let CustomErrorMsg2; if (optionid1 > 0) { CustomErrorMsg2 = document.querySelector('#diverrmsg_' + optionid1).innerHTML; } else { CustomErrorMsg2 = document.querySelector('.diverrmsg_' + qid).innerHTML; } let errmsg = '

' + '

' + '

' + '' + CustomErrorMsg2 + '

' + '

' + '

'; if (document.querySelector('#answerbox-' + qid)) { document.querySelector('#answerbox-' + qid).insertAdjacentHTML('afterend', errmsg); } else { document.querySelector('.nextbubble-' + qid).insertAdjacentHTML('afterend', errmsg); } document.querySelector('.questerrmsg_' + qid).scrollIntoView({behavior: 'smooth', block: 'end'}); } checkforerrormsg(); } let HideErrMsg2 = function (qid) { if (document.querySelector('.questerrmsg_' + qid)) { document.querySelector('.questerrmsg_' + qid).remove(); } checkforerrormsg(); } let checkforerrormsg = function () { if (document.querySelector('[data-alert-wrapper]')) { if (document.querySelector('.box-tocart.custombtn')) { document.querySelector('.box-tocart.custombtn').classList.remove('block'); document.querySelector('.box-tocart.custombtn').classList.add('hidden'); } } else { if (document.querySelector('.box-tocart.custombtn')) { document.querySelector('.box-tocart.custombtn').classList.remove('hidden'); document.querySelector('.box-tocart.custombtn').classList.add('block'); } } } let quickRegex = function (element) { let self = element; let test = false; let selector = self && self.getAttribute('data-selector') && self.getAttribute('data-selector') > 0 ? parseInt(self.getAttribute('data-selector')) : false; let value = self.value; if (selector && valObj && valObj[selector] && valObj[selector].length) { let match = /^\/(.*)\/([a-z]*)$/.exec(valObj[selector][0]); let pattern = new RegExp(match[1], match[2]); test = pattern.test(value); } if (test) { HideErrMsg(selector); } else { ShowErrMsg(selector, 1); } } let quickRegex2 = function (element) { let self = element; let test = false; let selector = self && self.getAttribute('data-selector') && self.getAttribute('data-selector') > 0 ? parseInt(self.getAttribute('data-selector')) : false; let value = self.value; if (selector && valObj && valObj[selector] && valObj[selector].length) { let match = /^\/(.*)\/([a-z]*)$/.exec(valObj[selector][0]); let pattern = new RegExp(match[1], match[2]); test = pattern.test(value); } if (test) { HideErrMsg2(selector); } else { ShowErrMsg2(selector, 1); } } let CheckForOptionActionMultiple2 = function (qid) { HideAdditionalQuestion(qid); HideErrMsg(qid); const multisel = document.querySelector('#options_' + qid + '_multiselect').value; for (i = 0; i < multisel.length; i++) { let optid = multisel[i]; if (document.querySelector('#optionaction_' + optid)) { if (document.querySelector('#optionaction_' + optid).value == 1) { ShowAdditionalQuestion2(qid, document.querySelector('#optionadditionalquest_' + optid).value); } else if (document.querySelector('#optionaction_' + optid).value == 2) { ShowErrMsg2(qid, document.querySelector('#optionprevent_' + optid).value); } } } checkforerrormsg(); } let CheckForOptionAction2 = function (qid) { const optid = document.querySelector('#options_' + qid + '_dropdown').value; if (document.querySelector('#optionaction_' + optid)) { if (document.querySelector('#optionaction_' + optid).value == 1) { ShowAdditionalQuestion2(qid, document.querySelector('#optionadditionalquest_' + optid).value); HideErrMsg2(qid); checkforerrormsg(); return 2; } else if (document.querySelector('#optionaction_' + optid).value == 2) { ShowErrMsg2(qid, document.querySelector('#optionprevent_' + optid).value, '', '', optid); HideAdditionalQuestion2(qid); checkforerrormsg(); return 1; } else { HideAdditionalQuestion2(qid); HideErrMsg2(qid); checkforerrormsg(); return 1; } } else { HideAdditionalQuestion2(qid); HideErrMsg2(qid); checkforerrormsg(); return 1; } } let LoadAdditionalQuestions = function (questionset) { let ExtraHTML = ''; let IsError = 2; document.querySelector('.super-attribute-select').forEach(function (el) { ExtraHTML += ''; if (el.value == '') { IsError = 1; } }); if (IsError == 1) { alert('Please select option'); } else { if (document.querySelector('.mycustomquestionset')) { document.querySelector('div.mycustomquestionset').scrollIntoView({behavior: 'smooth', block: 'start'}); } else { let formData = {'questionset': questionset}; document.querySelector('.mycustomquestionset').remove(); fetch(window.location.protocol + '//' + window.location.host + '/question', { method: 'POST', headers: { 'Content-type': 'application/json' }, body: JSON.stringify(formData), }).then(response => response.ok ? response.text() : '') .then(response => { document.querySelector('#extra_question_data').innerHTML(response); }); } } } let ShowAdditionalQuestion = function (qid, additionqid, chkid, chkbox) { const chkid1 = chkid || ''; const chkbox1 = chkbox || ''; if (document.querySelector('.additionalquest_' + qid)) { document.querySelector('.additionalquest_' + qid).remove(); } if (chkbox1 == 'checkbox' && !document.querySelector("#" + chkid1 + ':checked')) { document.querySelector('.additionalquest_' + qid).remove(); } else if (!document.querySelector('.additionalquest_' + qid)) { document.querySelector('body.catalog-product-view').classList.add('opacity-30'); let formData = {'questionid': additionqid, 'parentid': qid}; fetch(window.location.protocol + '//' + window.location.host + '/question', { method: 'POST', headers: { 'Content-type': 'application/json' }, body: JSON.stringify(formData), }).then(response => response.ok ? response.text() : '') .then(response => { document.querySelector('#optiondivid_' + qid).insertAdjacentHTML('afterend', response); document.querySelector('body.catalog-product-view').classList.remove('opacity-30'); }); } showhidecartbtn(); } let HideAdditionalQuestion = function (qid, additionqid) { let additionqid1 = additionqid || ''; if (document.querySelector('.additionalquest_' + qid)) { document.querySelector('.additionalquest_' + qid).remove(); } showhidecartbtn(); } let showhidecartbtn = function () { if (document.querySelector('[data-alert-wrapper]')) { document.querySelector('.addtocart_customquesitons').classList.remove('block'); document.querySelector('.addtocart_customquesitons').classList.add('hidden'); } else { document.querySelector('.addtocart_customquesitons').classList.remove('hidden'); document.querySelector('.addtocart_customquesitons').classList.add('block'); } } let CheckForOptionActionMultiple = function (qid) { HideAdditionalQuestion(qid); HideErrMsg(qid); let multisel = document.querySelector('#options_' + qid + '_multiselect').value; for (let i = 0; i < multisel.length; i++) { let optid = multisel[i]; if (document.querySelector('#optionaction_' + optid)) { if (document.querySelector('#optionaction_' + optid).value == 1) { ShowAdditionalQuestion(qid, document.querySelector('#optionadditionalquest_' + optid).value); } else if (document.querySelector('#optionaction_' + optid).value == 2) { ShowErrMsg(qid, document.querySelector('#optionprevent_' + optid).value); } } } showhidecartbtn(); } let CheckForOptionAction = function (qid) { let optid = document.querySelector('#options_' + qid + '_dropdown').value; if (document.querySelector('#optionaction_' + optid)) { if (document.querySelector('#optionaction_' + optid).value == 1) { ShowAdditionalQuestion(qid, document.querySelector('#optionadditionalquest_' + optid).value); HideErrMsg(qid); } else if (document.querySelector('#optionaction_' + optid).value == 2) { ShowErrMsg(qid, document.querySelector('#optionprevent_' + optid).value); HideAdditionalQuestion(qid); } else { HideAdditionalQuestion(qid); HideErrMsg(qid); } } else { HideAdditionalQuestion(qid); HideErrMsg(qid); } showhidecartbtn(); } let ShowErrMsg = function (qid, prevent, chkid, chkbox) { const chkid1 = chkid || ''; const chkbox1 = chkbox || ''; let ceclass; if (chkbox1 == 'checkbox' && !document.querySelector('#' + chkid1 + ':checked')) { if (document.querySelector('.questerrmsg_' + qid)) { document.querySelector('.questerrmsg_' + qid).remove(); } } else if (!(document.querySelector('.questerrmsg_' + qid))) { if (prevent == 1) { ceclass = ' border-red-thunderbird'; } else { ceclass = ' border-grey-hit'; } let errmsg = '

' + '

' + '

' + '' + document.querySelector('.diverrmsg_' + qid).innerHTML + '

' + '

' + '

'; document.querySelector('#optiondivid_-' + qid).insertAdjacentHTML('beforeend', errmsg); } showhidecartbtn(); } let HideErrMsg = function (qid) { if (document.querySelector('.questerrmsg_' + qid)) { document.querySelector('.questerrmsg_' + qid).remove(); } showhidecartbtn(); } window.ShowAdditionalQuestion2 = ShowAdditionalQuestion2; window.HideAdditionalQuestion2 = HideAdditionalQuestion2; window.ShowErrMsg2 = ShowErrMsg2; window.HideErrMsg2 = HideErrMsg2; window.checkforerrormsg = checkforerrormsg; window.quickRegex2 = quickRegex2; window.CheckForOptionActionMultiple2 = CheckForOptionActionMultiple2; window.CheckForOptionAction2 = CheckForOptionAction2; window.LoadAdditionalQuestions = LoadAdditionalQuestions; window.ShowAdditionalQuestion = ShowAdditionalQuestion; window.HideAdditionalQuestion = HideAdditionalQuestion; window.showhidecartbtn = showhidecartbtn; window.CheckForOptionActionMultiple = CheckForOptionActionMultiple; window.CheckForOptionAction = CheckForOptionAction; window.ShowErrMsg = ShowErrMsg; window.HideErrMsg = HideErrMsg; window.quickRegex = quickRegex;

Night Nurse Cold Remedy – 160ml (2024)

References

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Aron Pacocha

Last Updated:

Views: 6476

Rating: 4.8 / 5 (48 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Aron Pacocha

Birthday: 1999-08-12

Address: 3808 Moen Corner, Gorczanyport, FL 67364-2074

Phone: +393457723392

Job: Retail Consultant

Hobby: Jewelry making, Cooking, Gaming, Reading, Juggling, Cabaret, Origami

Introduction: My name is Aron Pacocha, I am a happy, tasty, innocent, proud, talented, courageous, magnificent person who loves writing and wants to share my knowledge and understanding with you.