From 64f50a5a59cf9867bcf5a46dafa45c9becdf1e02 Mon Sep 17 00:00:00 2001 From: panariga Date: Mon, 28 Apr 2025 14:35:45 +0300 Subject: [PATCH] fixed glitch after combination update --- views/templates/hook/breadcrumb_price_display_switcher.tpl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/views/templates/hook/breadcrumb_price_display_switcher.tpl b/views/templates/hook/breadcrumb_price_display_switcher.tpl index ff16398..bde1a0f 100644 --- a/views/templates/hook/breadcrumb_price_display_switcher.tpl +++ b/views/templates/hook/breadcrumb_price_display_switcher.tpl @@ -23,12 +23,13 @@ document.addEventListener('DOMContentLoaded', function() { const priceToggleSelect = document.getElementById('priceDisplayToggle'); - const vpcElements = document.querySelectorAll('.vpcrender'); - const mpcElements = document.querySelectorAll('.mpcrender'); + const storageKey = 'priceDisplayPreference'; // Key for localStorage // Function to apply visibility based on preference function applyPriceVisibility(preference) { + const vpcElements = document.querySelectorAll('.vpcrender'); + const mpcElements = document.querySelectorAll('.mpcrender'); console.log('Applying preference:', preference); // For debugging console.log('Found VPC elements:', vpcElements.length); // For debugging console.log('Found MPC elements:', mpcElements.length); // For debugging