-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsr-rate-display.php
102 lines (89 loc) · 3.48 KB
/
sr-rate-display.php
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php
#20111213 #1581:sougata
#20111214 #1581:sougata
#201201160211 #1631:sougata
if ($rates)
{
foreach ($rates as $rate)
{
if ($showSelect)
$bookingPol = $rate->getElementsByTagName('bookingpolicy')->item(0);
?>
<table style="width:100%;">
<tr>
<td>
<?php
echo $rate->getAttribute('title');
$descrt = $rate->getElementsByTagName('description')->item(0)->nodeValue;
if($descrt)
{
echo "<br><font color=green size=2>Description :".$descrt."</font>";
}
$incls = $rate->getElementsByTagName('inclusion');
if ($incls->item(0))
{
echo '<br>Inclusions: ';
$inclSt = '';
foreach ($incls as $incl)
{
$inclSt.=$incl->getAttribute('title').", ";
}
echo '<span class="small-text">'
. rtrim($inclSt,", ") . '</span>';
}
if (!$showSelect)
{
$addonsprice = 0;
$addonsTax = 0;
$addons = $rate->getElementsByTagName('addon');
if ($addons->item(0))
{
echo '<br>Add-ons: ';
foreach ($addons as $addon)
{
$addonsprice+=$addon->getAttribute('price');
$addonsTax+=$addon->getAttribute('tax');
echo '<span class="small-text">' . $addon->getAttribute('title')
. '</span>, ';
}
}
}
?>
</td>
<td>
<?php
echo displayPrice($rate->getAttribute('price'), $curCode);
if($rate->hasAttribute('tax'))
{
echo "<br/>Tax: ";
echo displayPrice($rate->getAttribute('tax'), $curCode);
}
if (!$showSelect)
{
echo "<br/>Add-Ons: ";
echo displayPrice($addonsprice, $curCode);
echo "<br/>Add-Ons Tax: ";
echo displayPrice($addonsTax, $curCode);
}
if ($showSelect)
{
echo "<br/>";
echo createBookingPolicyStr($bookingPol, $curCode);
}
?>
</td>
<td>
<?php
if ($showSelect)
{
?>
<a class="table-button" href="<?php echo site_url(); ?>/add-to-cart/?itemId=<?php echo $rate->getAttribute('id') ?>">SELECT</a>
<?php
}
?>
</td>
</tr>
</table>
<?php
}
}