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

Magento2 plugin/interceptor not working

I have following action: http://localhost/admin/catalog/product_attribute/edit/attribute_id/135/key/…/ I would like to do some extra things with attribute after saving. I have created and registered custom plugin in Vendor/Module/Plugin/Model/ResourceModel/Attribute/Save.php with following content: class Save { /** * @var Config */ protected $config; /**…

VIEW QUESTION
Back To Top
Search