1 | <?php |
||
6 | class GiftVoucherProductPage_ProductOrderItem extends Product_OrderItem |
||
|
|||
7 | { |
||
8 | private static $db = array( |
||
9 | 'ValueSet' => 'Currency', |
||
10 | 'Description' => 'Varchar(40)' |
||
11 | ); |
||
12 | |||
13 | /* standard SS method. |
||
14 | * |
||
15 | * @var array |
||
16 | */ |
||
17 | private static $api_access = array( |
||
18 | 'view' => array( |
||
19 | 'CalculatedTotal', |
||
20 | 'TableTitle', |
||
21 | 'TableSubTitleNOHTML', |
||
22 | 'Name', |
||
23 | 'TableValue', |
||
24 | 'Quantity', |
||
25 | 'BuyableID', |
||
26 | 'BuyableClassName', |
||
27 | 'Version', |
||
28 | 'UnitPrice', |
||
29 | 'Total', |
||
30 | 'Order', |
||
31 | 'InternalItemID', |
||
32 | ), |
||
33 | ); |
||
34 | |||
35 | /** |
||
36 | * Standard SS variable. |
||
37 | * |
||
38 | * @var string |
||
39 | */ |
||
40 | private static $singular_name = 'Order for Gift Item'; |
||
41 | public function i18n_singular_name() |
||
45 | |||
46 | /** |
||
47 | * Standard SS variable. |
||
48 | * |
||
49 | * @var string |
||
50 | */ |
||
51 | private static $plural_name = 'Orders for Gift Item'; |
||
52 | public function i18n_plural_name() |
||
56 | |||
57 | public function onBeforeWrite() |
||
62 | |||
63 | public function getUnitPrice($recalculate = false) |
||
67 | |||
68 | public function getTotal($recalculate = false) |
||
72 | |||
73 | public function getCalculatedTotal() |
||
77 | |||
78 | /** |
||
79 | * @param float $total |
||
80 | * @return this |
||
81 | */ |
||
82 | public function setCustomCalculatedTotal($total) |
||
91 | |||
92 | /** |
||
93 | * @param string $description |
||
94 | * @return this |
||
95 | */ |
||
96 | public function setCustomDescription($description) |
||
105 | |||
106 | public function getTableSubTitle() |
||
115 | } |
||
116 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.