For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
We currently have this line item script:
Input.cart.line_items.each do |line_item|
price = line_item.variant.price *.5
puts price.inspect
p_new_price = price * line_item.quantity
price_message="SPECIAL PRICING: RETAIL KICKEE PANTS EMPLOYEE"
line_item.change_line_price(p_new_price, message: price_message)
end
This results in something like this (different discount amount but you get the idea):
However, I can't find how to do the message part in a Shopify extension function. The most I've been able to come up with is altering the line item title:
Is this not possible with a function?
Solved! Go to the solution
This is an accepted solution.
It is possible with discount function. From what I see you are using line item cartTransform Had you ever try Product Discount Function.
https://shopify.dev/docs/apps/selling-strategies/discounts/experience/getting-started
This is an accepted solution.
It is possible with discount function. From what I see you are using line item cartTransform Had you ever try Product Discount Function.
https://shopify.dev/docs/apps/selling-strategies/discounts/experience/getting-started
Great idea! Thank you.