Personalized checkout and custom promotions with Shopify Scripts
Hello,
Is it possible to add a Shopify Script where the logic's main goal is to target certain products based on certain conditions, but instead of applying actual discounts, it just shows a discount message near the "discounted" product?
I would need to change this code to just "apply" the actual original price instead of the new_line_price but everything i tried just completely disables the discount.
def apply(line_item)
new_line_price = if @discount_type == :percent
line_item.line_price * @discount_amount
else
[line_item.line_price - (@discount_amount * line_item.quantity), Money.zero].max
end
line_item.change_line_price(new_line_price, message: @discount_message)
end
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024