All things Shopify and commerce
i need to add price beside the ATC button in product page in Be Yours theme, in this theme there is a field name price-money that display price whenever the variant is changed. i need the same field to display beside the ATC button
To Display the price beside ATC:
i added in the buy-buttons.liquid this code
<span class="price-item price-item--regular" id="price-money">{{ product.price | money }}</span>
also in global.js file this is the code for the price-money
// Change price
const price__regular = this.querySelector('.price__regular');
price__regular.querySelector('.price-item--regular').innerHTML = `<price-money><bdi>${theme.Currency.formatMoney(price, window.shopSettings.moneyFormat)}</bdi></price-money>`;
const price__sale = this.querySelector('.price__sale');
price__sale.querySelector('.price-item--regular').innerHTML = `<price-money><bdi>${theme.Currency.formatMoney(compare_at_price, window.shopSettings.moneyFormat)}</bdi></price-money>`;
price__sale.querySelector('.price-item--sale').innerHTML = `<price-money><bdi>${theme.Currency.formatMoney(price, window.shopSettings.moneyFormat)}</bdi></price-money>`;
what should i do so that the price money field will be displaying the value beside ATC also change when the variant is changed?
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025