I have create configure product and add one virtual product in configurable product.then add tier price in virtual product.

enter image description here

I have create one attribute and this attribute value get front-end product details page .when i select 1 value in drop-down then add 1 value in tier price.

enter image description here

Actual result :-Addition of dropdown value in tier price

enter image description here

  • Please give me any solution?This is urgent.
    – Devidas
    Dec 20, 2017 at 7:24

1 Answer 1


Need to override


template file, add below code at bottom and replace custom attribute names:

NOTE: Below code is for 2 values in your field. Please take count of values and do respective changes.

    $myattribute = $_product->getResource()->getAttribute('color_price')->getFrontend()->getValue($_product);
    $myattribute_color_qty = $_product->getResource()->getAttribute('color_custom')->getFrontend()->getValue($_product);

    <select id="colorprice_final">
    <option value="0">Please Select Quantity</option>
    <?php for($i = 1; $i <= $myattribute_color_qty; $i++){ ?>
    <option value="<?php echo $i; ?>"><?php echo $i; ?></option>
    <?php } ?>


        var colorprice = jQuery(this).val();
        var pri =jQuery('.color-price').text();
        var add_arr = new Array();
        add_arr = '<?php echo $myattribute; ?>';
        add_arr = add_arr.split(',');
        var total = [];
        var tier_arr = new Array();
            var str = jQuery(this).text() ;
        if(colorprice == '1')
        for( var i = 0; i < add_arr.length; i++)
        }else if (colorprice == '2') {
            for( var i = 0; i < add_arr.length; i++)

In console you can see Total now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.