1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
basketarchive.php
См. документацию.
1<?php
8namespace Bitrix\Sale\Internals;
9
10use Bitrix\Main;
11
28class BasketArchiveTable extends Main\Entity\DataManager
29{
35 public static function getTableName()
36 {
37 return 'b_sale_basket_archive';
38 }
39
45 public static function getMap()
46 {
47 return array(
49 'ID',
50 array(
51 'autocomplete' => true,
52 'primary' => true,
53 )
54 ),
55
57 'ARCHIVE_ID',
58 array(
59 'required' => true,
60 )
61 ),
62
64 'PRODUCT_ID',
65 array(
66 'required' => true,
67 )
68 ),
69
70 new Main\Entity\IntegerField('PRODUCT_PRICE_ID'),
71
73 'NAME',
74 array(
75 'size' => 255,
76 'required' => true,
77 )
78 ),
79
80
82 'PRICE',
83 array(
84 'default_value' => '0.0000'
85 )
86 ),
87
88 new Main\Entity\StringField('MODULE'),
89
91 'QUANTITY',
92 array(
93 'default_value' => '0.0000'
94 )
95 ),
96
98 'WEIGHT',
99 array(
100 'default_value' => '0.0000'
101 )
102 ),
103
105 'CURRENCY',
106 array(
107 'required' => true,
108 'size' => 3
109 )
110 ),
111
113 'PRODUCT_XML_ID',
114 array(
115 'size' => 100
116 )
117 ),
118
120 'MEASURE_NAME',
121 array(
122 'size' => 50
123 )
124 ),
125
126 new Main\Entity\IntegerField('TYPE'),
127
128 new Main\Entity\IntegerField('SET_PARENT_ID'),
129
130 new Main\Entity\IntegerField('MEASURE_CODE'),
131
132 new Main\Entity\DatetimeField('DATE_INSERT'),
133
134 new Main\Entity\StringField('BASKET_DATA'),
135
136 new Main\Entity\ReferenceField(
137 'BASKET_PACKED',
138 'Bitrix\Sale\Internals\BasketArchivePacked',
139 array('=this.ID' => 'ref.BASKET_ARCHIVE_ID'),
140 array('join_type' => 'INNER')
141 )
142 );
143 }
144
162 public static function add(array $data)
163 {
164 $basketData = $data['BASKET_DATA'];
165 unset($data['BASKET_DATA']);
166
167 $result = parent::add($data);
168
169 if ($result->isSuccess())
170 {
171 BasketArchivePackedTable::add(array(
172 "BASKET_ARCHIVE_ID" => $result->getId(),
173 "BASKET_DATA" => $basketData
174 ));
175 }
176
177 return $result;
178 }
179
189 public static function delete($primary)
190 {
191 $result = parent::delete($primary);
192
193 if ($result->isSuccess())
194 {
195 $checkOrderData = BasketArchivePackedTable::getById($primary);
196 if ($checkOrderData->fetch())
197 {
198 BasketArchivePackedTable::delete($primary);
199 }
200 }
201
202 return $result;
203 }
204}
static add(array $data)
Определения basketarchive.php:162
$data['IS_AVAILABLE']
Определения .description.php:13
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$result
Определения get_property_values.php:14
Определения ufield.php:9