console.log('uid='); //*** time check 1 (0.01558s elapsed) //*** time check 2 (0.01561s elapsed) //*** JJ itemId=laxacat-hairball-rem //*** pageType=category //*** time check 3 (0.01728s elapsed) //*** forceOutOfStock=false //*** time check 4 (0.0173s elapsed) //*** public_mod_structuredData_renderJsonByItemId found //*** public_mod_structuredData enabled var script = document.createElement('script'); script.setAttribute('type', 'application/ld+json'); script.innerHTML = "{\"@context\":\"http:\\/\\/schema.org\",\"@type\":\"BreadcrumbList\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@id\":\"https:\\/\\/www.entirelypets.com\\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@id\":\"https:\\/\\/www.entirelypets.com\\/dogsupplies1.html\",\"name\":\"Dog Supplies\"}},{\"@type\":\"ListItem\",\"position\":3,\"item\":{\"@id\":\"https:\\/\\/www.entirelypets.com\\/catsupplies.html\",\"name\":\"Cat Supplies\"}},{\"@type\":\"ListItem\",\"position\":4,\"item\":{\"@id\":\"https:\\/\\/www.entirelypets.com\\/dogsupplies.html\",\"name\":\"Dog Supplies\"}},{\"@type\":\"ListItem\",\"position\":5,\"item\":{\"@id\":\"https:\\/\\/www.entirelypets.com\\/stooleatprev.html\",\"name\":\"Food Supplements\"}},{\"@type\":\"ListItem\",\"position\":6,\"item\":{\"@id\":\"https:\\/\\/www.entirelypets.com\\/laxatives.html\",\"name\":\"Laxatives & Hairball Treatments\"}},{\"@type\":\"ListItem\",\"position\":7,\"item\":{\"@id\":\"https:\\/\\/www.entirelypets.com\\/laxacat-hairball-rem.html\",\"name\":\"LaxaCat Hairball Remedy\"}}]}" document.getElementsByTagName('head')[0].appendChild(script); ; var script = document.createElement('script'); script.setAttribute('type', 'application/ld+json'); script.innerHTML = "{\"@context\":\"http:\\/\\/schema.org\",\"@type\":\"Product\",\"offers\":{\"@type\":\"Offer\",\"price\":\"0.00\",\"priceCurrency\":\"USD\",\"priceValidUntil\":\"2025-03-20\",\"seller\":{\"@type\":\"Organization\",\"name\":\"Entirelypets.com\"},\"@id\":\"https:\\/\\/www.entirelypets.com\\/laxacat-hairball-rem.html#offers\",\"url\":\"https:\\/\\/www.entirelypets.com\\/laxacat-hairball-rem.html\",\"itemCondition\":\"NewCondition\",\"availability\":\"OutOfStock\"},\"name\":\"LaxaCat Hairball Remedy\",\"sku\":\"laxacat-hairball-rem\",\"@id\":\"https:\\/\\/www.entirelypets.com\\/laxacat-hairball-rem.html#product\",\"review\": [{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"4.0\"},\"author\":{\"@type\":\"person\",\"name\":\"mapu\"},\"reviewBody\":\"it works! no hairball vomiting, and it helped with my cat\'s constipation. my cat is finicky and doesn\'t always consume the laxacat, but when she does it definitely works.\",\"datePublished\":\"2019-07-14 00:18:42\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"1.0\"},\"author\":{\"@type\":\"person\",\"name\":\"Catowner1\"},\"reviewBody\":\"Smells rancid and strongly of vinegar. Obviously, my cats did not eat these, and they aren\'t picky eaters. Avoid at all costs!\",\"datePublished\":\"2018-09-29 15:50:05\"},{\"@type\":\"Review\",\"itemReviewed\":\"3-PACK LaxaCat Hairball Remedy (270 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"4.0\"},\"author\":{\"@type\":\"person\",\"name\":\"Alex021\"},\"reviewBody\":\"Despite the strong smell chicks, that the cat does not like, I am successful to give it to him with something else tasty.\\r\\nAfter 2-3 pieces hairballs out perfectly.\",\"datePublished\":\"2017-03-17 05:10:28\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"5.0\"},\"author\":{\"@type\":\"person\",\"name\":\"maxthecat\"},\"reviewBody\":\"i will be returning to entirelypets for this again:)\",\"datePublished\":\"2016-06-15 08:24:59\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"5.0\"},\"author\":{\"@type\":\"person\",\"name\":\"Loretta\"},\"reviewBody\":\"My long haired torti wont lick the other hairball remedy in a tube. So, I am happy she likes these chews. Ate them right up.\",\"datePublished\":\"2013-12-31 10:18:39\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"5.0\"},\"author\":{\"@type\":\"person\",\"name\":\"madz\"},\"reviewBody\":\"I\'m not really sure if it\'s working, but my cats loves it\",\"datePublished\":\"2013-10-27 11:52:51\"},{\"@type\":\"Review\",\"itemReviewed\":\"6-PACK LaxaCat Hairball Remedy (540 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"5.0\"},\"author\":{\"@type\":\"person\",\"name\":\"Chris\"},\"reviewBody\":\"13-year-old DSH \\\"Boy\\\" likes to eat these treats, and they do unstop his guts. Whenever he vomits up his food, we give him some of these and limit other food for a few hours, and the problem usually goes away. However, they are not a substitute for regular brushing - we still need to do that, so that he doesn\'t ingest too much loose fur.\",\"datePublished\":\"2013-10-19 11:07:12\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"5.0\"},\"author\":{\"@type\":\"person\",\"name\":\"Jas\"},\"reviewBody\":\"We have a 14 year cat who has always had problems with hairballs and yes, constipation. She is a groomer no matter how many times I comb her. Her last visit to the vet was because she wasn\'t have regular bow movements - one every four days. She was eating & drinking the same. I was prescribed 5 daily penicillin shots for her and when I told the vet the vet she was taking laxacat daily, she said to increase to twice a day. What a difference it made. Her stools were real hard at first & full of hair. Now she takes the laxacat as prescribed & has continued to improve. I have been very pleased with it. It also decreased her vomitting of hair balls. Funny thing is she loves the taste of them & we crumble one twice daily over her wet food. In no time the food is gone. She eats dry food as well. It is a great product & one that I find the best on the market. No more fighting her with products that come in the tube.\",\"datePublished\":\"2013-10-05 17:23:15\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"3.0\"},\"author\":{\"@type\":\"person\",\"name\":\"sixcathouse\"},\"reviewBody\":\"The soft chews, in my opinion, were not that soft. I had to break them in half, espcially for my senior cat, to eat. Then when I broke them in half, they kind of crumbled apart. Though they did eat them. So the flavor must be ok.\",\"datePublished\":\"2013-09-10 07:57:05\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"4.0\"},\"author\":{\"@type\":\"person\",\"name\":\"thurt\"},\"reviewBody\":\"Product worked for my cat. 25 pounds and a hairball problem.\",\"datePublished\":\"2013-09-06 14:07:18\"},{\"@type\":\"Review\",\"itemReviewed\":\"3-PACK LaxaCat Hairball Remedy (270 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"5.0\"},\"author\":{\"@type\":\"person\",\"name\":\"Kitties M.\"},\"reviewBody\":\"My kitties love there laxative morsels. It keeps them free from hair balls and is very easy to administer. They think they are special treats.\",\"datePublished\":\"2013-08-08 22:58:42\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"2.0\"},\"author\":{\"@type\":\"person\",\"name\":\"MamaKat58\"},\"reviewBody\":\"My cats didn\'t take to this product... and i tried several times to NO avail.. :(\",\"datePublished\":\"2013-06-02 13:11:15\"},{\"@type\":\"Review\",\"itemReviewed\":\"3-PACK LaxaCat Hairball Remedy (270 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"5.0\"},\"author\":{\"@type\":\"person\",\"name\":\"cat 1.\"},\"reviewBody\":\"Only some of the cats will eat this. When they do , they are not going around throwing up furballs\",\"datePublished\":\"2013-05-28 12:18:03\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"5.0\"},\"author\":{\"@type\":\"person\",\"name\":\"Little K.\"},\"reviewBody\":\"My kitty actually thinks these are a treat and loves them. I throw them up the stairs so he gets exercise while he\'s also eating something I\'m using for him if he needs it which is once in a while. He eats raw but sometimes has a bit of trouble going #2 and this does the trick!\",\"datePublished\":\"2013-05-19 10:59:33\"},{\"@type\":\"Review\",\"itemReviewed\":\"3-PACK LaxaCat Hairball Remedy (270 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"4.0\"},\"author\":{\"@type\":\"person\",\"name\":\"PJ\"},\"reviewBody\":\"A hair ball med cats will actually eat! You can even crumble it as a treat on their food.\",\"datePublished\":\"2013-04-10 12:13:51\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"4.0\"},\"author\":{\"@type\":\"person\",\"name\":\"Mary\"},\"reviewBody\":\"I use this to help my male cat move his bowels when he hasn\'t been able to go in a couple of days. It works. Since he also has urinary tract issues, I am careful how much I give him - I break the pieces in half and give him only one half-piece a day for a couple of days, then I skip a day or two. My thinking is that the high fiber pulls water into his colon, which is good for helping him move his bowels; but, it also seems like he is not urinating as much. If he has a problem with crystals, it\'s my understanding that the goal is to flush out his urinary system with lots of water - that\'s why I am careful about how much of this I use. I do like the product and will continue to use it. He likes it, too.\",\"datePublished\":\"2013-03-21 17:22:44\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"5.0\"},\"author\":{\"@type\":\"person\",\"name\":\"Ocho\'s m.\"},\"reviewBody\":\"Yay. Something that actually works. My cat wouldn\'t touch them at first but I kept offering for a few days and now she gobbles them up immediately. And no more hacking and coughing and spit up hairballs.\",\"datePublished\":\"2013-03-06 16:53:24\"},{\"@type\":\"Review\",\"itemReviewed\":\"3-PACK LaxaCat Hairball Remedy (270 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"5.0\"},\"author\":{\"@type\":\"person\",\"name\":\"EJvassar\"},\"reviewBody\":\"Took a good week of treating the cats. But their coughing as stopped now. Will continue to brush and treat while they are shedding this spring.\",\"datePublished\":\"2013-02-27 09:12:07\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"5.0\"},\"author\":{\"@type\":\"person\",\"name\":\"fatotto12\"},\"reviewBody\":\"So the \\\"paste\\\" was not appetizing for one of my cats, but LaxaCat is the best product ever. She is always cleaning herself and of course has ton of hairballs, this has helped a ton.\",\"datePublished\":\"2013-01-24 20:45:26\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"5.0\"},\"author\":{\"@type\":\"person\",\"name\":\"Pumpkin\"},\"reviewBody\":\"kids have stopped hacking up hairballs once they started on it. my boy doesn\'t like the paste taste, so he thinks of these as treats and inhales them\",\"datePublished\":\"2013-01-23 14:38:14\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"1.0\"},\"author\":{\"@type\":\"person\",\"name\":\"jumpseed\"},\"reviewBody\":\"Great idea but my cat won\'t touch them, and he laps up the goo-in-a-tube, grocery store kind. Maybe you could crumble them and add to canned food but that would sort of negate the ease of using them.\",\"datePublished\":\"2013-01-19 08:05:41\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"3.0\"},\"author\":{\"@type\":\"person\",\"name\":\"TheBullyMomma\"},\"reviewBody\":\"I have 2 short haired kittens that just love these and 1 short haired kitten who won\'t touch them. They don\'t seem to help with hairballs with the 2 who eat them daily however.\",\"datePublished\":\"2012-12-18 10:10:06\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"5.0\"},\"author\":{\"@type\":\"person\",\"name\":\"Renee\"},\"reviewBody\":\"I have always used Laxatone in the tube. Most of my kitties, I don\'t have a problem giving them the product from the tube. I have one longed haired cat that refuses to take the paste from the tube, so this makes a mess all over her, me and whatever else gets in the way. With these little chews, no mess!!! It\'s great. She eats them and all my other cats like them too.\",\"datePublished\":\"2012-12-15 20:39:42\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"1.0\"},\"author\":{\"@type\":\"person\",\"name\":\"Cat e.\"},\"reviewBody\":\"My cat did not like it at all. My cat prefers food that is not healthy for her. She refused to eat the Laxacat , however, will eat Friskies Hairball Remedy. Please don\'t go by what my cat refuses to eat. You must try it on your own cat.\",\"datePublished\":\"2012-11-11 07:23:22\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"3.0\"},\"author\":{\"@type\":\"person\",\"name\":\"toys\"},\"reviewBody\":\"Neither of my cats consider this a treat. They will occasionally eat it mixed in with their food. But I have not seen a hairball since these have been mixed in the food.\",\"datePublished\":\"2012-10-31 19:54:13\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"4.0\"},\"author\":{\"@type\":\"person\",\"name\":\"katz\"},\"reviewBody\":\"cats love it and its Much easier than paste in the tube\",\"datePublished\":\"2012-10-23 07:58:25\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"5.0\"},\"author\":{\"@type\":\"person\",\"name\":\"taz\"},\"reviewBody\":\"I have bought every laxative on the market, but what good is it if the cat won\'t eat it ... he loves this, so I will buy more\",\"datePublished\":\"2012-08-10 13:44:55\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"5.0\"},\"author\":{\"@type\":\"person\",\"name\":\"lotus\"},\"reviewBody\":\"We have six cats from 2 to 15 and only one of them snubs her nose at them. The others beg for more. I intend to purchase more soon.\",\"datePublished\":\"2012-07-31 20:19:29\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"3.0\"},\"author\":{\"@type\":\"person\",\"name\":\"LaVerne\"},\"reviewBody\":\"My cat wouldn\'t eat these, tried cuting them up.\",\"datePublished\":\"2012-07-21 14:24:52\"},{\"@type\":\"Review\",\"itemReviewed\":\"LaxaCat Hairball Remedy (90 Soft Chews)\",\"reviewRating\":{\"@type\":\"Rating\",\"ratingValue\":\"2.0\"},\"author\":{\"@type\":\"person\",\"name\":\"catmom\"},\"reviewBody\":\"I have 3 cats, only 1 of which I would consider \\\"finicky\\\". But none of them would touch these chews. Won\'t do much good if they won\'t eat them. The dog loved \'em though!\",\"datePublished\":\"2012-06-22 12:00:13\"}],\"aggregateRating\":{\"@type\":\"AggregateRating\",\"reviewCount\":\"37\",\"ratingValue\":\"4.0\"}}" document.getElementsByTagName('head')[0].appendChild(script); ; //*** time check 5 (0.05868s elapsed) //*** mod_storeClosed called //*** time check 6 (0.05884s elapsed) //*** time check 7 (0.05884s elapsed) var pdServerTime = new Date("2025-03-17T00:25:07-05:00"); var pdProductId = "laxacat-hairball-rem"; //************************************************ //************ JS/CSS FILE ROUTINES ************* //************************************************ function pdLoadJsCssFile(filename, filetype){ if (filetype=="js") { var fileref=document.createElement('script'); fileref.setAttribute("type","text/javascript"); fileref.setAttribute("async",true); fileref.setAttribute("src", filename); } else if (filetype=="css") { var fileref=document.createElement("link"); fileref.setAttribute("rel", "stylesheet"); fileref.setAttribute("type", "text/css"); fileref.setAttribute("href", filename); } if (typeof fileref!="undefined") document.getElementsByTagName("head")[0].appendChild(fileref); } function pdAddStyle(css) { var style = document.createElement("style"); style.innerHTML = css; document.getElementsByTagName("body")[0].appendChild(style); } //*** time check 8 (0.05885s elapsed) /* pdGetElementsByClassName -- Revised to avoid JS conflicts with libraries that override native "getElementsByClassName" browser function in IE Developed by Robert Nyman, http://www.robertnyman.com Code/licensing: http://code.google.com/p/getelementsbyclassname/ */ var pdGetElementsByClassName = function (className, tag, elm){ var ieVersion = getInternetExplorerVersion(); if (ieVersion == -1 && document.getElementsByClassName) { pdGetElementsByClassName = function (className, tag, elm) { elm = elm || document; var elements = elm.getElementsByClassName(className), nodeName = (tag)? new RegExp("\b" + tag + "\b", "i") : null, returnElements = [], current; for(var i=0, il=elements.length; i -1) { if(signatureList[i] == 'android') { //*** ONLY CONSIDER android a mobile device if "mobile" is also present in user agent string if(agent.indexOf("mobile") > -1) isMobile = true; } else { isMobile = true; } } } return isMobile; } function pdIsIpad() { var isIpad = false; var signatureList = new Array('ipad'); var agent = navigator.userAgent.toLowerCase(); for(var i=0;i -1) isIpad = true; } return isIpad; } function pdIsTablet() { var isTablet = false; var signatureList = new Array('ipad', 'android'); var agent = navigator.userAgent.toLowerCase(); for(var i=0;i -1) { isTablet = true; //*** ASSUME TABLET if(signatureList[i] == 'android') { //*** ONLY CONSIDER android a mobile device if "mobile" is also present in user agent string if(agent.indexOf("mobile") > -1) isTablet = false; } else { isTablet = true; } } } return isTablet; } function pdFormatCurrency(num, includeDollarSign) { num = num.toString().replace(/$|\,/g,''); if(isNaN(num)) num = "0"; sign = (num == (num = Math.abs(num))); num = Math.floor(num*100+0.50000000001); cents = num%100; num = Math.floor(num/100).toString(); if(cents<10) cents = "0" + cents; for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++) num = num.substring(0,num.length-(4*i+3))+','+ num.substring(num.length-(4*i+3)); var returnValue = (((sign)?'':'-') + num + '.' + cents); if(includeDollarSign == true) returnValue = "$" + returnValue; return returnValue; } function pdFindParentForm(element) { var elm,parentForm; for (elm = element.parentNode; elm; elm = elm.parentNode) { if(elm.tagName.toLowerCase() == "form") { parentForm = elm; break; } } return parentForm; } function pdHideForLoggedInUser() { var hideList = pdGetElementsByClassName("pdHideForLoggedInUser", null); for(var i=0;i (37 reviews)"; elements.forEach(element => { element.innerHTML = newHtml; }); elements = document.querySelectorAll(".pdRatingStarsWrapper[productId='3-pack-laxacat-hairball-remedy-180-soft-chews'], .pdRatingStarsWrapper[data-itemid='3-pack-laxacat-hairball-remedy-180-soft-chews']"); newHtml = "
(37 reviews)"; elements.forEach(element => { element.innerHTML = newHtml; }); elements = document.querySelectorAll(".pdRatingStarsWrapper[productId='6-pack-laxacat-hairball-remedy-360-soft-chews'], .pdRatingStarsWrapper[data-itemid='6-pack-laxacat-hairball-remedy-360-soft-chews']"); newHtml = "
(37 reviews)"; elements.forEach(element => { element.innerHTML = newHtml; }); pdStarsRefreshFlag = false; } } pdDisplayCategoryStars(); //*** time check 12 (0.07027s elapsed) $(".abr-flex-favorite-link").on("click", function(){ var pdAddToFavoritesAction = "https://myaccount.entirelypets.com/mod_favorites/ajax/favoritesAddItemNew.php"; var itemId = jQuery(this).parent().parent().data("data-itemid"); var productId = jQuery(this).parent().parent().data("productId"); var item; if(!isBlank(itemId)){ item = itemId; }else{ item = productId; } var pdAddToFavoritesButton = jQuery(this); if (!item) { console.log("Unable to identify item id for adding to favorites"); return false; } var data = { vwitem: item } //**** IF ITEM IS ALREADY FAVORITED, DISABLE ACTIONS AND DIRECT TO CUSTOMER FAVORITES *** var pdItemAlreadyInFavorites = jQuery(this).children("div").hasClass("is-favorite"); var pdItemAddedToFavorites = jQuery(this).children("div").hasClass("is-added"); if(pdItemAlreadyInFavorites == true || pdItemAddedToFavorites == true){ console.log("Item is already in customer favorites"); return false; } jQuery.ajax({ 'async': false, 'global': false, 'xhrFields': {withCredentials: true}, 'type': "POST", 'url': pdAddToFavoritesAction, 'data': data, 'crossDomain': true, 'success': function (response) { if (response.indexOf("<") == 0){ response = response.slice(response.indexOf(">")+1); } var data = jQuery.parseJSON(response); console.log(data); if (data['loggedIn'] == true){ jQuery(pdAddToFavoritesButton).addClass("is-favorite"); console.log("Success adding to favorites"); } else{ console.log("User not logged in adding to favorites"); } }, 'error': function(xhr, status, error){ var errorMessage = xhr.status + ': ' + xhr.statusText console.log('Error - ' + errorMessage); } }); }); function pdAddToFavorites(orderForm,index,productUrl) { var pdAddToFavoritesAction = "https://myaccount.entirelypets.com/mod_favorites/favoritesAddItem.php"; if(pdIsBlank(index)) index = 0; var item = "vwitem" + index; var itemAttr = "vwattr" + index + "_"; //*** CAN'T FIND MULTIFORM ELEMENT? FALL BACK TO SINGLE ITEM CASE if(typeof orderForm[item] == "undefined") { item = "item"; itemAttr = "vwattr_"; } //******** ATTACH PRODUCT ID INPUT ************** if(item != "item") { var inputProductId = document.createElement("INPUT"); inputProductId.type = "hidden"; inputProductId.name = "add-single-favorites"; inputProductId.value = index; orderForm.appendChild(inputProductId); } if(productUrl == "autoDetect") productUrl = String(document.location); if(!pdIsBlank(productUrl)) { var inputOptions = document.createElement("INPUT"); inputOptions.type = "hidden"; inputOptions.name = "productUrl"; inputOptions.value = productUrl; orderForm.appendChild(inputOptions); } var tempAction = orderForm.action; var copiedQueryString = ""; var queryStringPosition = tempAction.indexOf("?"); if(queryStringPosition > -1) { copiedQueryString = tempAction.substring(queryStringPosition, tempAction.length); copiedQueryString = copiedQueryString.replace("+", "%20"); } orderForm.action=pdAddToFavoritesAction + copiedQueryString; if(orderForm.target != "_top") orderForm.target = ""; //*** COMPAT W/ SCFC orderForm.submit(); orderForm.action = tempAction; orderForm.removeChild(inputProductId); orderForm.removeChild(inputOptions); return false; } //*** time check 13 (0.07034s elapsed) //*** time check 14 (0.07035s elapsed) //*** time check 15 (0.07038s elapsed) if (typeof pdPerformLoginActions === "function") { pdPerformLoginActions(false); } //*** time check 16 (0.07124s elapsed) //*** time check 17 (0.07189s elapsed) //*** time check 18 (0.07265s elapsed) //*** time check 19 (0.07265s elapsed) //*** time check 20 (0.07325s elapsed) //*** time check 21 (0.07388s elapsed) //*** time check 22 (0.07529s elapsed) //********************************* //*** BEGIN mod_promotionCenter *** //********************************* //*** COULD NOT FIND PUBLIC FUNCTION 'public_mod_promotionCenter_getRenderedPageScript3()' //******************************* //*** END mod_promotionCenter *** //******************************* //*** time check 23 (0.07531s elapsed) //*** SEND PROMO INFO TO ALREADY ON-PAGE HANDLER FUNCTION var pdPromo = {}; try{pdHandlePromoInfo(pdPromo)} catch(e) {} //*** SEND PROMO INFO TO ALREADY ON-PAGE HANDLER FUNCTION var pdProductListCalloutHtml = ""; try{pdHandleProductListCallout(pdProductListCalloutHtml)} catch(e) {} //*** time check 24 (0.07588s elapsed) //*** mod_fbConversion is NOT enabled! //*** time check 25 (0.07646s elapsed) //*** time check 26 (0.07709s elapsed) //*** time check 27 (0.07787s elapsed) //*** time check 28 (0.07851s elapsed) //**** CART ITEM COUNT MESSAGE ***** function pdDisplayCartItemCount() { var pdCartItemCount = pdGetCookie('pdCartItemCount'); if(!pdIsBlank(pdCartItemCount)) { var pdCartItemCountMessage = pdCartItemCount; jQuery('.pdCartItemCountMessage').html(pdCartItemCountMessage); } } pdDisplayCartItemCount(); //*** pageScript end (0.07856s elapsed) //*** time check 29 (0.07856s elapsed)