Created
June 5, 2017 13:34
-
-
Save dakala/f5678a53df8af9d26ed8cc473ea6fece to your computer and use it in GitHub Desktop.
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
diff --git a/.platform/local/project.yaml b/.platform/local/project.yaml | |
index d76c7c6..6736607 100644 | |
--- a/.platform/local/project.yaml | |
+++ b/.platform/local/project.yaml | |
@@ -1,2 +1,3 @@ | |
id: 4a3nbi2oz2kuo | |
host: bc.platform.sh | |
+alias-group: ro | |
diff --git a/.platform/routes.yaml b/.platform/routes.yaml | |
index 684bda4..c6746a6 100644 | |
--- a/.platform/routes.yaml | |
+++ b/.platform/routes.yaml | |
@@ -11,6 +11,20 @@ | |
# This file was generated: 08/02/2017 13:31:13 | |
# -- | |
+"https://{default}/shop": | |
+ cache: | |
+ default_ttl: 60 | |
+ enabled: false | |
+ type: upstream | |
+ upstream: "shop:php" | |
+ | |
+"https://www.britishcouncil.ro/shop": | |
+ cache: | |
+ default_ttl: 60 | |
+ enabled: false | |
+ type: upstream | |
+ upstream: "shop:php" | |
+ | |
"https://{default}/": | |
cache: | |
default_ttl: 60 | |
diff --git a/.platform/services.yaml b/.platform/services.yaml | |
index f4aa243..d771c4b 100644 | |
--- a/.platform/services.yaml | |
+++ b/.platform/services.yaml | |
@@ -3,12 +3,19 @@ | |
# Each service listed will be deployed | |
# to power your Platform.sh project. | |
+shopdb: | |
+ type: mysql:5.5 | |
+ disk: 2048 | |
+ | |
+shopredis: | |
+ type: redis:2.8 | |
+ | |
mysql: | |
type: mysql:5.5 | |
- disk: 4096 | |
+ disk: 2048 | |
redis: | |
- type: redis | |
+ type: redis:2.8 | |
elasticsearch: | |
type: elasticsearch:1.7 | |
diff --git a/CHANGELOG-QA b/CHANGELOG-QA | |
index a6f7f80..e0a0ba7 100644 | |
--- a/CHANGELOG-QA | |
+++ b/CHANGELOG-QA | |
@@ -1 +1,3 @@ | |
test restructure 2 | |
+refresh build | |
+build refresh | |
diff --git a/shop/.platform.app.yaml b/shop/.platform.app.yaml | |
new file mode 100644 | |
index 0000000..7b03003 | |
--- /dev/null | |
+++ b/shop/.platform.app.yaml | |
@@ -0,0 +1,110 @@ | |
+# This file describes an application. You can have multiple applications | |
+# in the same project. | |
+ | |
+# The name of this app. Must be unique within a project. | |
+name: 'shop' | |
+ | |
+# The runtime the application uses. | |
+type: 'php:7.0' | |
+ | |
+# Configuration of the build of this application. | |
+build: | |
+ flavor: drupal | |
+ | |
+# The build-time dependencies of the app. | |
+dependencies: | |
+ php: | |
+ "drush/drush": "^8.0" | |
+ | |
+# The relationships of the application with services or other applications. | |
+# | |
+# The left-hand side is the name of the relationship as it will be exposed | |
+# to the application in the PLATFORM_RELATIONSHIPS variable. The right-hand | |
+# side is in the form `<service name>:<endpoint name>`. | |
+relationships: | |
+ database: "shopdb:mysql" | |
+ redis: "shopredis:redis" | |
+ | |
+# The configuration of app when it is exposed to the web. | |
+web: | |
+ # Specific parameters for different URL prefixes. | |
+ locations: | |
+ '/': | |
+ root: 'shop' | |
+ '/shop': | |
+ # The folder from which to serve static assets, for this location. | |
+ # | |
+ # This is a filesystem path, relative to the application root. | |
+ root: 'shop' | |
+ | |
+ # How long to allow static assets from this location to be cached. | |
+ # | |
+ # Can be a time in seconds, or -1 for no caching. Times can be | |
+ # suffixed with "s" (seconds), "m" (minutes), "h" (hours), "d" | |
+ # (days), "w" (weeks), "M" (months, as 30 days) or "y" (years, as | |
+ # 365 days). | |
+ expires: 5m | |
+ | |
+ # Whether to forward disallowed and missing resources from this | |
+ # location to the application. | |
+ # | |
+ # Can be true, false or a URI path string. | |
+ passthru: '/shop/index.php' | |
+ | |
+ # Deny access to static files in this location. | |
+ allow: false | |
+ | |
+ # Rules for specific URI patterns. | |
+ rules: | |
+ # Allow access to common static files. | |
+ '\.(jpe?g|png|gif|svgz?|css|js|map|ico|bmp|eot|woff2?|otf|ttf|html?)$': | |
+ allow: true | |
+ # Provide a longer TTL (2 weeks) for aggregated CSS and JS files. | |
+ '^/sites/default/files/(css|js)': | |
+ expires: 2w | |
+ '^/robots\.txt$': | |
+ allow: true | |
+ '^/humans\.txt$': | |
+ allow: true | |
+ '^/sitemap\.xml$': | |
+ allow: true | |
+ | |
+# The size of the persistent disk of the application (in MB). | |
+disk: 2048 | |
+ | |
+# The mounts that will be performed when the package is deployed. | |
+mounts: | |
+ '/shop/sites/default/files': 'shared:files/files' | |
+ '/tmp': 'shared:files/tmp' | |
+ '/private': 'shared:files/private' | |
+ '/drush-backups': 'shared:files/drush-backups' | |
+ | |
+# The hooks executed at various points in the lifecycle of the application. | |
+hooks: | |
+ build: | | |
+ cd shop | |
+ mkdir -p sites/all/drush/commands | |
+ curl -s https://raw.githubusercontent.com/artetecha/true-drush-cc-all/master/ccall.drush.inc -o sites/all/drush/commands/ccall.drush.inc | |
+ cp profiles/bcshop/resources/sureroute-test-object.html . | |
+ cp profiles/bcshop/resources/humans.txt . | |
+ rm robots.txt | |
+ # We run deploy hook after your application has been deployed and started. | |
+ deploy: | | |
+ cd shop | |
+ drush -y updb --cache-clear=0 | |
+ drush -y fra | |
+ drush -y cc all | |
+ | |
+# The configuration of scheduled execution. | |
+crons: | |
+ advancedqueue: | |
+ spec: '* * * * *' | |
+ cmd: 'cd shop ; drush advancedqueue --timeout=295 commerce_license_synchronization' | |
+ drupal: | |
+ spec: '*/20 * * * *' | |
+ cmd: 'cd shop ; drush core-cron' | |
+ | |
+# Additional extensions | |
+runtime: | |
+ extensions: | |
+ - redis | |
diff --git a/shop/CHANGELOG-QA b/shop/CHANGELOG-QA | |
new file mode 100644 | |
index 0000000..a1b78e2 | |
--- /dev/null | |
+++ b/shop/CHANGELOG-QA | |
@@ -0,0 +1 @@ | |
+first commit | |
\ No newline at end of file | |
diff --git a/shop/libraries/README.txt b/shop/libraries/README.txt | |
new file mode 100644 | |
index 0000000..69d8a0e | |
--- /dev/null | |
+++ b/shop/libraries/README.txt | |
@@ -0,0 +1,5 @@ | |
+Place custom libraries for your project in this directory. The whole directory | |
+will be moved inside `sites/default` at the end of the build process. | |
+ | |
+Don't place libraries from external sources in here, add them to the `project.make` | |
+file in the root directory. | |
diff --git a/shop/modules/README.txt b/shop/modules/README.txt | |
new file mode 100644 | |
index 0000000..9d20cc8 | |
--- /dev/null | |
+++ b/shop/modules/README.txt | |
@@ -0,0 +1,5 @@ | |
+Place custom modules for your project in this directory. The whole directory | |
+will be moved inside `sites/default` at the end of the build process. | |
+ | |
+Don't place contributed modules in here, add them to the `project.make` | |
+file in the root directory. | |
diff --git a/shop/modules/custom/bcshop_install/bcshop_install.info b/shop/modules/custom/bcshop_install/bcshop_install.info | |
new file mode 100644 | |
index 0000000..52bfe37 | |
--- /dev/null | |
+++ b/shop/modules/custom/bcshop_install/bcshop_install.info | |
@@ -0,0 +1,5 @@ | |
+name = BC Shop install module | |
+description = Module to handle local installation of code. | |
+core = 7.x | |
+package = BCSHOP | |
+version = 7.x-1.0 | |
diff --git a/shop/modules/custom/bcshop_install/bcshop_install.install b/shop/modules/custom/bcshop_install/bcshop_install.install | |
new file mode 100644 | |
index 0000000..89832b3 | |
--- /dev/null | |
+++ b/shop/modules/custom/bcshop_install/bcshop_install.install | |
@@ -0,0 +1,12 @@ | |
+<?php | |
+ | |
+/** | |
+ * Implements hook_install | |
+ */ | |
+function bcshop_install_install() { | |
+ // Enable local modules. | |
+ module_enable(array( | |
+ 'bcshop_site_settings', | |
+ 'bcshop_webtrends', | |
+ )); | |
+} | |
diff --git a/shop/modules/custom/bcshop_install/bcshop_install.module b/shop/modules/custom/bcshop_install/bcshop_install.module | |
new file mode 100644 | |
index 0000000..b3d9bbc | |
--- /dev/null | |
+++ b/shop/modules/custom/bcshop_install/bcshop_install.module | |
@@ -0,0 +1 @@ | |
+<?php | |
diff --git a/shop/modules/features/bcshop_site_settings/bcshop_site_settings.features.field_instance.inc b/shop/modules/features/bcshop_site_settings/bcshop_site_settings.features.field_instance.inc | |
new file mode 100644 | |
index 0000000..ada1038 | |
--- /dev/null | |
+++ b/shop/modules/features/bcshop_site_settings/bcshop_site_settings.features.field_instance.inc | |
@@ -0,0 +1,96 @@ | |
+<?php | |
+/** | |
+ * @file | |
+ * bcshop_site_settings.features.field_instance.inc | |
+ */ | |
+ | |
+/** | |
+ * Implements hook_field_default_field_instances(). | |
+ */ | |
+function bcshop_site_settings_field_default_field_instances() { | |
+ $field_instances = array(); | |
+ | |
+ // Exported field_instance: | |
+ // 'commerce_customer_profile-billing-commerce_customer_address'. | |
+ $field_instances['commerce_customer_profile-billing-commerce_customer_address'] = array( | |
+ 'bundle' => 'billing', | |
+ 'default_value' => NULL, | |
+ 'deleted' => 0, | |
+ 'description' => '', | |
+ 'display' => array( | |
+ 'administrator' => array( | |
+ 'label' => 'hidden', | |
+ 'module' => 'addressfield', | |
+ 'settings' => array( | |
+ 'format_handlers' => array( | |
+ 0 => 'address', | |
+ ), | |
+ 'use_widget_handlers' => 1, | |
+ ), | |
+ 'type' => 'addressfield_default', | |
+ 'weight' => -10, | |
+ ), | |
+ 'customer' => array( | |
+ 'label' => 'hidden', | |
+ 'module' => 'addressfield', | |
+ 'settings' => array( | |
+ 'format_handlers' => array( | |
+ 0 => 'address', | |
+ ), | |
+ 'use_widget_handlers' => 1, | |
+ ), | |
+ 'type' => 'addressfield_default', | |
+ 'weight' => -10, | |
+ ), | |
+ 'default' => array( | |
+ 'label' => 'hidden', | |
+ 'module' => 'addressfield', | |
+ 'settings' => array( | |
+ 'format_handlers' => array( | |
+ 'address' => 'address', | |
+ ), | |
+ 'use_widget_handlers' => 1, | |
+ ), | |
+ 'type' => 'addressfield_default', | |
+ 'weight' => -10, | |
+ ), | |
+ ), | |
+ 'display_label' => '', | |
+ 'entity_type' => 'commerce_customer_profile', | |
+ 'field_name' => 'commerce_customer_address', | |
+ 'label' => 'Residence address', | |
+ 'required' => 1, | |
+ 'settings' => array( | |
+ 'user_register_form' => FALSE, | |
+ ), | |
+ 'widget' => array( | |
+ 'active' => 1, | |
+ 'module' => 'addressfield', | |
+ 'settings' => array( | |
+ 'available_countries' => array(), | |
+ 'default_country' => 'RO', | |
+ 'format_handlers' => array( | |
+ 'address' => 'address', | |
+ 'name-full' => 'name-full', | |
+ 'national_id' => 0, | |
+ 'personal_name' => 0, | |
+ 'tax_id' => 0, | |
+ 'address-hide-postal-code' => 0, | |
+ 'address-hide-street' => 0, | |
+ 'address-hide-country' => 0, | |
+ 'organisation' => 0, | |
+ 'name-oneline' => 0, | |
+ 'address-optional' => 0, | |
+ ), | |
+ ), | |
+ 'type' => 'addressfield_standard', | |
+ 'weight' => -10, | |
+ ), | |
+ ); | |
+ | |
+ // Translatables | |
+ // Included for use with string extractors like potx. | |
+ t('Residence address'); | |
+ | |
+ return $field_instances; | |
+} | |
diff --git a/shop/modules/features/bcshop_site_settings/bcshop_site_settings.features.inc b/shop/modules/features/bcshop_site_settings/bcshop_site_settings.features.inc | |
new file mode 100644 | |
index 0000000..f28e232 | |
--- /dev/null | |
+++ b/shop/modules/features/bcshop_site_settings/bcshop_site_settings.features.inc | |
@@ -0,0 +1,21 @@ | |
+<?php | |
+/** | |
+ * @file | |
+ * bcshop_site_settings.features.inc | |
+ */ | |
+ | |
+/** | |
+ * Implements hook_ctools_plugin_api(). | |
+ */ | |
+function bcshop_site_settings_ctools_plugin_api($module = NULL, $api = NULL) { | |
+ if ($module == "strongarm" && $api == "strongarm") { | |
+ return array("version" => "1"); | |
+ } | |
+} | |
+ | |
+/** | |
+ * Implements hook_views_api(). | |
+ */ | |
+function bcshop_site_settings_views_api($module = NULL, $api = NULL) { | |
+ return array("api" => "3.0"); | |
+} | |
diff --git a/shop/modules/features/bcshop_site_settings/bcshop_site_settings.features.language.inc b/shop/modules/features/bcshop_site_settings/bcshop_site_settings.features.language.inc | |
new file mode 100644 | |
index 0000000..b4c1367 | |
--- /dev/null | |
+++ b/shop/modules/features/bcshop_site_settings/bcshop_site_settings.features.language.inc | |
@@ -0,0 +1,40 @@ | |
+<?php | |
+/** | |
+ * @file | |
+ * bcshop_site_settings.features.language.inc | |
+ */ | |
+ | |
+/** | |
+ * Implements hook_locale_default_languages(). | |
+ */ | |
+function bcshop_site_settings_locale_default_languages() { | |
+ $languages = array(); | |
+ | |
+ // Exported language: en. | |
+ $languages['en'] = array( | |
+ 'language' => 'en', | |
+ 'name' => 'English', | |
+ 'native' => 'English', | |
+ 'direction' => 0, | |
+ 'enabled' => 1, | |
+ 'plurals' => 0, | |
+ 'formula' => '', | |
+ 'domain' => '', | |
+ 'prefix' => 'en', | |
+ 'weight' => -9, | |
+ ); | |
+ // Exported language: ro. | |
+ $languages['ro'] = array( | |
+ 'language' => 'ro', | |
+ 'name' => 'Romanian', | |
+ 'native' => 'Română', | |
+ 'direction' => 0, | |
+ 'enabled' => 1, | |
+ 'plurals' => 0, | |
+ 'formula' => '', | |
+ 'domain' => '', | |
+ 'prefix' => '', | |
+ 'weight' => -10, | |
+ ); | |
+ return $languages; | |
+} | |
diff --git a/shop/modules/features/bcshop_site_settings/bcshop_site_settings.info b/shop/modules/features/bcshop_site_settings/bcshop_site_settings.info | |
new file mode 100644 | |
index 0000000..a51c835 | |
--- /dev/null | |
+++ b/shop/modules/features/bcshop_site_settings/bcshop_site_settings.info | |
@@ -0,0 +1,37 @@ | |
+name = BC Shop Romania Settings | |
+description = Global settings for the BC Shop. | |
+core = 7.x | |
+package = BCSHOP - Romania | |
+version = 7.x-1.1 | |
+dependencies[] = addressfield | |
+dependencies[] = bcshop_settings | |
+dependencies[] = commerce_cart | |
+dependencies[] = commerce_checkout | |
+dependencies[] = commerce_customer_ui | |
+dependencies[] = commerce_features | |
+dependencies[] = commerce_google_tag_manager | |
+dependencies[] = commerce_license | |
+dependencies[] = ctools | |
+dependencies[] = features | |
+dependencies[] = i18n_variable | |
+dependencies[] = list | |
+dependencies[] = locale | |
+dependencies[] = options | |
+dependencies[] = strongarm | |
+dependencies[] = text | |
+dependencies[] = variable_realm | |
+dependencies[] = views | |
+features[ctools][] = strongarm:strongarm:1 | |
+features[ctools][] = views:views_default:3.0 | |
+features[features_api][] = api:2 | |
+features[field_instance][] = commerce_customer_profile-billing-commerce_customer_address | |
+features[language][] = en | |
+features[language][] = ro | |
+features[variable][] = campaignmonitor_account | |
+features[variable][] = commerce_default_currency | |
+features[variable][] = commerce_enabled_currencies | |
+features[variable][] = date_default_timezone | |
+features[variable][] = date_first_day | |
+features[variable][] = language_count | |
+features[variable][] = language_default | |
+features[variable][] = site_default_country | |
diff --git a/shop/modules/features/bcshop_site_settings/bcshop_site_settings.module b/shop/modules/features/bcshop_site_settings/bcshop_site_settings.module | |
new file mode 100644 | |
index 0000000..22bad88 | |
--- /dev/null | |
+++ b/shop/modules/features/bcshop_site_settings/bcshop_site_settings.module | |
@@ -0,0 +1,134 @@ | |
+<?php | |
+ | |
+/** | |
+ * @file | |
+ * Code for the BCShop Site Settings feature. | |
+ * | |
+ * This module is for adding custom site variables. | |
+ * | |
+ * Variables representing legal info, etc are defined by | |
+ * the administrator using the form at admin/config/system/site-information. | |
+ * The form is altered to display additional custom variables that are defined | |
+ * using hook_variable_info. | |
+ * Internationalization of variables is implemented by i18n so we get this for | |
+ * free. We only have to select the variables as multilingual. | |
+ */ | |
+ | |
+include_once 'bcshop_site_settings.features.inc'; | |
+ | |
+/** | |
+ * Implements hook_date_formats(). | |
+ */ | |
+function bcshop_site_settings_date_formats() { | |
+ $formats = array(); | |
+ $formats[] = array( | |
+ 'type' => 'long', | |
+ 'format' => 'l d F Y - H:i', | |
+ 'locales' => array('en', 'ro'), | |
+ ); | |
+ $formats[] = array( | |
+ 'type' => 'medium', | |
+ 'format' => 'd F Y - H:i', | |
+ 'locales' => array('en', 'ro'), | |
+ ); | |
+// $formats[] = array( | |
+// 'type' => 'short', | |
+// 'format' => 'd/m/Y - H:i', | |
+// 'locales' => array('en', 'ro'), | |
+// ); | |
+ $formats[] = array( | |
+ 'type' => 'year', | |
+ 'format' => 'Y', | |
+ 'locales' => array('en', 'ro'), | |
+ ); | |
+ $formats[] = array( | |
+ 'type' => 'month_year', | |
+ 'format' => 'F Y', | |
+ 'locales' => array('en', 'ro'), | |
+ ); | |
+ $formats[] = array( | |
+ 'type' => 'time', | |
+ 'format' => 'H:i', | |
+ 'locales' => array('en', 'ro'), | |
+ ); | |
+ return $formats; | |
+} | |
+ | |
+/** | |
+ * Implements hook_post_features_revert(). | |
+ */ | |
+function bcshop_site_settings_post_features_revert($component) { | |
+ // Date formats are fully defined in bcshop_site_settings_date_formats(). | |
+ // However, the way this hook is handled by Drupal is weird, so simply | |
+ // having the formats there won't do much. | |
+ // Therefore, we also export the date formats for the default language with | |
+ // Features [Strongarm] (which doesn't export date formats for additional | |
+ // languages). | |
+ // Then the present hook will be invoked right after this feature is reverted; | |
+ // What the code does is to get the date formats by invoking | |
+ // bcshop_site_settings_date_formats(), then save the formats for all the languages | |
+ // other than the default one (which is handled by the feature revert itself). | |
+ if (drupal_multilingual()) { | |
+ $date_formats = module_invoke('bcshop_site_settings', 'date_formats'); | |
+ $date_formats[] = array( | |
+ 'type' => 'short', | |
+ 'format' => 'd/m/Y - H:i', | |
+ 'locales' => array('en', 'ro'), | |
+ ); | |
+ foreach ($date_formats as $date_format) { | |
+ foreach ($date_format['locales'] as $locale) { | |
+ locale_date_format_save($locale, $date_format['type'], $date_format['format']); | |
+ } | |
+ } | |
+ } | |
+} | |
+ | |
+/** | |
+ * Implements hook_commerce_currency_info_alter(). | |
+ */ | |
+function bcshop_site_settings_commerce_currency_info_alter(&$currencies) { | |
+ $currencies['RON']['symbol'] = 'RON'; | |
+ $currencies['RON']['symbol_placement'] = 'after'; | |
+ $currencies['RON']['format_callback'] = 'bcshop_site_settings_commerce_currency_format'; | |
+ $currencies['RON']['thousands_separator'] = ''; | |
+} | |
+ | |
+/** | |
+ * Format prices without decimals. | |
+ * | |
+ * Setting decimals to 0 in hook_commerce_currency_info_alter() has the result | |
+ * of appearing to multiply prices by 100. The price is displayed with the | |
+ * default 2 decimal places but without the decimals separator. | |
+ * | |
+ * @param $amount | |
+ * A numeric price amount value. | |
+ * @param $currency_code | |
+ * The three character code of the currency. | |
+ * @param $object | |
+ * When present, the object to which the price is attached. | |
+ * @param $convert | |
+ * Boolean indicating whether or not the amount needs to be converted to a | |
+ * decimal price amount when formatting. | |
+ * | |
+ * @see commerce_currency_format() | |
+ * | |
+ * @return | |
+ * A fully formatted currency. | |
+ */ | |
+function bcshop_site_settings_commerce_currency_format($amount, $currency, $object = NULL, $convert = TRUE) { | |
+ // Format the price as a number, use 0 for no decimal places in output. | |
+ $price = number_format(commerce_currency_round(abs($amount), $currency), 0, $currency['decimal_separator'], $currency['thousands_separator']); | |
+ // Establish the replacement values to format this price for its currency. | |
+ $replacements = array( | |
+ '@code_before' => $currency['code_placement'] == 'before' ? $currency['code'] : '', | |
+ '@symbol_before' => $currency['symbol_placement'] == 'before' ? $currency['symbol'] : '', | |
+ '@price' => $price, | |
+ '@symbol_after' => $currency['symbol_placement'] == 'after' ? $currency['symbol'] : '', | |
+ '@code_after' => $currency['code_placement'] == 'after' ? $currency['code'] : '', | |
+ '@negative' => $amount < 0 ? '-' : '', | |
+ '@symbol_spacer' => $currency['symbol_spacer'], | |
+ '@code_spacer' => $currency['code_spacer'], | |
+ ); | |
+ | |
+ return trim(t('@code_before@code_spacer@negative@symbol_before@price@symbol_spacer@symbol_after@code_spacer@code_after', $replacements)); | |
+} | |
diff --git a/shop/modules/features/bcshop_site_settings/bcshop_site_settings.strongarm.inc b/shop/modules/features/bcshop_site_settings/bcshop_site_settings.strongarm.inc | |
new file mode 100644 | |
index 0000000..ee47b45 | |
--- /dev/null | |
+++ b/shop/modules/features/bcshop_site_settings/bcshop_site_settings.strongarm.inc | |
@@ -0,0 +1,233 @@ | |
+<?php | |
+/** | |
+ * @file | |
+ * bcshop_site_settings.strongarm.inc | |
+ */ | |
+ | |
+/** | |
+ * Implements hook_strongarm(). | |
+ */ | |
+function bcshop_site_settings_strongarm() { | |
+ $export = array(); | |
+ | |
+ $strongarm = new stdClass(); | |
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | |
+ $strongarm->api_version = 1; | |
+ $strongarm->name = 'campaignmonitor_account'; | |
+ $strongarm->value = array( | |
+ 'api_key' => '35f6ffcfb2638c60425fcc3e687736478f27220802d7fefb', | |
+ 'client_id' => '70fcfe9bbbb8f5f162557e2c279cca91', | |
+ ); | |
+ $export['campaignmonitor_account'] = $strongarm; | |
+ | |
+ $strongarm = new stdClass(); | |
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | |
+ $strongarm->api_version = 1; | |
+ $strongarm->name = 'commerce_default_currency'; | |
+ $strongarm->value = 'RON'; | |
+ $export['commerce_default_currency'] = $strongarm; | |
+ | |
+ $strongarm = new stdClass(); | |
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | |
+ $strongarm->api_version = 1; | |
+ $strongarm->name = 'commerce_enabled_currencies'; | |
+ $strongarm->value = array( | |
+ 'RON' => 'RON', | |
+ 'AED' => 0, | |
+ 'AFN' => 0, | |
+ 'ANG' => 0, | |
+ 'AOA' => 0, | |
+ 'ARM' => 0, | |
+ 'ARS' => 0, | |
+ 'AUD' => 0, | |
+ 'AWG' => 0, | |
+ 'AZN' => 0, | |
+ 'BAM' => 0, | |
+ 'BBD' => 0, | |
+ 'BDT' => 0, | |
+ 'BGN' => 0, | |
+ 'BHD' => 0, | |
+ 'BIF' => 0, | |
+ 'BMD' => 0, | |
+ 'BND' => 0, | |
+ 'BOB' => 0, | |
+ 'BRL' => 0, | |
+ 'BSD' => 0, | |
+ 'BTN' => 0, | |
+ 'BWP' => 0, | |
+ 'BYR' => 0, | |
+ 'BZD' => 0, | |
+ 'CAD' => 0, | |
+ 'CDF' => 0, | |
+ 'CHF' => 0, | |
+ 'CLP' => 0, | |
+ 'CNY' => 0, | |
+ 'COP' => 0, | |
+ 'CRC' => 0, | |
+ 'CUC' => 0, | |
+ 'CUP' => 0, | |
+ 'CVE' => 0, | |
+ 'CZK' => 0, | |
+ 'DJF' => 0, | |
+ 'DKK' => 0, | |
+ 'DOP' => 0, | |
+ 'DZD' => 0, | |
+ 'EEK' => 0, | |
+ 'EGP' => 0, | |
+ 'ERN' => 0, | |
+ 'ETB' => 0, | |
+ 'EUR' => 0, | |
+ 'FJD' => 0, | |
+ 'FKP' => 0, | |
+ 'GBP' => 0, | |
+ 'GHS' => 0, | |
+ 'GIP' => 0, | |
+ 'GMD' => 0, | |
+ 'GNF' => 0, | |
+ 'GTQ' => 0, | |
+ 'GYD' => 0, | |
+ 'HKD' => 0, | |
+ 'HNL' => 0, | |
+ 'HRK' => 0, | |
+ 'HTG' => 0, | |
+ 'HUF' => 0, | |
+ 'IDR' => 0, | |
+ 'ILS' => 0, | |
+ 'INR' => 0, | |
+ 'IRR' => 0, | |
+ 'ISK' => 0, | |
+ 'JMD' => 0, | |
+ 'JOD' => 0, | |
+ 'JPY' => 0, | |
+ 'KES' => 0, | |
+ 'KGS' => 0, | |
+ 'KMF' => 0, | |
+ 'KRW' => 0, | |
+ 'KWD' => 0, | |
+ 'KYD' => 0, | |
+ 'KZT' => 0, | |
+ 'LAK' => 0, | |
+ 'LBP' => 0, | |
+ 'LKR' => 0, | |
+ 'LRD' => 0, | |
+ 'LSL' => 0, | |
+ 'LTL' => 0, | |
+ 'LVL' => 0, | |
+ 'LYD' => 0, | |
+ 'MAD' => 0, | |
+ 'MDL' => 0, | |
+ 'MKD' => 0, | |
+ 'MMK' => 0, | |
+ 'MNT' => 0, | |
+ 'MOP' => 0, | |
+ 'MRO' => 0, | |
+ 'MTP' => 0, | |
+ 'MUR' => 0, | |
+ 'MXN' => 0, | |
+ 'MYR' => 0, | |
+ 'MZN' => 0, | |
+ 'NAD' => 0, | |
+ 'NGN' => 0, | |
+ 'NIO' => 0, | |
+ 'NOK' => 0, | |
+ 'NPR' => 0, | |
+ 'NZD' => 0, | |
+ 'PAB' => 0, | |
+ 'PEN' => 0, | |
+ 'PGK' => 0, | |
+ 'PHP' => 0, | |
+ 'PKR' => 0, | |
+ 'PLN' => 0, | |
+ 'PYG' => 0, | |
+ 'QAR' => 0, | |
+ 'RHD' => 0, | |
+ 'RSD' => 0, | |
+ 'RUB' => 0, | |
+ 'SAR' => 0, | |
+ 'SBD' => 0, | |
+ 'SCR' => 0, | |
+ 'SDD' => 0, | |
+ 'SEK' => 0, | |
+ 'SGD' => 0, | |
+ 'SHP' => 0, | |
+ 'SLL' => 0, | |
+ 'SOS' => 0, | |
+ 'SRD' => 0, | |
+ 'SRG' => 0, | |
+ 'STD' => 0, | |
+ 'SYP' => 0, | |
+ 'SZL' => 0, | |
+ 'THB' => 0, | |
+ 'TND' => 0, | |
+ 'TOP' => 0, | |
+ 'TRY' => 0, | |
+ 'TTD' => 0, | |
+ 'TWD' => 0, | |
+ 'TZS' => 0, | |
+ 'UAH' => 0, | |
+ 'UGX' => 0, | |
+ 'USD' => 0, | |
+ 'UYU' => 0, | |
+ 'VEF' => 0, | |
+ 'VND' => 0, | |
+ 'VUV' => 0, | |
+ 'WST' => 0, | |
+ 'XAF' => 0, | |
+ 'XCD' => 0, | |
+ 'XOF' => 0, | |
+ 'XPF' => 0, | |
+ 'YER' => 0, | |
+ 'ZAR' => 0, | |
+ 'ZMK' => 0, | |
+ ); | |
+ $export['commerce_enabled_currencies'] = $strongarm; | |
+ | |
+ $strongarm = new stdClass(); | |
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | |
+ $strongarm->api_version = 1; | |
+ $strongarm->name = 'date_default_timezone'; | |
+ $strongarm->value = 'Europe/Bucharest'; | |
+ $export['date_default_timezone'] = $strongarm; | |
+ | |
+ $strongarm = new stdClass(); | |
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | |
+ $strongarm->api_version = 1; | |
+ $strongarm->name = 'date_first_day'; | |
+ $strongarm->value = '0'; | |
+ $export['date_first_day'] = $strongarm; | |
+ | |
+ $strongarm = new stdClass(); | |
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | |
+ $strongarm->api_version = 1; | |
+ $strongarm->name = 'language_count'; | |
+ $strongarm->value = 2; | |
+ $export['language_count'] = $strongarm; | |
+ | |
+ $strongarm = new stdClass(); | |
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | |
+ $strongarm->api_version = 1; | |
+ $strongarm->name = 'language_default'; | |
+ $strongarm->value = (object) array( | |
+ 'language' => 'ro', | |
+ 'name' => 'Romanian', | |
+ 'native' => 'Română', | |
+ 'direction' => '0', | |
+ 'enabled' => '1', | |
+ 'plurals' => '0', | |
+ 'formula' => '', | |
+ 'domain' => '', | |
+ 'prefix' => '', | |
+ 'weight' => '-10', | |
+ 'javascript' => '', | |
+ ); | |
+ $export['language_default'] = $strongarm; | |
+ | |
+ $strongarm = new stdClass(); | |
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | |
+ $strongarm->api_version = 1; | |
+ $strongarm->name = 'site_default_country'; | |
+ $strongarm->value = 'RO'; | |
+ $export['site_default_country'] = $strongarm; | |
+ | |
+ return $export; | |
+} | |
diff --git a/shop/modules/features/bcshop_webtrends/bcshop_webtrends.features.inc b/shop/modules/features/bcshop_webtrends/bcshop_webtrends.features.inc | |
new file mode 100644 | |
index 0000000..693f69c | |
--- /dev/null | |
+++ b/shop/modules/features/bcshop_webtrends/bcshop_webtrends.features.inc | |
@@ -0,0 +1,14 @@ | |
+<?php | |
+/** | |
+ * @file | |
+ * bcshop_webtrends.features.inc | |
+ */ | |
+ | |
+/** | |
+ * Implements hook_ctools_plugin_api(). | |
+ */ | |
+function bcshop_webtrends_ctools_plugin_api($module = NULL, $api = NULL) { | |
+ if ($module == "strongarm" && $api == "strongarm") { | |
+ return array("version" => "1"); | |
+ } | |
+} | |
diff --git a/shop/modules/features/bcshop_webtrends/bcshop_webtrends.info b/shop/modules/features/bcshop_webtrends/bcshop_webtrends.info | |
new file mode 100644 | |
index 0000000..cc38222 | |
--- /dev/null | |
+++ b/shop/modules/features/bcshop_webtrends/bcshop_webtrends.info | |
@@ -0,0 +1,21 @@ | |
+name = BC Shop Romania Webtrends | |
+description = A feature containing all of the webtrends settings | |
+core = 7.x | |
+package = BCSHOP - Romania | |
+version = 7.x-1.0 | |
+dependencies[] = ctools | |
+dependencies[] = strongarm | |
+dependencies[] = webtrends_simple | |
+features[ctools][] = strongarm:strongarm:1 | |
+features[features_api][] = api:2 | |
+features[variable][] = webtrends_simple_country | |
+features[variable][] = webtrends_simple_dcsid | |
+features[variable][] = webtrends_simple_domain | |
+features[variable][] = webtrends_simple_enabled_roles | |
+features[variable][] = webtrends_simple_fpcdom_url | |
+features[variable][] = webtrends_simple_i18n | |
+features[variable][] = webtrends_simple_optimize_enabled | |
+features[variable][] = webtrends_simple_optimize_id | |
+features[variable][] = webtrends_simple_search_metatag | |
+features[variable][] = webtrends_simple_site_url | |
+features[variable][] = webtrends_simple_timezone | |
diff --git a/shop/modules/features/bcshop_webtrends/bcshop_webtrends.module b/shop/modules/features/bcshop_webtrends/bcshop_webtrends.module | |
new file mode 100644 | |
index 0000000..7707bbb | |
--- /dev/null | |
+++ b/shop/modules/features/bcshop_webtrends/bcshop_webtrends.module | |
@@ -0,0 +1,30 @@ | |
+<?php | |
+/** | |
+ * @file | |
+ * Code for the BC Shop Webtrends feature. | |
+ */ | |
+ | |
+include_once 'bcshop_webtrends.features.inc'; | |
+ | |
+/** | |
+ * Implements hook_webtrends_simple_settings(). | |
+ */ | |
+function bcshop_webtrends_webtrends_simple_settings() { | |
+ $settings = array(); | |
+ | |
+ // Special overrides for authenticated users. | |
+ if (user_is_logged_in()) { | |
+ $settings = array_merge($settings, array( | |
+ // Special 'fake' country for global CMS Solas Users. | |
+ 'webtrends_simple_country' => 'solas-user', | |
+ // No SBU. | |
+ 'webtrends_sbu' => array(), | |
+ 'webtrends_sbu_metatag' => '', | |
+ // No content group. | |
+ 'webtrends_content_group' => array(), | |
+ // .digital domain for these users. | |
+ 'webtrends_simple_site_url' => 'britishcouncil.digital' | |
+ )); | |
+ } | |
+ return $settings; | |
+} | |
diff --git a/shop/modules/features/bcshop_webtrends/bcshop_webtrends.strongarm.inc b/shop/modules/features/bcshop_webtrends/bcshop_webtrends.strongarm.inc | |
new file mode 100644 | |
index 0000000..6ca14e4 | |
--- /dev/null | |
+++ b/shop/modules/features/bcshop_webtrends/bcshop_webtrends.strongarm.inc | |
@@ -0,0 +1,98 @@ | |
+<?php | |
+/** | |
+ * @file | |
+ * bcshop_webtrends.strongarm.inc | |
+ */ | |
+ | |
+/** | |
+ * Implements hook_strongarm(). | |
+ */ | |
+function bcshop_webtrends_strongarm() { | |
+ $export = array(); | |
+ | |
+ $strongarm = new stdClass(); | |
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | |
+ $strongarm->api_version = 1; | |
+ $strongarm->name = 'webtrends_simple_country'; | |
+ $strongarm->value = 'Romania'; | |
+ $export['webtrends_simple_country'] = $strongarm; | |
+ | |
+ $strongarm = new stdClass(); | |
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | |
+ $strongarm->api_version = 1; | |
+ $strongarm->name = 'webtrends_simple_dcsid'; | |
+ $strongarm->value = 'dcsozkqgb00000sh0y1unaabw_9e3r'; | |
+ $export['webtrends_simple_dcsid'] = $strongarm; | |
+ | |
+ $strongarm = new stdClass(); | |
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | |
+ $strongarm->api_version = 1; | |
+ $strongarm->name = 'webtrends_simple_domain'; | |
+ $strongarm->value = 'statse.webtrendslive.com'; | |
+ $export['webtrends_simple_domain'] = $strongarm; | |
+ | |
+ $strongarm = new stdClass(); | |
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | |
+ $strongarm->api_version = 1; | |
+ $strongarm->name = 'webtrends_simple_enabled_roles'; | |
+ $strongarm->value = array( | |
+ 1 => '1', | |
+ 2 => 0, | |
+ 6 => 0, | |
+ 3 => 0, | |
+ 4 => 0, | |
+ 5 => 0, | |
+ ); | |
+ $export['webtrends_simple_enabled_roles'] = $strongarm; | |
+ | |
+ $strongarm = new stdClass(); | |
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | |
+ $strongarm->api_version = 1; | |
+ $strongarm->name = 'webtrends_simple_fpcdom_url'; | |
+ $strongarm->value = 'britishcouncil.org'; | |
+ $export['webtrends_simple_fpcdom_url'] = $strongarm; | |
+ | |
+ $strongarm = new stdClass(); | |
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | |
+ $strongarm->api_version = 1; | |
+ $strongarm->name = 'webtrends_simple_i18n'; | |
+ $strongarm->value = 'true'; | |
+ $export['webtrends_simple_i18n'] = $strongarm; | |
+ | |
+ $strongarm = new stdClass(); | |
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | |
+ $strongarm->api_version = 1; | |
+ $strongarm->name = 'webtrends_simple_optimize_enabled'; | |
+ $strongarm->value = 0; | |
+ $export['webtrends_simple_optimize_enabled'] = $strongarm; | |
+ | |
+ $strongarm = new stdClass(); | |
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | |
+ $strongarm->api_version = 1; | |
+ $strongarm->name = 'webtrends_simple_optimize_id'; | |
+ $strongarm->value = ''; | |
+ $export['webtrends_simple_optimize_id'] = $strongarm; | |
+ | |
+ $strongarm = new stdClass(); | |
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | |
+ $strongarm->api_version = 1; | |
+ $strongarm->name = 'webtrends_simple_search_metatag'; | |
+ $strongarm->value = ''; | |
+ $export['webtrends_simple_search_metatag'] = $strongarm; | |
+ | |
+ $strongarm = new stdClass(); | |
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | |
+ $strongarm->api_version = 1; | |
+ $strongarm->name = 'webtrends_simple_site_url'; | |
+ $strongarm->value = 'britishcouncil.ro'; | |
+ $export['webtrends_simple_site_url'] = $strongarm; | |
+ | |
+ $strongarm = new stdClass(); | |
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | |
+ $strongarm->api_version = 1; | |
+ $strongarm->name = 'webtrends_simple_timezone'; | |
+ $strongarm->value = '0'; | |
+ $export['webtrends_simple_timezone'] = $strongarm; | |
+ | |
+ return $export; | |
+} | |
diff --git a/shop/php.ini b/shop/php.ini | |
new file mode 100644 | |
index 0000000..db89587 | |
--- /dev/null | |
+++ b/shop/php.ini | |
@@ -0,0 +1,3 @@ | |
+; php.ini | |
+; Increase PHP memory limit | |
+memory_limit = 256M | |
diff --git a/shop/project.make b/shop/project.make | |
new file mode 100644 | |
index 0000000..45322ee | |
--- /dev/null | |
+++ b/shop/project.make | |
@@ -0,0 +1,15 @@ | |
+name = "BC Shop" | |
+description = "A British Council Shop" | |
+core = "7.x" | |
+api = "2" | |
+ | |
+; Drupal core. | |
+projects[drupal][type] = core | |
+projects[drupal][version] = 7.54 | |
+projects[drupal][patch][] = "https://drupal.org/files/issues/install-redirect-on-empty-database-728702-36.patch" | |
+ | |
+; Distro. | |
+projects[bcshop][type] = profile | |
+projects[bcshop][download][type] = git | |
+projects[bcshop][download][url] = [email protected]:britishcouncil/bcshop.git | |
+projects[bcshop][download][branch] = qa | |
diff --git a/shop/settings.php b/shop/settings.php | |
new file mode 100644 | |
index 0000000..98f0b12 | |
--- /dev/null | |
+++ b/shop/settings.php | |
@@ -0,0 +1,31 @@ | |
+<?php | |
+/** | |
+ * @file | |
+ * Drupal settings file. | |
+ */ | |
+ | |
+// Location of install profile. | |
+define('PROFILE_ROOT', DRUPAL_ROOT . '/profiles/bcshop'); | |
+ | |
+// Include profiles settings. | |
+$solas_settings = PROFILE_ROOT . '/resources/settings/s.php'; | |
+if (file_exists($solas_settings)) { | |
+ require_once $solas_settings; | |
+} | |
+ | |
+// Everything that must never be overridden. | |
+ | |
+// Akamai basepath, e.g. http://www.britishcouncil.it | |
+$conf['akamai_basepath'] = 'https://www.britishcouncil.ro'; | |
+ | |
+// Locale custom strings for the country, | |
+// e.g. $conf['locale_custom_strings_it'] = $conf['locale_custom_strings_en']; | |
+$conf['locale_custom_strings_ro_ro'] = $conf['locale_custom_strings_en']; | |
+ | |
+// Unique name for this BC Shop. | |
+$conf['bcshop_name'] = 'bcshop_romania'; | |
+ | |
+/** | |
+ * Google Tag Manager. | |
+ */ | |
+$conf['google_tag_container_id'] = 'GTM-7RKV'; | |
diff --git a/shop/themes/README.txt b/shop/themes/README.txt | |
new file mode 100644 | |
index 0000000..ddb2d9a | |
--- /dev/null | |
+++ b/shop/themes/README.txt | |
@@ -0,0 +1,5 @@ | |
+Place custom themes for your project in this directory. The whole directory | |
+will be moved inside `sites/default` at the end of the build process. | |
+ | |
+Don't place contributed themes or base themes in here, add them to the | |
+`project.make` file in the root directory. | |
diff --git a/site/settings.php b/site/settings.php | |
index a43c27d..8148e03 100644 | |
--- a/site/settings.php | |
+++ b/site/settings.php | |
@@ -24,4 +24,4 @@ $conf['akamai_basepath'] = 'https://www.britishcouncil.ro'; | |
// Locale custom strings for the country, | |
// e.g. $conf['locale_custom_strings_it'] = $conf['locale_custom_strings_en']; | |
-$conf['locale_custom_strings_ro'] = $conf['locale_custom_strings_en']; | |
+$conf['locale_custom_strings_ro_ro'] = $conf['locale_custom_strings_en']; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment