Shopify themes, liquid, logos, and UX
Hi All,
Im trying to add certain fields to the product page like SKU.
i have managed to add the fields to the page but they do not update upon selecting the variants.
i cant find the callback functions in the theme code of broadcast - the thing that makes the price and images update as you select a variant.
Can someone guide me on this please?
Hello @Davethebrave ,
You can try to follow these steps:
// Example code to update the SKU field
function updateSku(variant) {
var skuElement = $('.product-sku'); // Replace with the selector for your SKU element
skuElement.text(variant.sku);
}
// Example callback function that gets triggered on variant change
function onVariantChange(variant) {
// Call your existing code that updates the price and images here
// Update the SKU field
updateSku(variant);
}
Hope this can help.
Ali Reviews team.
Hi ALi,
thanks for that - but i cant find any of those terms in the files of BROADCAST
see picture attached - relevant?
Its too late but here is the call back function for broadcast theme that handles the product information update on variant change event.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024