Public Member Functions | |
_afterSave () | |
Public Attributes | |
const | CONFIG_SCOPE = 'stores' |
const | CONFIG_SCOPE_ID = 0 |
const | XML_PATH_UNSECURE_BASE_URL = 'web/unsecure/base_url' |
const | XML_PATH_SECURE_BASE_URL = 'web/secure/base_url' |
Protected Member Functions | |
_beforeSave () |
Definition at line 35 of file Custom.php.
_afterSave | ( | ) |
Processing object after save data
Reimplemented from Mage_Core_Model_Abstract.
Definition at line 55 of file Custom.php.
00056 { 00057 $useCustomUrl = $this->getData('groups/url/fields/use_custom/value'); 00058 $value = $this->getValue(); 00059 00060 if ($useCustomUrl == 1 && empty($value)) { 00061 return $this; 00062 } 00063 00064 if ($useCustomUrl == 1) { 00065 Mage::getConfig()->saveConfig(self::XML_PATH_SECURE_BASE_URL, $value, self::CONFIG_SCOPE, self::CONFIG_SCOPE_ID); 00066 Mage::getConfig()->saveConfig(self::XML_PATH_UNSECURE_BASE_URL, $value, self::CONFIG_SCOPE, self::CONFIG_SCOPE_ID); 00067 } 00068 else { 00069 Mage::getConfig()->deleteConfig(self::XML_PATH_SECURE_BASE_URL, self::CONFIG_SCOPE, self::CONFIG_SCOPE_ID); 00070 Mage::getConfig()->deleteConfig(self::XML_PATH_UNSECURE_BASE_URL, self::CONFIG_SCOPE, self::CONFIG_SCOPE_ID); 00071 } 00072 00073 return $this; 00074 }
_beforeSave | ( | ) | [protected] |
Processing object before save data
Reimplemented from Mage_Core_Model_Abstract.
Definition at line 43 of file Custom.php.
00044 { 00045 $value = $this->getValue(); 00046 00047 if (!empty($value) && substr($value, -2) !== '}}') { 00048 $value = rtrim($value, '/').'/'; 00049 } 00050 00051 $this->setValue($value); 00052 return $this; 00053 }
const CONFIG_SCOPE = 'stores' |
Definition at line 37 of file Custom.php.
const CONFIG_SCOPE_ID = 0 |
Definition at line 38 of file Custom.php.
const XML_PATH_SECURE_BASE_URL = 'web/secure/base_url' |
Definition at line 41 of file Custom.php.
const XML_PATH_UNSECURE_BASE_URL = 'web/unsecure/base_url' |
Definition at line 40 of file Custom.php.