Skip to content

Commit

Permalink
FixAddToCart Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexEAX committed Jun 13, 2022
1 parent 56ed063 commit 35af150
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ $add_to_cart_id = Mage::helper('retargeting_tracker')->getConfig('retargetingtra
"quantity": 1,
"variation": false
};

var BTNRTG = "<?php echo $add_to_cart_id; ?>";
/* document.querySelector(".btn-cart") document.getElementsByClassName("btn-cart")[0]*/
document.querySelector("<?php echo $add_to_cart_id; ?>")
document.querySelector(BTNRTG === "" ? ".btn-cart" : BTNRTG)
.addEventListener("click", function(){
_ra.addToCartInfo.quantity = ( document.querySelector("#qty") ?? { value:1 } ).value;

Expand Down

0 comments on commit 35af150

Please sign in to comment.