-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f78d2e
commit 93d7a69
Showing
7 changed files
with
214 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © Magmodules.eu. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magmodules\Channable\Api\Config\System; | ||
|
||
interface FeedInterface | ||
{ | ||
|
||
public const XML_PATH_BUNDLE_STOCK_CALCULATION = 'magmodules_channable/types/bundle_stock_calculation'; | ||
|
||
/** | ||
* Check if bundle stock calculation is enabled. | ||
* | ||
* This setting determines whether the parent bundle product stock | ||
* should be calculated based on the lowest stock of associated simple products. | ||
* | ||
* @param int|null $storeId Store ID for which the configuration should be checked. | ||
* If null, uses the default store configuration. | ||
* @return bool True if bundle stock calculation is enabled, false otherwise. | ||
*/ | ||
public function isBundleStockCalculationEnabled(?int $storeId = null): bool; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
/** | ||
* Copyright © Magmodules.eu. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magmodules\Channable\Model\Config\System; | ||
|
||
use Magmodules\Channable\Api\Config\System\FeedInterface; | ||
|
||
/** | ||
* Feed provider class | ||
*/ | ||
class FeedRepository extends BaseRepository implements FeedInterface | ||
{ | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function isBundleStockCalculationEnabled(?int $storeId = null): bool | ||
{ | ||
return $this->isSetFlag(self::XML_PATH_BUNDLE_STOCK_CALCULATION, $storeId); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters