• Resolved wp_edu

    (@alemao2k6)


    I have a customization in my shop that is important in my country, where we need to show a 15% discounted price below every price display.

    It is because we have two payment methods, credit card w/ 12 installments and cash payment. So we need to show the full price, and the discounted price for the cash payment price in all of our price displays.

    When the plugin changes the prices, we lose this customization because it replaces the price html with a more “default” one.

    If I buy the PRO plugin, can you give me support to customize the behavior so that every price display that is modified by your plugin can show the second line, with the 15% lower price?

    – For illustration –

    Every price on the site needs to show like this:

    $100,00 (12x)
    $85,00 (cash payment)

    But when using the plugin, our price display is replaced by a simpler price html that only shows the discounted price from the plugin and does not show the second line that we need.

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support thisisirene

    (@thisisirene)

    Hello, @alemao2k6!

    Did you try to enable the option Pricing Rules>Settings>Calculations>Use prices modified by get_price hook? Maybe, this option will be helpful for you.

    Thread Starter wp_edu

    (@alemao2k6)

    Unfortunately that did not work.

    What I need is to be able to add a second line, with a 15% reduced price, below any price display that the plugin does on the website.

    Is it possible with your support?

    Plugin Support thisisirene

    (@thisisirene)

    @alemao2k6, maybe, this code will be helpful for you:

    add_filter('woocommerce_get_price_html', function ($priceHtml, $product) {
        return $priceHtml;
    }, PHP_INT_MAX, 2);
    
    Thread Starter wp_edu

    (@alemao2k6)

    Thanks, it should be a way to fix our issue.

    I believe my current implementation is done in a different way and we might have to change it to be in conformity with how other plugins use the price html.

    This issue is surely a matter of how we made our custom price display, because the plugin is actually replacing our customization with the default price display we had before.

    The plugin is really good, we will surely get the PRO version soon. Congratulations.

    Plugin Support thisisirene

    (@thisisirene)

    @alemao2k6, could you, please, submit a new ticket via our helpdesk?

    Thread Starter wp_edu

    (@alemao2k6)

    I just submitted the ticket.

    I used the functions you sent, but the same result happens. The plugin returns the price display to the default price html without my modifications, when a rule is matched in catalog or single product pages.

    I’m sure you guys can help to find out why this happens in the support ticket. Thanks a lot.

    Plugin Author algol.plus

    (@algolplus)

    thank you, we’ll reply on Monday.

    Plugin Author algol.plus

    (@algolplus)

    if you solved the problem – could you share final PHP code ?

    Thread Starter wp_edu

    (@alemao2k6)

    I ended up using the codes and functions from your documentation, and it all works very well. Thank you for the support!

    Plugin Author algol.plus

    (@algolplus)

    ok. got it.
    You’re welcome

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Customize price template’ is closed to new replies.