Okay
  Public Ticket #3105019
lowest prices of the tiered price list in the store overview
Closed

Comments

  •  4
    Manuel Michaelis started the conversation

    Dear Supporters,

    is there a way to display the lowest prices of the tiered price list in the store overview, as well as cross-sells and upsells.  But on the product single view, the regular price must appear - this is important.

    We use:
    wooCommerce 6.7.0
    B2BKing Pro 4.2.20
    wordpress 6.0.1

    You can see the settings in WooCommerce on the screenshot.

    If you have any further questions, I will be happy to answer them in a timely manner.

    I hope there is a quick and uncomplicated solution.

    Manuel

  •  2,218
    WebWizards replied

    Hi Manuel,

    Similarly to our previous discussion, you can do the following


    First, you can go to B2BKing -> Settings-> Tiered Pricing and enable 'Show Tiered Price Range'


    Then you can add this code snippet:

    add_filter('b2bking_tiered_range_show_min', function($val){
        if (!is_single()){
            return true;
        }
        return $val;
    }, 10, 1);
    

    This snippet will show the lowest price in every situation, EXCEPT on the single product page.  On the single product page, prices will show normally.

    Kind regards,

    Stefan

  •  4
    Manuel Michaelis replied

    Dear Stefan,

    i did as you suggested, but unfortunately it is not the desired result.
    I have attached two screenshots:
    once the original price and once after I copied the script to functions.php and set 'Show Tiered Price Range' to on.

    I have set up admin access to our developer interface for you.
    Please use this page for testing:
    https://webashop.digital-real.com/wp-admin

    I would be happy about a timely solution.
    Thanks
    Manuel

    User: WebWizard
    Pass: GTmcyqA7yKSS&EEykx9KtKYX


  •  4
    Manuel Michaelis replied

    I have attached two screenshots:
    once the original price and once after I copied the script to functions.php and set 'Show Tiered Price Range' to on.

  •  2,218
    WebWizards replied

    Hi there,


    1) When you are looking at a variable product, the 'ab $123' format is not coming from the B2BKing plugin.

    For example I tried to completely deactivate the B2BKing plugins and I go here https://webashop.digital-real.com/produkt/werbefahnen-fuer-auslegermast/ and I can still see the same 'ab 47,60' display.

    7323487485.png

    So this display is probably related to one of the code snippets used to modify price.

    If so, you can usually use this function: is_single() to check if the page is the product page or not.


    2) After a variation is selected, there is still some function somewhere that is modifying the 'range' format. I think it is the same function as above.

    I didn't see it in functions.php. Maybe there is another place where you have custom code?