skip to Main Content

Do i need to avoid sql injection in this example magento code?

Following source codes need to avoid sql-injection? if $some_text of example is sql-injected attack, following source codes are dangerous? General Magento code $tmp_sale_info_collection = Mage::getModel('some/module') ->getCollection() ->addFieldToFilter('seller_id', array('eq' => $some_text)); Use getSelect() inner join $orderItem = Mage::getModel('sales/order_item')->getCollection(); $orderItem->getSelect() ->joinInner( array(…

VIEW QUESTION

Get dropdown attribute text – Magento 2

I am trying to retrieve the text value for the manufacturer attribute. It is a dropdown field. I tried this: $manufacturerName = $_product->getAttributeText('manufacturer'); $manufacturerId = $_product->getManufacturer(); $manufacturerName should display "BrandName", but it always displays 1 even if I change the…

VIEW QUESTION
Back To Top
Search