-
Notifications
You must be signed in to change notification settings - Fork 0
/
uc_shipstation.ca.inc
80 lines (71 loc) · 2.12 KB
/
uc_shipstation.ca.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
/**
* @file
* This file contains the Conditional Actions hooks and functions
*/
/**
* Implements hook_ca_trigger().
*/
function uc_shipstation_ca_trigger() {
// order exported trigger
$triggers['uc_shipstation_order_exported'] = array(
'#title' => t('Order has been exported to ShipStation'),
'#category' => t('ShipStation'),
'#arguments' => array(
'order' => array(
'#entity' => 'uc_order',
'#title' => t('Original order'),
),
// 'updated_order' => array(
// '#entity' => 'uc_order',
// '#title' => t('Updated order'),
// ),
),
);
// order ship notified
$triggers['uc_shipstation_order_success'] = array(
'#title' => t('ShipStation reports an order has completed successfully'),
'#category' => t('ShipStation'),
'#arguments' => array(
'order' => array(
'#entity' => 'uc_order',
'#title' => t('Original order'),
),
),
);
return $triggers;
// $events['uc_shipstation_order_exported'] = array(
// 'label' => t('Order has been exported to ShipStation'),
// 'group' => t('Ubercart ShipStation'),
// 'variables' => array(
// 'order' => array(
// 'label' => t('Order', array(), array('context' => 'a Drupal Ubercart order')),
// 'type' => 'uc_order',
// 'skip save' => TRUE,
// ),
// ),
// );
// $events['uc_shipstation_order_success'] = array(
// 'label' => t('ShipStation reports an order has completed successfully'),
// 'group' => t('Ubercart ShipStation'),
// 'variables' => array(
// 'order' => array(
// 'label' => t('Order', array(), array('context' => 'a Drupal Ubercart order')),
// 'type' => 'uc_order',
// 'skip save' => TRUE,
// ),
// 'tracking_number' => array(
// 'type' => 'text',
// 'label' => 'Shipping tracking number',
// ),
// 'carrier' => array(
// 'type' => 'text',
// 'label' => 'Shipping carrier',
// ),
// 'service' => array(
// 'type' => 'text',
// 'label' => 'Shipping service',
// ),
// ),
// );
}