Changing a metafield during checkout -- please help me

Changing a metafield during checkout -- please help me

julieker
Shopify Partner
5 0 0

Hi guys -- I am really looking for some help.   During the checkout process of my store I just want to set the metafield called shortcode_used... that I created for Order to a shortcode .... I have gone ahead and created the metafield definition.   The value that  I want to set it to doesn't matter -- the real issue is there does NOT seem to be a way to change the value of the metafield or set the value of a metafield for an order in a liquid file -- in this case the order_confirmation liquid file.     I have looked at all the videos on liquid files -- I understand how to REFERENCE the metafield -- but no video shows how to CHANGE the value or set the value of a metafield.    I also understand about checkout extensions and have watch videos on that as well as custom apps.   You have to go through a lot of trouble installing CLI ... also again the videos dealt with banners etc the visual part BUT again I want to change the value of the metafield and populate it with a proper shortcode --    I do not want to change the metafield value in the shopify dashboard -- I know how to do that ... I want to change it in the liquid file if possible.    It seems like I need to go the route of checkout express OR pixels ... which seems very complicated for what I want to do... Please give me some advice... thanks

Replies 2 (2)

WalkYourStyle
Navigator
470 57 77

One possible solution could be to change the metafield as soon as the 'Proceed to Checkout' button is clicked. However, I'm not certain if this will fully address your needs.

julieker
Shopify Partner
5 0 0

Yes but how do you change the metafield in the liquid file -- not just REFERENCE it but CHANGE it