Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End How to create a WooCommerce discount cart ?

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #265913
    kevinsaptel
    Participant

    I am trying to create a WooCommerce discount cart and i have almost implemented all of these steps mention in the tutorial. I am just confused in this code. Can anyone let me know.

    I have started creating a WooCommerce discount cart following the several tutorials and forums including

    https://stackoverflow.com/questions/27165576/how-to-add-discount-to-cart-total
    https://www.cloudways.com/blog/woocommerce-discount-cart/

    I am little bit confused in this code and i need someone help here in this code.

    if ( $cw_discount > 0 ) {
    echo ‘

    ‘. __( ‘Secure’, ‘woocommerce’ ) .’ ‘
    . wc_price( $cw_discount + $woocommerce->cart->discount_cart ) .’

    ‘;

    Is this for the total price with the discount as well ? Can we add some percentage of discount here ?

Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.