This file contains hidden or 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
<?php | |
$query = db_query("SELECT MAX(order_id) as order_id, uid FROM commerce_order GROUP BY uid"); | |
foreach ($query as $result) { | |
try { | |
$order_wrapper = entity_metadata_wrapper('commerce_order', $result->order_id); | |
$billing = $order_wrapper->commerce_customer_billing->value(); | |
if (empty($billing->data['commerce_simple_addressbook']['cloned'])) { | |
$billing->data['commerce_simple_addressbook']['cloned'] = TRUE; | |
$order_wrapper->commerce_customer_billing->commerce_simple_addressbook_save->set(TRUE); |
This file contains hidden or 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
<?php | |
$entity_types = array( | |
'commerce_order' => array( | |
'entity_type' => 'commerce_order', | |
'id_field' => 'order_id', | |
), | |
'commerce_line_item' => array( | |
'entity_type' => 'commerce_line_item', | |
'id_field' => 'line_item_id', |
This file contains hidden or 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
/** | |
* Compares the given order's changed date against the database value. | |
* | |
* @param $order object | |
* A fully loaded order object. | |
* | |
* @return bool | |
* Boolean indicating whether or not the order object has changed. | |
*/ | |
function commerce_order_has_changed($order) { |
This file contains hidden or 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
<?php | |
// Loop through an array of urls keyed by old => new and create a redirect. | |
foreach ($urls as $old => $new) { | |
$redirect = new stdClass(); | |
redirect_object_prepare($redirect); | |
$redirect->source = $old; | |
$redirect->redirect = $new; | |
$redirect->language = LANGUAGE_NONE; | |
// Check if the redirect exists before saving. |
This file contains hidden or 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
<?php | |
$databases = array(); | |
$databases['default']['default'] = array( | |
'driver' => 'mysql', | |
'host' => 'mysql', | |
'username' => 'mysql', | |
'password' => 'mysql', | |
'database' => 'data', | |
'prefix' => '', |
This file contains hidden or 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
servername: | |
server_name: servernane.dev | |
www_root: /var/www/servername/www | |
access_log: /var/www/servername/logs/access_log | |
error_log: /var/www/servername/logs/error_log | |
listen_port: '80' | |
index_files: | |
- index.html | |
- index.htm | |
- index.php |
This file contains hidden or 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/commerce_shipment.module b/commerce_shipment.module | |
index 8feda95..c950925 100644 | |
--- a/commerce_shipment.module | |
+++ b/commerce_shipment.module | |
@@ -445,3 +445,50 @@ function commerce_shipment_commerce_multichannel_migration_info() { | |
return $items; | |
} | |
+ | |
+/** |
This file contains hidden or 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/commerce_box.module b/commerce_box.module | |
index 823b130..057c2a1 100644 | |
--- a/commerce_box.module | |
+++ b/commerce_box.module | |
@@ -525,3 +525,371 @@ function commerce_box_get_statuses() { | |
function commerce_box_status_options_list() { | |
return commerce_box_get_statuses(); | |
} | |
+ | |
+/** |
This file contains hidden or 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
#!/bin/bash | |
SITES=$(~/.composer/vendor/bin/platform projects --pipe) | |
for i in $SITES; | |
do | |
~/.composer/vendor/bin/platform environment:backup --project $i --environment master | |
done |