1
|
<?php
|
2
|
|
3
|
/**
|
4
|
* @file
|
5
|
* Provides metadata for the shopping cart order.
|
6
|
*/
|
7
|
|
8
|
/**
|
9
|
* Implements hook_entity_property_info_alter().
|
10
|
*/
|
11
|
function commerce_cart_entity_property_info_alter(&$info) {
|
12
|
// Add the current user's shopping cart to the site information.
|
13
|
$info['site']['properties']['current_cart_order'] = array(
|
14
|
'label' => t("User's shopping cart order"),
|
15
|
'description' => t('The shopping cart order belonging to the current user.'),
|
16
|
'getter callback' => 'commerce_cart_get_properties',
|
17
|
'type' => 'commerce_order',
|
18
|
);
|
19
|
}
|