Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Renamed EcommerceCurrency to ShopCurrency

  • Loading branch information...
commit 687871f62b663599da30e5ee44e475e799463352 1 parent 976472b
@jedateach jedateach authored
View
2  _config.php
@@ -21,7 +21,7 @@
Object::add_extension("SiteConfig", "ShopConfig");
//custom classes
-Object::useCustomClass('Currency','EcommerceCurrency', true);
+Object::useCustomClass('Currency','ShopCurrency', true);
Object::useCustomClass('Versioned','FixVersioned');
//variations
View
4 code/model/fieldtypes/CanBeFreeCurrency.php
@@ -3,11 +3,11 @@
/**
* Allows casting some template values to show "FREE" instead of $0.00.
*/
-class CanBeFreeCurrency extends EcommerceCurrency{
+class CanBeFreeCurrency extends ShopCurrency{
function Nice(){
if($this->value == 0){
- return _t("EcommerceCurrency.FREE","<span class=\"free\">FREE</span>");
+ return _t("ShopCurrency.FREE","<span class=\"free\">FREE</span>");
}
return parent::Nice();
}
View
9 code/model/fieldtypes/EcommerceCurrency.php → code/model/fieldtypes/ShopCurrency.php
@@ -2,7 +2,7 @@
/**
* Improvements to Currency for presenting in templates.
*/
-class EcommerceCurrency extends Currency {
+class ShopCurrency extends Currency {
protected static $decimalDelimiter = '.';
protected static $thousandDelimiter = ',';
@@ -33,4 +33,9 @@ static function getDecimalDelimiter() {
static function getThousandDelimiter() {
return self::$thousandDelimiter;
}
-}
+}
+
+/**
+ * @deprecated use ShopCurrency
+ */
+class EcommerceCurrency extends ShopCurrency{}
View
2  docs/en/CoreChanges.md
@@ -2,7 +2,7 @@
Here are the subclasses, and extensions of standard Sapphire components for the shop module.
- * EcommerceCurrency - provides ability to customise currency formatting.
+ * ShopCurrency - provides ability to customise currency formatting.
* ShopPayment - provides some additional functionality that should eventually move to Payment itself.
* ProductBulkLoader - extends CSVBulkLoader to provide shop-specific loading. See [Bulk Loading](BulkLoading) for more.
View
4 example_config.php
@@ -14,8 +14,8 @@
setlocale (LC_TIME, 'en_NZ@dollar', 'en_NZ.UTF-8', 'en_NZ', 'nz', 'nz');
//ECOMMERCE I18N SETTINGS
-EcommerceCurrency::setDecimalDelimiter('.'); //for Money formating
-EcommerceCurrency::setThousandDelimiter(','); //for Money formating
+ShopCurrency::setDecimalDelimiter('.'); //for Money formating
+ShopCurrency::setThousandDelimiter(','); //for Money formating
Object::useCustomClass('SS_Datetime','I18nDatetime', true);
//SHOPPING CART AND ORDER
View
4 tests/test_config.php
@@ -11,8 +11,8 @@
//i18n::set_locale('');
// * * * ECOMMERCE I18N SETTINGS
-EcommerceCurrency::setDecimalDelimiter('.');
-EcommerceCurrency::setThousandDelimiter('');
+ShopCurrency::setDecimalDelimiter('.');
+ShopCurrency::setThousandDelimiter('');
Object::useCustomClass('SS_Datetime','I18nDatetime', true);
// * * * SHOPPING CART, ORDER, MODIFIERS
Please sign in to comment.
Something went wrong with that request. Please try again.