fixed prestashop.on('updatedProduct') listener
This commit is contained in:
@@ -22,13 +22,17 @@
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
prestashop.on('updatedProduct', function(updatedData) {
|
||||
applyPriceVisibility(priceToggleSelect.value);
|
||||
});
|
||||
|
||||
const priceToggleSelect = document.getElementById('priceDisplayToggle');
|
||||
|
||||
const storageKey = 'priceDisplayPreference'; // Key for localStorage
|
||||
|
||||
// Function to apply visibility based on preference
|
||||
function applyPriceVisibility(preference) {
|
||||
const vpcElements = document.querySelectorAll('.vpcrender');
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user