Skip to content

Commit 3b03092

Browse files
authored
Merge pull request #1501 from algolia/feature/MAGE-877
Feature/mage 877
2 parents 25273b5 + f9fb99f commit 3b03092

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ composer.lock
44
vendor/
55
.php_cs.cache
66
.vscode
7+
.idea

view/frontend/templates/recommend/cart/recommend_items.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/** @var \Algolia\AlgoliaSearch\ViewModel\Recommend\Cart $block */
33
$viewModel = $block->getViewModel();
44
$recommendConfig = $viewModel->getAlgoliaRecommendConfiguration();
5-
if (isset($recommendConfig['enabledRelatedInCart']) || isset($recommendConfig['enabledFBTInCart']) || isset($recommendConfig['isTrendItemsEnabledInCartPage'])):
5+
if (!empty($recommendConfig['enabledRelatedInCart']) || !empty($recommendConfig['enabledFBTInCart']) || !empty($recommendConfig['isTrendItemsEnabledInCartPage'])):
66
$cartItems = $viewModel->getAllCartItems();
77
?>
88
<div id="frequentlyBoughtTogether" class="recommend-component"></div>

view/frontend/templates/recommend/products.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
$viewModel = $block->getViewModel();
44
$recommendConfig = $viewModel->getAlgoliaRecommendConfiguration();
55

6-
if (isset($recommendConfig['enabledFBT']) || isset($recommendConfig['enabledRelated']) || isset($recommendConfig['isTrendItemsEnabledInPDP'])):
6+
if (!empty($recommendConfig['enabledFBT']) || !empty($recommendConfig['enabledRelated']) || !empty($recommendConfig['isTrendItemsEnabledInPDP'])):
77
$product = $viewModel->getProduct(); ?>
88
<div id="frequentlyBoughtTogether" class="recommend-component"></div>
99
<div id="relatedProducts" class="recommend-component"></div>
@@ -24,4 +24,4 @@ if (isset($recommendConfig['enabledFBT']) || isset($recommendConfig['enabledRela
2424
}
2525
}
2626
</script>
27-
<?php endif; ?>
27+
<?php endif; ?>

view/frontend/web/internals/recommend.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
.product-img {
1+
.recommend-item .product-img {
22
width: 180px;
33
}
44
.auc-Recommend-list {
55
display: flex;
66
justify-content: space-evenly;
77
list-style: none;
88
}
9-
.product-name {
9+
.recommend-item .product-name {
1010
height: 50px;
1111
width: 110px;
1212
margin: 0 auto;
@@ -50,12 +50,12 @@
5050
flex-wrap: wrap;
5151
justify-content: flex-start;
5252
}
53-
.product-details .action.primary, .action-primary{
53+
.product-details .recommend-item .action.primary, .action-primary{
5454
background: #f4f4f4;
5555
border: 1px solid #f4f4f4;
5656
color: #666666;
5757
}
58-
.product-details .action.primary:hover, .action-primary:hover {
58+
.product-details .recommend-item .action.primary:hover, .action-primary:hover {
5959
border-color: #1979c3;
6060
background: #1979c3;
6161
color: #FFFFFF;

0 commit comments

Comments
 (0)