Tweak Library
Note: We have updated our folder structure in Neto 6 and this has not been updated on all tweaks yet. More info.

Hide multilevel price when promotion price is cheaper

Logic that sets a variable when there is promotion prices that are a better deal then the bulk prices in order to hide the bulk prices for a better webstore experience.

Coding Instructions

Insert the code below, the first set tag is creating the logic to read if there is a promo price cheaper than the bulk options then the tag that follows is the logic that determines if it should be displayed, the regular format for a multilevel pricing table and extra logic that shows the promo price in each individual case where it may be cheaper than the bulk price.

Open /products/includes/buyingoptions.template.html and replace the multielevel pricing table with the code below:

[%set [@hidevolumeprice@] %]
    [%format type:'text' trim:'a'%]
            [%multilevelpricing id:'[@SKU@]'%]
                [%param *body%]
                    [%if [@promo_price@] <= [@price@] AND [@promo_price@] != 0%]
                    [%else%]
                        FALSE
                    [%/if%]
                [%/param%]
            [%/multilevelpricing%]
    [%/format%]
[%/set%]

[%if [@hidevolumeprice@] ne '' %]
    [%multilevelpricing id:'[@SKU@]'%]
        [%param *header%]
            <div class="row extras volumediscounts">
                <div class="col-xs-12">
                    <label>Buy In Bulk &amp; Save!</label>
                </div>
                <div class="col-xs-12 alternating-table">
                    <table class="table">
                        <tbody>
        [%/param%]
        [%param *body%]
                        [%if [@promo_price@] <= [@price@] AND [@promo_price@] != 0%]
                            <!-- hide individual volume discount range if sale price is cheaper -->
                        [%else%]
                            <tr>
                                <td>
                                    Buy [%format type:'number' dp:'0' sp:','%][@minqty@][%/format%]
                                    [%if [@maxqty@] > 0%]
                                        to [%format type:'number' dp:'0' sp:','%][@maxqty@][%/format%]
                                    [%else%]
                                        or more
                                    [%/if%]
                                </td>
                                <td>
                                    Pay [%format type:'currency'%][@price@][%/format%]
                                </td>
                            </tr>
                        [%/if%]
        [%/param%]
        [%param *footer%]
                        </tbody>
                    </table>
                </div>
            </div>
        [%/param%]
    [%/multilevelpricing%]
[%/if%]