Home Forums Themes Support Pricom Mini Cart on header doesn’t include discount price

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9780
    Grz3siuu
    Supported

    Hello,
    I hope you are doing well,

    I have created Discount Rules, cart total is working as expected – discount is added, but the mini cart on header have only “subtotal” value, it doesn’t showing added discount from my rule – figures are not matching and customer will be confused. Would do you be able please look at it ?

    Kind Regards, Adam

    Attachments:
    You must be logged in to view attached files.
    #9783

    Hi,
    Thanks for contacting us and choosing our product!
    We have checked your site and that’s seems you are using Woo Discount Rule plugin.
    Because this is 3rd plugin so we can’t check their code.
    Currently cart total price use default WooCommerce function.
    You can see it in: wp-content/themes/pricom/woocommerce/cart/minicart.php
    You can see in on line 120:
    https://prnt.sc/Nvn3jGI8Jh7L
    So in this case the best solution is contact Woo Discount Rule plugin author about this. They will have the code to help you change this.

    ****
    Regards,
    HaruTheme

    • This reply was modified 1 week, 6 days ago by admin.
    #9790
    Grz3siuu
    Supported

    Hello,
    Cheers mate,
    I’ve sort it out, I want to share it with rest of the people, it may be useful for others. Please add that bit of code after line 123

    
    <?php
    $counter = null;
    foreach ( WC()->cart->get_coupons() as $code => $coupon ){
    $counter++;
    }
    
    if($counter > 0){
    $label = ‘<small style=”padding-left: 15%;”><font color=”green”>Discount Applied</font></small>’;
    }else{
    $label = “”;
    }
    ?>
    <p class=”woocommerce-mini-cart__total total couponx”>
    <th>TOTAL: <?php echo $label;?></th>
    <td><?php echo WC()->cart->get_total();?></td>
    </p>
    
    • This reply was modified 1 week, 5 days ago by admin.
    Attachments:
    You must be logged in to view attached files.
    #9793

    Thanks so much for your feedback!
    We formatted your code to make it easy to read.
    Hope it will helps others have similar issue.

    ****
    Regards,
    HaruTheme

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

You must be logged in to reply to this topic.