Home Forums WoodMart support forum Woodmart Core update broke my CSS?

Woodmart Core update broke my CSS?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #540456

    sami-6411
    Participant

    Hello,

    As soon as I updated the woodmart core I noticed that my grouped and variable price stopped working as intended, I opened ticket 7 days ago about it and we found a working solution for it.

    However now the solution doesn’t work anymore, and I think I found something that didn’t exist before the latest update?

    What I found:

    
    .hide-larger-price .price {
        word-spacing: -1em;
        visibility: hidden
    }
    
    .hide-larger-price .price *:not(.price) {
        word-spacing: normal;
        visibility: visible
    }
    
    .hide-larger-price .price>span:nth-child(2) {
        display: none
    }
    
    .hide-larger-price .price>:is(ins,small) {
        margin-inline-start:4px}
    
    .hide-larger-price .wd-price-unit {
        display: inline !important
    }
    
    .browser-Safari .hide-larger-price .price>:is(ins,small) {
        margin-inline-start:calc(1em + 4px)}
    
    .browser-Safari .hide-larger-price .price,.browser-Safari .hide-larger-price .wd-sticky-btn-cart .price {
        white-space: nowrap
    }
    

    This was the code I used to make the variable and grouped products to show the higher price instead of the smaller one:

    
    /**** Variable ****/
    
    .product-type-variable .summary-inner > .price,
    .wd-product.product-type-variable .price {
    	font-size: 0;
    }
    
    .product-type-variable .summary-inner > .price .amount:nth-child(2),
    .wd-product.product-type-variable .price .amount:nth-child(2) {
    	font-size: 15px;
    }
    
    /**** Grouped ****/
    
    .product-type-grouped .summary-inner > .price,
    .wd-product.product-type-grouped .price {
    	font-size: 0;
    }
    
    .product-type-grouped .summary-inner > .price .amount:nth-child(2),
    .wd-product.product-type-grouped .price .amount:nth-child(2) {
    	font-size: 15px;
    }
    
    /**** Simple ****/
    
    .wd-product:not(.product-type-variable):not(.product-type-grouped) .price {
    	font-size: initial; /* Or any appropriate font size */
    }
    
    #540680

    Luke Nielsen
    Keymaster

    Hello,

    The provided link from the private area is not working: https://prnt.sc/JNgzT8HfHFFz , also, cannot find some products: https://prnt.sc/mcMJJ9DdzQle , please clarify on which page I can check it.

    Thank you in advance.

    Kind Regards

    #540720

    sami-6411
    Participant

    Hey,

    I managed to fix it today, its just test page so I removed everything for now.

    Here is my solution that fixed the problem:

    
    /* Hide the smaller price and show the larger price for variable products */
    .product-type-variable .summary-inner > .price,
    .wd-product.product-type-variable .price {
        font-size: 0; /* Hide the original price */
    }
    
    .product-type-variable .summary-inner > .price .amount:nth-child(2),
    .wd-product.product-type-variable .price .amount:nth-child(2) {
        font-size: 15px; /* Show the larger price */
    }
    
    /* Hide the smaller price and show the larger price for grouped products */
    .product-type-grouped .summary-inner > .price,
    .wd-product.product-type-grouped .price {
        font-size: 0; /* Hide the original price */
    }
    
    .product-type-grouped .summary-inner > .price .amount:nth-child(2),
    .wd-product.product-type-grouped .price .amount:nth-child(2) {
        font-size: 15px; /* Show the larger price */
    }
    
    /* Show the original price for simple products */
    .wd-product:not(.product-type-variable):not(.product-type-grouped) .price {
        font-size: initial; /* Show the original price with an appropriate font size */
    }
    
    #540750

    Luke Nielsen
    Keymaster

    Hello,

    Glad that you found a solution.

    In case you need any additional help, I’d be more than happy to assist you.

    Have a good day!

    Kind Regards

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Woodmart Core update broke my CSS?’ is closed to new replies.