-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into topic-autoloader
- Loading branch information
Showing
8 changed files
with
86 additions
and
41 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
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
30 changes: 30 additions & 0 deletions
30
app/code/core/Mage/Checkout/sql/maho_setup/maho-24.10.0.php
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,30 @@ | ||
<?php | ||
/** | ||
* Maho | ||
* | ||
* @category Mage | ||
* @package Mage_Core | ||
* @copyright @copyright Copyright (c) 2024 Maho (https://mahocommerce.com) | ||
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
|
||
const XML_PATH_GUEST_CHECKOUT = 'checkout/options/guest_checkout'; | ||
const XML_PATH_REDIRECT_REGISTER = 'checkout/options/redirect_register'; | ||
const XML_PATH_CUSTOMER_MUST_BE_LOGGED = 'checkout/options/customer_must_be_logged'; | ||
|
||
/** @var Mage_Checkout_Model_Resource_Setup $installer */ | ||
$installer = $this; | ||
|
||
$defaultConfigValue = false; | ||
foreach (Mage::app()->getWebsites(true) as $website) { | ||
$configValue = !$website->getConfig(XML_PATH_GUEST_CHECKOUT) && $website->getConfig(XML_PATH_CUSTOMER_MUST_BE_LOGGED); | ||
if ($website->getId() === 0) { | ||
$defaultConfigValue = $configValue; | ||
$this->setConfigData(XML_PATH_REDIRECT_REGISTER, $configValue); | ||
} elseif ($configValue !== $defaultConfigValue) { | ||
$this->setConfigData(XML_PATH_REDIRECT_REGISTER, true, 'websites', $website->getId()); | ||
} | ||
} | ||
|
||
$installer->endSetup(); |
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