Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
joshine
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
joshine
Commits
b5afac36
Commit
b5afac36
authored
May 17, 2023
by
halweg
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://47.99.244.21:9999/root/joshine
into developer
parents
56e66989
a9ad3898
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php
+1
-1
app/code/Magento/Catalog/Controller/Product/Recently.php
+1
-1
No files found.
app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php
View file @
b5afac36
...
@@ -133,7 +133,7 @@ class Upsell extends AbstractProduct implements IdentityInterface
...
@@ -133,7 +133,7 @@ class Upsell extends AbstractProduct implements IdentityInterface
$collection
->
addAttributeToSelect
(
'*'
);
$collection
->
addAttributeToSelect
(
'*'
);
$collection
->
setVisibility
(
$this
->
_catalogProductVisibility
->
getVisibleInCatalogIds
());
$collection
->
setVisibility
(
$this
->
_catalogProductVisibility
->
getVisibleInCatalogIds
());
$collection
->
getSelect
()
->
order
(
'rand()'
);
$collection
->
getSelect
()
->
order
(
'rand()'
);
$collection
->
setPageSize
(
10
);
$collection
->
setPageSize
(
6
);
$collection
->
addStoreFilter
(
$product
->
getStoreId
());
$collection
->
addStoreFilter
(
$product
->
getStoreId
());
$this
->
_itemCollection
=
$collection
;
$this
->
_itemCollection
=
$collection
;
...
...
app/code/Magento/Catalog/Controller/Product/Recently.php
View file @
b5afac36
...
@@ -34,7 +34,7 @@ class Recently extends \Magento\Framework\App\Action\Action
...
@@ -34,7 +34,7 @@ class Recently extends \Magento\Framework\App\Action\Action
$productCollection
->
addAttributeToSelect
(
'*'
)
$productCollection
->
addAttributeToSelect
(
'*'
)
->
addFieldToFilter
(
'status'
,
1
)
->
addFieldToFilter
(
'status'
,
1
)
->
addAttributeToFilter
(
'entity_id'
,
array
(
'in'
=>
$in
));
->
addAttributeToFilter
(
'entity_id'
,
array
(
'in'
=>
$in
));
$productCollection
->
getSelect
()
->
order
(
sprintf
(
"field(e.entity_id,%s)"
,
$productIds
));
$productCollection
->
getSelect
()
->
order
(
sprintf
(
"field(e.entity_id,%s)"
,
$productIds
))
->
limit
(
6
)
;
/** @var \Magento\CatalogInventory\Helper\Stock $stockHelper */
/** @var \Magento\CatalogInventory\Helper\Stock $stockHelper */
$stockHelper
=
$this
->
_objectManager
->
get
(
'Magento\CatalogInventory\Helper\Stock'
);
$stockHelper
=
$this
->
_objectManager
->
get
(
'Magento\CatalogInventory\Helper\Stock'
);
$stockHelper
->
addInStockFilterToCollection
(
$productCollection
);
$stockHelper
->
addInStockFilterToCollection
(
$productCollection
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment