Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options answers only user 4564

Questions related to Magento collections

1
vote
It not proper way to get non custom option products using has_options field.has_option is set to 1 when it bundle. Good idea to join the table catalog_product_option to collection and and using join … query check product have custom option or not Here Step1: Get Collection of product which have option and then group them by product id $Option=Mage::getResourceModel('catalog …
answered Mar 18 '15 by Amit Bera
7
votes
setData() function is only set one field value on one call. it can set multiple field value using multiple call of setData function. addData() function is set multiple field values using array with …
answered Apr 1 '15 by Amit Bera
1
vote
> </models> now create a collection file code is <?php class yourModuleNmaeSapce_Modulename_Modelname_Resource_Custome_Collectionr extends Mage_Core_Model_Resource_Db_Collection_Abstract …
answered Sep 5 '14 by Amit Bera
1
vote
I do get any proper solution.Below solution may work: Create new varien collection object: $collection- = new Varien_Data_Collection(); $product = Mage::getModel('catalog/product')->load(15879 … ); Assign the product add first element: $collection->addItem($product); using loop assign rest of product: foreach($productCollection as $eachProd): $collection->addItem($eachProd); endforeach; $productCollection=$collection; …
answered Feb 10 '15 by Amit Bera
2
votes
Call category collection and create different collection on limit $_category = Mage::getModel('catalog/category')->load(129); $Children=$_category->getResource()->getChildren($_category, false … )); $collection = Mage::getResourceModel('catalog/product_collection'); $collection->addAttributeToSelect('url_key') ->addAttributeToSelect('name …
answered Feb 12 '15 by Amit Bera
2
votes
For your requirement , need to write direction sql collection filter by $collection=Mage::getResourceModel('sales/order_collection'); $read = Mage::getSingleton( 'core/resource … '), ); $collection->getSelect()->Where(implode(' AND ', $whereCondition)); $orwhereCondition = array( $read->quoteInto('cutomer_group_id = ?', 13), $read->quoteInto(' sales_org IS NULL …
answered Jun 28 '15 by Amit Bera
0
votes
you need add address table on your customer collection Mage::getResourceModel('customer/customer_collection') ->addNameToSelect() ->addAttributeToSelect …
answered Dec 1 '14 by Amit Bera
1
vote
collection object and it give value as false whenever a collection does not have records. if(!$order->getSize()){ // no order available for customer } How to use getSize( see at Why getSize() function is not working when apply filter …
answered May 11 '15 by Amit Bera
2
votes
Instead of loading full product object use it resource model attribute save (getResource()->saveAttribute). It is quit quick awsy to save product data. Set value: $product->setCustomAttribute('your …
answered Jan 21 '15 by Amit Bera
1
vote
If group_id is not an attribute of Customer address type. So You cannot short address collection by group then that is not possible easily. For this case,you need to add a left join with Customer … /address resource collection Class Mage_Customer_Model_Resource_Address_Collection public function addGroupId(){ $this->joinAttribute('customer_group_id', 'customer/group_id', 'parent_id …
answered Oct 27 '16 by Amit Bera
2
votes
need add sales_flat_order table's column status to your collection filler the collection. EDIT: As you want to filer customer collection by customer's completed orders count that I have Create … '); Then add this sub select query to customer collection as new columns (order_count) to customer collection. $collection->getSelect()->columns(array('order_count' => $subSelect)) then using having …
answered Jul 2 '15 by Amit Bera
1
vote
Hi remove load function from ->load($order->getId()); for getting order-collection filter by item id.AS sander say need to use in at collection condition. Mage::getModel('sales/order')->load($order … ->getId()) wil give you particular order it object and does not provide all order collection. More about filter see at . For getting a collection please try with format Mage::getModel('modelsPrefix …
answered Mar 30 '15 by Amit Bera
1
vote
-extension-with-custom-database-table/ Try This $Collection=Mage::getModel('module/model')->getCollection()->addFieldToFilter('customer_id',$customerId)->addFieldToSelect('*')->setOrder('order_id',DESC … ); $collection give array of Record of customer Id for get one item try this $Collection->getFirstItem(); EDIT Code for public function addCustomFilter($customerId =null){ $this …
answered Aug 22 '14 by Amit Bera
0
votes
If you using category collection class for getting the category collection \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory Then i don't thought that you need to use direct object … addAttributeToSelect('ATTRIBUTE_CODE') at your collection. $collection = $this->categoryCollection->create(); $collection->addAttributeToSelect('ATTRIBUTE_CODE'); /** * Use addAttributeToSelect('*') for all fields …
answered Mar 28 '17 by Amit Bera
0
votes
If you want a particular quote's item filter then , then you can try below and here i have loaded quote object then filter the quote item collection by this quote. $objectManager = \Magento … quote **/ $quoteFactory = $objectManager->create('\Magento\Quote\Model\QuoteFactory'); $quote = $quoteFactory->create()->load($data['quote_id']); /* filter Item Collection by quote */ $newItems …
answered Sep 29 '17 by Amit Bera

15 30 50 per page