<?php if ($block->getHelper()->usePostRenderImpressionPayloadModel() && $block->getLayout()->getBlock('product.info')):?> <script>

		(payload => 
		{
			dataLayer.push(payload);
			
		})(<?php echo $block->getProductDetail()->getDetailPayload($block->getLayout()->getBlock('product.info'))?>);
	
		<?php
		/**
		 * Hyva listeners
		 */
		?> window.addEventListener(<?php echo json_encode("update-prices-{$block->getProductDetail()->getCurrentProduct()->getId()}") ?>, function (event) 
		{
			const finalPrice = event.detail?.finalPrice?.amount ?? 0;

			let button = document.querySelector('[id=product-addtocart-button]');
						
			if (button)
			{
				button.dataset.price = Number(finalPrice).toFixed(2);
			}
		});</script><?php endif ?>