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?
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025