Skip to content

Commit

Permalink
PM-375: Costco Figo Promotion - added price comment for promo (#298)
Browse files Browse the repository at this point in the history
* Initial setup for Costco Figo campaign

* PM-367: Added form and summary logic accomodating promo requirements

* PM-367: Updated logic based on multipet and active promo

* PM-367: Added checks on multipet to identify if we need to clear cookie and data

* PM-367: Added method to disable field, prevent any mouse interactions and disable focus

* PM-367: Added nullish checks on summary page

* PM-367: removing edits to eslint

* PM-367: Adding env config for service

* PM-367: Updated config to proxy service

* PM-367: moving reset method into costo-promo.js

* PM-367: adding removed comment back

* PM-367: remove unnecessary additional check on policyId

* PM-698: update redirect logic (#284) (#286)

* PM-367: Updating subid value for costco figo

* PM-375: Removing type from eligibility rules

* PM-375: Adding console logs for testing

* PM-375: Rename localStorage key for promo

* PM-375: Adding annotations

* PM-375: remove console logs used for testing

* PM-375: add additional css prop for safari to prevent user-select on disabled field

* PM-375: Added additional promo price comment key value used on conditional check

---------

Co-authored-by: hero-dokane <[email protected]>
  • Loading branch information
pgilmore-phi and hero-dokane authored Dec 4, 2024
1 parent 7a6cf48 commit 1c5f23e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 8 additions & 3 deletions blocks/plans-quote/summary-quote.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
import { isCanada } from '../../scripts/lib-franklin.js';
import { trackGTMEvent } from '../../scripts/lib-analytics.js';
import { getConfigValue } from '../../scripts/configs.js';
import { getIsMultiPet } from './costco-promo.js';
import { getIsMultiPet, isCostcoFigo } from './costco-promo.js';

export default async function decorateSummaryQuote(block, apiBaseUrl) {
// initialize form based on results from the previous step
Expand Down Expand Up @@ -266,8 +266,13 @@ export default async function decorateSummaryQuote(block, apiBaseUrl) {

function getAutoRenewTet(itemId) {
if (itemId === 'Annual Plan-DOGS' || itemId === 'Annual Plan-CATS') {
if (!isCostcoFigo) {
return jsx`
<strong>Your Annual Membership will automatically renew on your renewal date which is one year from today. The renewal rate is currently $19.95, plus applicable taxes (price is subject to change).</strong>
`;
}
return jsx`
<strong>Your Annual Membership will automatically renew on your renewal date which is one year from today. The renewal rate is currently $19.95, plus applicable taxes (price is subject to change).</strong>
<strong>Your Annual Membership will automatically renew on your renewal date which is one year from today. The renewal rate is currently $0 (price is subject to change).</strong>
`;
}

Expand Down Expand Up @@ -313,7 +318,7 @@ export default async function decorateSummaryQuote(block, apiBaseUrl) {
<div class="pet-name">${pet.petName}<span class="item-info-fragment-button" data-pet-id="${pet.id}"></span></div>
<div class="price-info">
<div class="price">$${selectedProduct.salesPrice}</div>
<div class="price-comment">${getSelectedProductAdditionalInfo(selectedProduct.itemId).priceComment}</div>
<div class="price-comment">${!isCostcoFigo ? getSelectedProductAdditionalInfo(selectedProduct.itemId).priceComment : getSelectedProductAdditionalInfo(selectedProduct.itemId).priceCommentPromo}</div>
</div>
</div>
<div class="item-info-fragment" id="item-info-fragment-${pet.id}" data-selected-product-id="${selectedProduct.itemId}"></div>
Expand Down
2 changes: 2 additions & 0 deletions scripts/24petwatch-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,14 @@ export function getSelectedProductAdditionalInfo(itemId) {
'Annual Plan-DOGS': {
name: 'Annual Protection Membership',
priceComment: 'for the first year $19.95/year thereafter',
priceCommentPromo: 'for the first year $0/year thereafter',
pageLink: PET_PLANS_ANNUAL_URL,
fragmentLink: '/lost-pet-protection/fragments/annual-info',
},
'Annual Plan-CATS': {
name: 'Annual Protection Membership',
priceComment: 'for the first year $19.95/year thereafter',
priceCommentPromo: 'for the first year $0/year thereafter',
pageLink: PET_PLANS_ANNUAL_URL,
fragmentLink: '/lost-pet-protection/fragments/annual-info',
},
Expand Down

0 comments on commit 1c5f23e

Please sign in to comment.