All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
0answers
19 views

Difference between Magento Collection ,object , array

Please clear the main difference between Magento Collection , object , array and arraylist also ?
0
votes
1answer
38 views

array convert into Magento 2 collection

I have 2 collection 1 is $bestsalecollection that show in dashboard . second is product collection. After filter collection when i return it generate error Call to a member function isLoaded() on ...
0
votes
0answers
21 views

Magento 2 how to match one item from one collection to another item in another collection if both are same then add to an array

I'm trying to compare two values from collection to another two values from another collection if they both are same then add that row to a array. How to achieve it. Can I get help? Thank you in ...
0
votes
2answers
204 views

addFieldtofilter array not reading

I am trying to filter product collection by ids if I use below code, the filter works ok and the product shows. $this->_productCollection ->addFieldToFilter('entity_id',array('in'=&...
0
votes
0answers
285 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('...
0
votes
1answer
607 views

Get array of all active category ID's

How do I get an array containing the ID's of all active categories?
0
votes
1answer
569 views

Magento 2 add array to collection in Admin Block Grid

I am trying to add an array to collection in Block Admin Grid but i want able to do that, protected function _prepareCollection() { //echo "preparecollection function"; exit; $...
1
vote
0answers
39 views

Output Array with Matching IDs

I have 2 collection (customer and subinfo) that pull info from 2 separate database table. both table information are related and i needed to join/merge the info, which i have done. but unfortunately ...
0
votes
1answer
552 views

Working with collections, should I use function getData()

As in subject - while I am working with collections should I (after filtering etc.) get data with function getData()? I've heard an opinion that is rather for debugging, not real coding. If I use ...
1
vote
0answers
157 views

Push an array of all sku's on a category page into my $data = array();

I want to list all sku's on a category page in a data array. Currently if i'm on a product detail page i can push the sku into my data array like this: if ($module === 'catalog' && $...
0
votes
1answer
127 views

Removing value from array

Need help trying to remove a array value (Customer ID) from a attribute array value in a collection //unfollowAction //Get Model to save data to. $model = Mage::getModel("userprofiles/userprofiles"...
0
votes
1answer
304 views

How to intersect 2 collections in Magento

I have 2 lists of countries: the default directory/country list and another one from an extension. I want to display only the values from the Magento list that are common between the two values. The ...
3
votes
2answers
1k views

Passing an array from block file to template file

I have a collection of Dealer Stores. I have implemented a function that calculates the distance of all stores from the location of the customer and i have an array of respective distances. I have ...
9
votes
1answer
24k views

How to list all users

As part of an exercise I am trying to list all users email from my database on one page. So far the closest i've got is $user = mage::getModel('customer/customer')->getCollection()->getData(); ...