Created
October 7, 2017 08:20
-
-
Save buiquangduc/a63d2f54bf38f47614cb6b5d595a40e2 to your computer and use it in GitHub Desktop.
Magento get record
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Get record by value | |
$model = Mage::getModel('foo_bar/baz'); | |
$model->load('field_value', 'field_name')->getData(); | |
//Get record by id | |
$model = Mage::getModel('foo_bar/baz')->getData(); | |
$model->load($id); | |
//Get multiple record | |
$session = Mage::getSingleton('customer/session')->getUploadSession(); | |
$existingFiles = Mage::getModel('photomart_uploadimage/uploadimage')->getCollection()->addFieldToFilter('upload_session',$session); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment