Price prefix in product page

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #142280
    Mantas
    Participant

    Hi,

    I am showing price prefix in product page. But if user starts order and enter correct vat number in checkout, VAT gets deducted, but then if he decides to continue shopping with VAT code already entered, prices in product pages are shown with deducted VAT. Everything is fine with that, but is there any function, that I can use to show different prefixes when code is entered and when code is not entered

    something like:

    if( VAT_code_is_entered() = true) {
    $Price_Prefix= ‘with VAT’;
    } else {
    $Price_Prefix= ‘without VAT’;
    }

    • This topic was modified 3 months, 2 weeks ago by Mantas.
    #142578
    Moshtafizur
    Moderator
    Plugin Support

    Hi there,

    Thanks for reaching out.

    I have escalated this with our development team. They will get back to you as soon as possible.

    Kind regards.

    #142820
    Kousik
    Moderator
    Plugin Support

    Hello Mantas,

    Your proposed code chunk will look like this:

    
    if( true === alg_wc_eu_vat_session_get( 'alg_wc_eu_vat_valid' ) && !empty( alg_wc_eu_vat_session_get( 'alg_wc_eu_vat_to_check' ) ) ) {
    $Price_Prefix= ‘with VAT’;
    }else{
    $Price_Prefix= ‘without VAT’;
    }
    
    
    

    I have updated the condition based on our plugin. The rest of the code depends on how you choose to write it.

    Regards,
    Kousik Mukherjee

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.