We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Script to change the product price with meta filed

Script to change the product price with meta filed

Dawoud
Visitor
3 0 2
if there is a way to  swap between a meta field that contains our sale price with the price field:
 
We want to use metafiled 'sale price' as a container, 

Swap [metafiled 'sale price'] with [ shopify 'current price' ]

then we will put all the products with the same price and compare at price
example:
Item xyz
price = 100 ( displayed )
compare at price = 100 ( displayed )
Metafiled sale price = 50 ( only container and not displayed )

when we have a sale we will swap the price with the sale price
it will be 
price = 50( displayed )
compare at price = 100 ( displayed )
Metafiled sale price = 100 ( only container and not displayed )


and when the sale ended we will do the opposite
Reply 1 (1)

shuleGoing
Shopify Partner
33 1 5

Hi 

You are probably better to manage your sale prices via a CSV upload (e.g Matrixify to schedule sales) or use this app to create rules and schedule sales https://apps.shopify.com/instant-bulk-discount-sales 

First Light - Shopify development agency
Specialists in Shopify custom app development and integrations
shule@firstlight.dev