<?php

/**
 * Reset to all default configuration settings.
 */
// * * * NON-ECOMMERCE SETTINGS
Payment::set_site_currency('USD');
Geoip::$default_country_code = false;
//i18n::set_locale('');
// * * * ECOMMERCE I18N SETTINGS
EcommerceCurrency::setDecimalDelimiter('.');
EcommerceCurrency::setThousandDelimiter('');
Object::useCustomClass('SS_Datetime', 'I18nDatetime', true);
// * * * SHOPPING CART, ORDER, MODIFIERS
Order::set_email(null);
Order::set_receipt_subject("Shop Sale Information #%d");
Order::set_modifiers(array(), true);
Order::set_table_overview_fields(array('ID' => 'Order No', 'Created' => 'Created', 'FirstName' => 'First Name', 'Surname' => 'Surname', 'Total' => 'Total', 'Status' => 'Status'));
Order::set_maximum_ignorable_sales_payments_difference(0.01);
Order::set_order_id_start_number(0);
Order::set_cancel_before_payment(true);
Order::set_cancel_before_processing(false);
Order::set_cancel_before_sending(false);
Order::set_cancel_after_sending(false);
OrderForm::set_user_membership_optional(false);
OrderForm::set_force_membership(true);
OrderManipulation::set_allow_cancelling(false);
OrderManipulation::set_allow_paying(false);
// * * * PRODUCTS
ProductsAndGroupsModelAdmin::set_managed_models(array("Product", "ProductGroup", "ProductVariation", "ProductAttributeType"));
Product_Image::set_thumbnail_size(140, 100);
Ejemplo n.º 2
0
 /**
  * Set the default country code
  *
  * @param string $country_code
  */
 public static function set_default_country_code($country_code)
 {
     self::$default_country_code = $country_code;
 }
<?php

/**
 * Example eCommerce configuration file.
 *
 * This file is tested in the 'EcommerceTest' unit test.
 *
 * copy the lines below to your mysite/_config.php file and set as required.
 */
// * * * NON-ECOMMERCE SETTINGS
Payment::set_site_currency('NZD');
Geoip::$default_country_code = "NZ";
i18n::set_locale('en_NZ');
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
Object::useCustomClass('SS_Datetime', 'I18nDatetime', true);
// * * * SHOPPING CART AND ORDER
Order::set_email("*****@*****.**");
Order::set_receipt_subject("Thank you for your order at www.myshop.com - Order #%d");
Order::set_modifiers(array("FlatTaxModifier", "SimpleShippingModifier"));
Order::set_table_overview_fields(array('Total' => 'Total', 'Status' => 'Status'));
//
Order::set_maximum_ignorable_sales_payments_difference(0.001);
//sometimes there are small discrepancies in total (for various reasons)- here you can set the max allowed differences
Order::set_order_id_start_number(1234567);
//sets a start number for order ID, so that they do not start at one.
Order::set_cancel_before_payment(false);