Add a "Back-up" style for a set price

Hi all,

I have looked seemingly everywhere for an “out of the box” solution to this challenge. I am creating a fashion rental website using the Craft theme, and want to add the ability for a customer to add a “Back-up” item.

The logic is: Add X & Y to your cart and then turn on “this is a back-up style” (radio button). Then, whatever is cheaper (of X & Y) is changed to a fixed price of $30.

Is there anything out there, or would I likely need a custom coding? Unfortunately we have quite a budget crunch with this project so am hoping this can be as DIY as possible.

Many thanks!

@coinelius Logic is won’t work because we can change in the cart template but we can’t change the line items prices and all if Shopify allow to change the line item then anyone can change the price and purchase is in free or buy multiple quantity. So instead of this you can create an automatic discount code it will apply on whatever line item price is lowest.

Thanks @saim007

When you say automatic discount code, can you create a set price though - or has to be $ or % off?

@coinelius You can create Fixed Price discount or % off discount as per your requirement.