We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ebb8f6f commit eedb38aCopy full SHA for eedb38a
1 file changed
classes/Hook/HookDisplayBeforeBodyClosingTag.php
@@ -94,6 +94,27 @@ private function renderProductListing()
94
'view_item_list',
95
$eventData
96
);
97
+
98
+ // Render quickview events
99
+ foreach ($items as $item) {
100
+ $eventData = [
101
+ 'item_list_id' => $item_list_id,
102
+ 'item_list_name' => $item_list_name,
103
+ 'items' => [$item],
104
+ ];
105
106
+ // Keep only product ID if id_product_attribute was appended
107
+ $productId = explode('-', $item['item_id']);
108
+ $productId = $productId[0];
109
110
+ // Render the event wrapped in onclick
111
+ $this->gaScripts .= '
112
+ $(\'article[data-id-product="' . $productId . '"] a.quick-view\').on(
113
+ "click",
114
+ function() {' . $this->module->getTools()->renderEvent('select_item', $eventData) . '}
115
+ );
116
+ ';
117
+ }
118
}
119
120
/**
0 commit comments