CART FONT AND SIZE CHANGES AFTER DISCOUNT IS APPLIED

Hey

If I have for example 1-5 items in cart the price is regular, but if you buy more than 6 then an automatic discount is applied. that also changes my font and the size of the new price/old price.

Is there a code or something how to overwrite or control it ?

Hi @RIUPA

To apply a discount when customers add more than 6 items to their cart and customize the display of the new price, you can use custom JavaScript and CSS:

  1. JavaScript: Check the cart quantity and apply a discount if there are 6+ items.
  2. CSS: Control the styling of the old and new price after the discount is applied.

Here’s a sample setup:

Javascript:

if (cartQuantity > 5) {

document.querySelector(‘.new-price’).classList.add(‘discount-style’);

}

CSS:

.discount-style {

font-size: 18px;

color: #ff0000;

}

Adjust selectors and styles as needed for your theme.

If you have other questions, I am willing to answer them more.

Best regards,

Daisy