@ordergroove/offers 2.34.2 → 2.34.3-alpha-PR-760-2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ordergroove/offers",
|
|
3
|
-
"version": "2.34.2",
|
|
3
|
+
"version": "2.34.3-alpha-PR-760-2.6+93a0e61c",
|
|
4
4
|
"description": "offer state component",
|
|
5
5
|
"author": "Eugenio Lattanzio <eugenio63@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/ordergroove/plush-toys#readme",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@ordergroove/offers-templates": "^0.9.1"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "93a0e61c867a8600665c2a8c2a64e189b3a67ca3"
|
|
51
51
|
}
|
|
@@ -26,8 +26,15 @@ const PRODUCTS_URL = `${SHOPIFY_ROOT}products/`;
|
|
|
26
26
|
/**
|
|
27
27
|
* List of section DOM elements to update via section-rendering api https://shopify.dev/api/section-rendering
|
|
28
28
|
*/
|
|
29
|
-
const DEFAULT_SHOPIFY_CART_AJAX_SECTIONS =
|
|
30
|
-
'[id^="shopify-section-"][id$=__cart-items],
|
|
29
|
+
const DEFAULT_SHOPIFY_CART_AJAX_SECTIONS = [
|
|
30
|
+
'[id^="shopify-section-"][id$=__cart-items]',
|
|
31
|
+
'[id^="shopify-section-"][id$="__cart-footer"]',
|
|
32
|
+
'#shopify-section-main-cart-footer', //greenies
|
|
33
|
+
'#shopify-section-main-cart-items', //greenies
|
|
34
|
+
'#cart-live-region-text',
|
|
35
|
+
'#cart-icon-bubble'
|
|
36
|
+
].join(',');
|
|
37
|
+
|
|
31
38
|
const makeSyncProductId = offer =>
|
|
32
39
|
debounce(100, false, function(form) {
|
|
33
40
|
const { id } = Object.fromEntries([...new FormData(form).entries()]);
|
|
@@ -316,8 +323,6 @@ export function getSubscribedFrequency(productId, store) {
|
|
|
316
323
|
* @param store
|
|
317
324
|
*/
|
|
318
325
|
function synchronizeSellingPlan(store: any, offerElement?: HTMLElement) {
|
|
319
|
-
if (offerElement.isCart) return; // hidden inputs are used when product page, not cart.
|
|
320
|
-
|
|
321
326
|
[...document.querySelectorAll('form[action$="/cart/add"] [name=id]')].forEach((productIdInput: HTMLInputElement) => {
|
|
322
327
|
const productId = productIdInput.value;
|
|
323
328
|
|