Skip to main content
edited tags
Link
Fabian Schmengler
  • 66.1k
  • 25
  • 188
  • 422
add more tags and remove thanks
Source Link
Amit Bera
  • 77.7k
  • 20
  • 124
  • 239

I got a problem loading ALL "child" products of a Configurable Product into a collection, even those that are out of stock.

Like loading the products like this:

$simpleCollection = $configurable->getUsedProductCollection()
    ->addAttributeToSelect('*')
    ->addFilterByRequiredOptions();

foreach ($simpleCollection as $simple) {
   //$simple->getName();
}

will ignore child products that are out of stock, probably because they're not listed in the price tables, that are joined.

Is there another option without loading all child id's by getChildrenIds and then load each simple product with load?

Thanks!

I got a problem loading ALL "child" products of a Configurable Product into a collection, even those that are out of stock.

Like loading the products like this:

$simpleCollection = $configurable->getUsedProductCollection()
    ->addAttributeToSelect('*')
    ->addFilterByRequiredOptions();

foreach ($simpleCollection as $simple) {
   //$simple->getName();
}

will ignore child products that are out of stock, probably because they're not listed in the price tables, that are joined.

Is there another option without loading all child id's by getChildrenIds and then load each simple product with load?

Thanks!

I got a problem loading ALL "child" products of a Configurable Product into a collection, even those that are out of stock.

Like loading the products like this:

$simpleCollection = $configurable->getUsedProductCollection()
    ->addAttributeToSelect('*')
    ->addFilterByRequiredOptions();

foreach ($simpleCollection as $simple) {
   //$simple->getName();
}

will ignore child products that are out of stock, probably because they're not listed in the price tables, that are joined.

Is there another option without loading all child id's by getChildrenIds and then load each simple product with load?

Tweeted twitter.com/#!/StackMagento/status/640169750014914560
added 16 characters in body
Source Link
Rajeev K Tomy
  • 17.3k
  • 6
  • 63
  • 103

I got a problem loading ALL "child" products of a Configurable Product into a collection, even those that are out of stock.

Like loading the products like this:

$simpleCollection = $configurable->getUsedProductCollection()
    ->addAttributeToSelect('*')
    ->addFilterByRequiredOptions();
 

foreach ($simpleCollection as $simple) {
   //$simple->getName();
}

will ignore child products that are out of stock, probably because they're not listed in the price tables, that are joined.

Is there another option without loading all child id's by getChildrenIds and then load each simple product with load?

Thanks!

I got a problem loading ALL "child" products of a Configurable Product into a collection, even those that are out of stock.

Like loading the products like this:

$simpleCollection = $configurable->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions();
 

foreach($simpleCollection as $simple){
   //$simple->getName();
}

will ignore child products that are out of stock, probably because they're not listed in the price tables, that are joined.

Is there another option without loading all child id's by getChildrenIds and then load each simple product with load?

Thanks!

I got a problem loading ALL "child" products of a Configurable Product into a collection, even those that are out of stock.

Like loading the products like this:

$simpleCollection = $configurable->getUsedProductCollection()
    ->addAttributeToSelect('*')
    ->addFilterByRequiredOptions();

foreach ($simpleCollection as $simple) {
   //$simple->getName();
}

will ignore child products that are out of stock, probably because they're not listed in the price tables, that are joined.

Is there another option without loading all child id's by getChildrenIds and then load each simple product with load?

Thanks!

Source Link
Loading