-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.php
More file actions
77 lines (69 loc) · 1.49 KB
/
Copy pathtest.php
File metadata and controls
77 lines (69 loc) · 1.49 KB
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
<pre>
<?php
include 'autoload.php';
$packager = new \WebuddhaInc\BinPacker\Packer();
$packager->addItem(array(
'description' => 'Product A',
'quantity' => 1,
'volume_unit' => 'IN',
'width' => 2,
'height' => 4,
'length' => 2,
'weight_unit' => 'LB',
'weight' => 20
));
$packager->addItem(array(
'description' => 'Product B',
'quantity' => 4,
'volume_unit' => 'IN',
'width' => 2,
'height' => 3,
'length' => 4,
'weight_unit' => 'LB',
'weight' => 5
));
$packager->addItem(array(
'description' => 'Product C',
'quantity' => 3,
'volume_unit' => 'IN',
'width' => 4,
'height' => 1,
'length' => 2,
'weight_unit' => 'LB',
'weight' => 5
));
$packager->addPackageOption(array(
'volume_unit' => 'IN',
'volume' => 1000,
'width' => 10,
'height' => 10,
'length' => 10,
'weight_unit' => 'LB',
'weight' => 40
));
$packager->addPackageOption(array(
'volume_unit' => 'IN',
'volume' => 1500,
'width' => 15,
'height' => 10,
'length' => 10,
'weight_unit' => 'LB',
'weight' => 40
));
$packager->addPackageOption(array(
'volume_unit' => 'CM',
'volume' => 1000,
'width' => 10,
'height' => 10,
'length' => 10,
'weight_unit' => 'OZ',
'weight' => 40
));
print_r(array(
'Packages',
$packager->getPackages()
));
print_r(array(
'Volume Only Packages',
$packager->getVolumePackages()
));