Skip to content

Fetch the attribute value using attribute code in Model file

In 3rd party Plugin’s Model file, i am trying to fetch attribute code and display the attribute value in Product View Page. But values are not fetching.

$valueAddition = $product->getResource()->getAttribute('making_charges_value')->getFrontend()->getValue($product);

or

$valueAddition = $_product->getData($making_charges_value);

Here is Full Function code , Full File code

I restarted working on magento after many years, please consider me as fresher