Skip to content

Commit

Permalink
Only export active products to sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeos committed Oct 14, 2020
1 parent adf0b85 commit 6909e0c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,10 @@ protected function export( \Aimeos\MW\Container\Iface $container, bool $default
$manager = \Aimeos\MShop::create( $this->getContext(), 'index' );

$search = $manager->createSearch( $default );
$search->setConditions( $search->compare( '!=', 'index.catalog.id', null ) );
$search->setConditions( $search->combine( '&&', [
$search->compare( '!=', 'index.catalog.id', null ),
$search->getConditions()
] ) );
$search->setSortations( array( $search->sort( '+', 'product.id' ) ) );
$search->setSlice( 0, $maxQuery );

Expand Down

0 comments on commit 6909e0c

Please sign in to comment.