Skip to content
This repository was archived by the owner on Feb 8, 2023. It is now read-only.

Commit fabce40

Browse files
committed
fix addition link and show out-of-stock product on html sitemap
1 parent d532339 commit fabce40

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Block/Sitemap.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ public function getProductCollection()
141141
->addTaxPercents()
142142
->setPageSize($limit)
143143
->addAttributeToSelect('*');
144-
$this->_stockFilter->addInStockFilterToCollection($collection);
144+
if (!$this->_helper->getConfigValue('cataloginventory\options\show_out_of_stock')) {
145+
$this->_stockFilter->addInStockFilterToCollection($collection);
146+
}
145147

146148
return $collection;
147149
}

Model/Sitemap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ public function _getProductCollection($storeId)
411411
*/
412412
public function convertUrl($url)
413413
{
414-
if (preg_match(self::PATTERN, $url)) {
414+
if (preg_match('@^http://@i', $url)) {
415415
return $url;
416416
}
417417

0 commit comments

Comments
 (0)