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
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
<?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
<?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
/** | |
* 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 | |
$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
<?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
# ------------------------------------------------------------------ | |
# | |
# Copyright (C) 2002-2005 Novell/SUSE | |
# Copyright (C) 2012 Canonical Ltd. | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of version 2 of the GNU General Public | |
# License published by the Free Software Foundation. | |
# | |
# ------------------------------------------------------------------ |
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 | |
$instance = field_info_instance('commerce_discount_offer', 'commerce_percentage', 'percentage'); | |
$instance['description'] = 'Enter the percentage discount as a whole number'; | |
field_update_instance($instance); |