Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DataLayer/Event/ViewCart.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private function getAllowedPages(): array
return [];
}

return ['/checkout/cart/'];
return ['checkout/cart/'];
}

/**
Expand Down
11 changes: 11 additions & 0 deletions view/frontend/layout/hyva_checkout_cart_index.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="after.body.start">
<block
name="yireo_googletagmanager2.cart.script-additions"
template="Yireo_GoogleTagManager2::hyva/cart-script-additions.phtml"/>
</referenceContainer>
</body>
</page>
11 changes: 11 additions & 0 deletions view/frontend/templates/hyva/cart-script-additions.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php declare(strict_types=1);

use Magento\Framework\View\Element\Template;

/** @var Template $block */
?>
<script>
document.addEventListener('DOMContentLoaded', function () {
window.dispatchEvent(new CustomEvent('minicart_collapse'));
});
</script>
Loading