All Questions
15 questions
0
votes
1
answer
669
views
SKU Report for null attribute values
I am getting all product sku's that does not have a attribute value
'image_link'.
I have written this code in magento :
$products = Mage::getModel('catalog/product')
->getCollection()
->...
3
votes
1
answer
148
views
Filter collection value from another value from another index
I create a custom attribute last_sync for customer custom attribute, i need to filter it if this attribute is null OR greater than created_at, right now i'm using code like this:
$collections = Mage::...
1
vote
2
answers
2k
views
Get product by name in magento 1.9
How to get product by name? I have the name of the product in my code and iIwant to get product so I use this code :
$model = Mage::getModel('catalog/product');
$product = $model->load('name-of-...
0
votes
1
answer
44
views
How to merge two getmodels
I want to merge two Model results in a variable to use it in the register. There's a way to do this?
$commercial = Mage::getModel('thorleif/commercial')->load(1);
$lcat = Mage::getModel('...
3
votes
2
answers
2k
views
Call to undefined method Collection::getData()
I use (Manthan_Marketplace) extension in my Magento store
I want to add a table to this extension
so create a custom table (photos) in Magento database with name:(manthan_marketplace_photos)
Table ...
1
vote
2
answers
2k
views
how to merge two collection in magento 1.9
$collection = Mage::getModel("manager/campus")->getCollection()
->addFieldToFilter('regionalmanager',array('finset' => $arr))
->addFieldToFilter('status', array('eq' => ...
0
votes
1
answer
255
views
Magento: A question about collection LIMIT by the way "Zend Db limit"
There are several ways to limit collection for magento you could find here Magento: Set LIMIT on collection.
I tried the best answer, both ways work well.
But when I am trying, I met a question is ...
0
votes
0
answers
456
views
How to add another model collection data to an array. [Magento 1.9]
I have response collection $customerData, I have to add referral code of selected customers in the same array,
Model and field of referral code is :
$referCustomer = Mage::getModel('...
3
votes
3
answers
4k
views
load method vs getCollection method which is better and faster
Let assume we have 1 record in database and id is 1
we can get record using 2 method load by id and getCollection.
$model = Mage::getModel('stackexchange/questions')
->getCollection()...
1
vote
1
answer
529
views
Magento: Which is optimized way to get single record? [duplicate]
load by Id
$data = Mage::getModel('module_name/model)->load($id);
or
//collection by filter
$data = Mage::getModel('module_name/model)->getCollection()->addFieldToFilter('id',$id);
0
votes
2
answers
7k
views
Delete a row by custom field in Magento
I am facing an issue with deleting rows from table by custom field.
Below my database table
link_id | quote_id | giftcard_value | giftcard | redeemed_at
---------------------------------------------...
7
votes
3
answers
4k
views
magento 1.9: How to load customers by mobile number [duplicate]
I want to load customer and get his data from telephone number
we have load() methods, to load customer by id as well as we have loadByEmail() to load customer by Email but i want to load customer by ...
3
votes
3
answers
3k
views
Magento resource Collection override
I have been trying to override Magento resource collection class. I have found few solutions but it seems can't get it to work.
The class is located in:
App/code/core/Mage/Reports/Model/Resource/...
0
votes
1
answer
2k
views
Use iso3_code in country list Magento
I have a dropdown list on the Magento backend extension that I'm developing.
So far, the working code for this dropdown is as follows:
$fieldset->addField(
'country',
'...
3
votes
2
answers
2k
views
What is different between getCollection(); and $product->getData();
What is different between getCollection(); and $product->getData();
$products_collection = Mage::getModel('catalog/product')
**getCollection();
->addAttributeToSelect('*')
->addFieldToFilter('...