Skip to content

Commit

Permalink
Merge branch '2.5.x' of https://github.com/Smile-SA/elasticsuite into…
Browse files Browse the repository at this point in the history
… 2.5.x
  • Loading branch information
Aurélien FOUCRET committed Feb 20, 2018
2 parents 691a7f3 + 64290f6 commit 30e64bf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
margin: 20px 0 0;

li {
box-sizing: border-box;
box-sizing: content-box;
float: left;
border: 1px solid #d6d6d6;
background: #FFFFFF;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,21 @@ private function getBaseSelect($productIds, $storeId)
private function getVirtualSelect($productIds)
{
$select = $this->getConnection()->select()
->from(['cpi' => $this->getTable(ProductPositionResourceModel::TABLE_NAME)], [])
->where('cpi.product_id IN(?)', $productIds)
->from(['p' => $this->getTable(ProductPositionResourceModel::TABLE_NAME)], [])
->joinLeft(
['cpi' => $this->getTable('catalog_category_product_index')],
'p.product_id = cpi.product_id AND p.category_id = cpi.category_id',
[]
)
->where('p.product_id IN(?)', $productIds)
->where('cpi.product_id IS NULL')
->columns(
[
'category_id' => 'cpi.category_id',
'product_id' => 'cpi.product_id',
'category_id' => 'p.category_id',
'product_id' => 'p.product_id',
'is_parent' => new \Zend_Db_Expr('0'),
'is_virtual' => new \Zend_Db_Expr('1'),
'position' => 'cpi.position',
'position' => 'p.position',
]
);

Expand Down

0 comments on commit 30e64bf

Please sign in to comment.