Swap Old vs New price

Could you help me swap the position of the old & new price?


So first old price, then new price.

Thank you in advance!

1 Like

@Rickyxane please add this css to the very end of your base.css file and check

shopify admin->online store->themes->edit theme code->assets->base.css

.product-info__price .price__default{display: flex;  flex-wrap: wrap;}

.product-info__price .product-price--large .price__was {order: -1; margin-right: 10px;}

Hey @suyash1 it didn’t work. Placed it in assest > main.css

@Rickyxane I am not able to see it in the main.css file, where did you add it? at the end?

@suyash1 Removed it but placed it back again.

1 Like

Hello, @Rickyxane

1. Go to Online Store → Theme → Edit code.
2. Open your theme.css / base.css file and paste the code in the bottom of the file.

.price__default {
  display: flex !important;
  align-items: baseline !important;
  gap: 0.8rem !important; 
}
span.price__was {
    order: 1 !important;
}
span.price__current {
    order: 2 !important;
}
::after {
    order: 3 !important;
}

Thank You!

@Rickyxane please add after last } on line 10945 and check

Hi @Rickyxane ,
Go to Online Store > Themes > Actions > Edit Code > main.css Add below code at the bottom of main.css file

.product-form .price-container .price__default {
    display: flex;
    flex-direction: row-reverse;
    gap: 10px;
    justify-content: flex-start;
    align-items: center;
}
.price__default:after {
    content: none !important;
}

Hey! Thanks. But on mobile it is not showing correctly, it’s outlined to the right. Could you please check once again?


It’s showing correctly on mobile.