Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How would I create custom collections of items dynamically? 
 
Shpigford
Sr. Member
 
Avatar
Total Posts:  171
Joined:  2007-09-03
Denver, CO
 

How would I create custom collections of items dynamically?

For example, I’d like to create a grouping of products that only have 1 or 2 items left in stock. Or another example would be items that are not in stock but will be available soon...so a “Coming soon” collection of products.

Creating a category and manually adding products to it isn’t an option...it definitely needs to be dynamic.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Shpigford
Sr. Member
 
Avatar
Total Posts:  171
Joined:  2007-09-03
Denver, CO
 

Magento staff? Somebody? Anybody?

 
Magento Community Magento Community
Magento Community
Magento Community
 
joyously
Guru
 
Total Posts:  447
Joined:  2008-08-21
 

I’m sure you can do it if you just program a loop with a collection. Unfortunately, you have to know all the internals to know how to do it.

While you’re at it, how about a “items on sale” collection?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Shpigford
Sr. Member
 
Avatar
Total Posts:  171
Joined:  2007-09-03
Denver, CO
 

joyously...what’s a “collection”? Are you saying just a category?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Shpigford
Sr. Member
 
Avatar
Total Posts:  171
Joined:  2007-09-03
Denver, CO
 

Maybe Magento developers would like to chime in now?

 
Magento Community Magento Community
Magento Community
Magento Community
 
nicolas46
Sr. Member
 
Total Posts:  210
Joined:  2008-04-09
Toulouse
 

If i understand well : you want a link that retrive you a page with a list of product like in a category page, but you want that the products on this list change depending of an attribute (stock level for exemple)

Well, i think you need to create a category call “Coming soon” and somewhere in magento code you need to use the API to assign or remove dynamically product to this category. look the method assignProduct(...) here : API category
To have the product info use this : API product

I think what do you want it’snt hard to do with the Magento API

 
Magento Community Magento Community
Magento Community
Magento Community
 
Shpigford
Sr. Member
 
Avatar
Total Posts:  171
Joined:  2007-09-03
Denver, CO
 

I’d still really love to have a Magento core team developer chime in on this (though I’m pretty much convinced they rarely actually visit this community).

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top