Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync costco figo changes to stage #290

Merged
merged 41 commits into from
Nov 25, 2024
Merged
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
aaec9fa
24PW: New Template - Paid Blog (#219)
hero-dokane Oct 3, 2024
b65b41b
24PW: Pawpack Page - EDS Build (#215)
hero-dokane Oct 3, 2024
68d13c8
Merge remote-tracking branch 'origin/stage' into develop
BaDos Oct 3, 2024
643de65
Added Shipping of Tag to the summary page (#221)
BaDos Oct 4, 2024
e00a58f
24PW: Pawpack Page - EDS Build - QA Feedback (#222)
hero-dokane Oct 7, 2024
07d5622
Merge branch stage into develop
hero-dokane Oct 7, 2024
31f4da7
WIP on bugfix/mobile-nav-redirect-visibility (#224)
hero-dokane Oct 7, 2024
2392032
24PW: Pet Insurance - Aggregator Widget (#225)
pgilmore-phi Oct 8, 2024
ba35c4d
Revert decorateButtons function, apply callout cta styling (#226)
hero-dokane Oct 8, 2024
66e50df
Adding thank you page dataLayer object (#230)
pgilmore-phi Oct 11, 2024
47026d2
Back sync develop with main (#234)
pgilmore-phi Oct 15, 2024
d2a50c3
Merge feature pm 568 abandon cart changes into develop for testing (#…
pgilmore-phi Oct 15, 2024
95e36b9
Feature pm 568 abandon cart: update species ID ternary condition (#237)
pgilmore-phi Oct 15, 2024
eafd2e3
Salesforce Abandoned Cart: refactored payload (#239)
pgilmore-phi Oct 16, 2024
4bceb66
Salesforce Abandoned Cart: Add upsert on thank you page (#241)
pgilmore-phi Oct 17, 2024
00210f0
Added condition to load paid blog header fragment based on paid blog …
pgilmore-phi Oct 17, 2024
08b8290
wrap tracking data inside ecommerce object (#242)
pgilmore-phi Oct 17, 2024
0117118
dataLayer updates: add currency to purchase event (#243)
pgilmore-phi Oct 18, 2024
07bddf7
Update header logo svg file and sizes in CSS (#245)
Mao8a Oct 22, 2024
50f61d7
Sync to Dev: Feature/pm 563 dl add to cart (#251)
hero-dokane Oct 23, 2024
2d02414
Sync to DEV: Updating purchase event DL with new requirements (#252)
pgilmore-phi Oct 23, 2024
4ef1344
Sync to DEV: Ensuring shipping value is returned as a number type in …
pgilmore-phi Oct 23, 2024
6dfb171
GitHub pull request template update (#259)
hero-dokane Oct 24, 2024
67c43e1
Sync to DEV: PM -564 Cart Summary DL events (#262)
pgilmore-phi Oct 25, 2024
b9f0286
Sync to Dev: Feature/pm 563 dl add to cart (#263)
hero-dokane Oct 25, 2024
4f0ea78
Feature/pm 573 logo size on header-only-logo (#254)
Mao8a Oct 28, 2024
bb9d1e3
Sync to Dev: Feature/pm 563 dl add to cart - step 2 (#265)
hero-dokane Oct 28, 2024
a06757f
Remove pet tags cookie on thank you page (#266)
hero-dokane Oct 28, 2024
e26de26
Merge branch 'stage' into develop
pgilmore-phi Oct 28, 2024
79fc474
Merge remote-tracking branch 'origin/main' into develop
pgilmore-phi Oct 29, 2024
7aaa492
PM-639 Update 'add to cart' DL product type values (#269) (#270)
pgilmore-phi Oct 30, 2024
6d933e8
Release/sprint 22 fast follow (#272)
pgilmore-phi Oct 30, 2024
a869cec
Merge remote-tracking branch 'origin/main' into develop
pgilmore-phi Oct 31, 2024
cef3bf6
WIP on bugfix/PM-637-ca-pet-tags (#275)
hero-dokane Nov 5, 2024
6b9a875
Sync Release/Sprint 23 to Develop (#279)
hero-dokane Nov 13, 2024
774b2ad
Merge remote-tracking branch 'origin/main' into develop
pgilmore-phi Nov 15, 2024
76a4238
PM-375: Costco Figo Promotion (#283)
pgilmore-phi Nov 21, 2024
32894e1
PM-375: Costco Figo Promotion (#283) (#285)
pgilmore-phi Nov 21, 2024
9233d74
PM-367: Update to SUBID value for COSTCO FIGO (#288)
pgilmore-phi Nov 25, 2024
3ff0fb5
Merge branch 'develop' into release/costco-figo-promotion
pgilmore-phi Nov 25, 2024
9b7ef71
Merge branch 'stage' into release/costco-figo-promotion
pgilmore-phi Nov 25, 2024
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
9 changes: 9 additions & 0 deletions blocks/widget-aggregator/widget-aggregator.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.widget-aggregator iframe {
border: 0;
width: 100%;
height: 350px;

@media (max-width: 812px) {
height: 750px;
}
}
49 changes: 49 additions & 0 deletions blocks/widget-aggregator/widget-aggregator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import { loadScript } from '../../scripts/lib-franklin.js';

export default async function decorate(block) {
const blockMetadata = {};

// eslint-disable-next-line no-restricted-syntax
for (const row of block.children) {
const key = row.children[0].textContent;
const value = row.children[1].innerText;
if (key) {
blockMetadata[key] = value;
}
}
const { source, script } = blockMetadata;

block.setAttribute('id', '24petwatch-quote-form');
if (script === 'iframe') {
const frame = document.createElement('iframe');
frame.id = source;
frame.src = 'https://quote.petted.com/widget/petplace';
frame.setAttribute('loading', 'lazy');

block.innerText = '';
block.append(frame);
} else if (script === 'widget') {
block.innerText = '';
loadScript('https://quote.petted.com/Scripts/lib/widgets/petplace/quote-form/widget.min.js', { async: true }).then(() => {
if (window.QuoteEngine) {
window.QuoteEngine.setOptions({
targetId: '24petwatch-quote-form',
redirectUrl: 'https://quote.petted.com/quote',
baseUrl: 'https://quote.petted.com/',
urlParam: {
source: '24petwatch-widget',
utm_source: '',
utm_medium: '',
utm_campaign: '',
utm_content: '',
utm_term: '',
},
refCode: '24petwatch',
});
window.QuoteEngine.init();
}
});
} else {
block.innerText = '';
}
}