01.
<?php
02.
if
(isset(
$_COOKIE
[
"shopping_cart"
])) {
03.
$total
= 0;
04.
$member_status
=
$_COOKIE
[
'member_status'
];
05.
$cookie_data
=
stripslashes
(
$_COOKIE
[
'shopping_cart'
]);
06.
$cart_data
= json_decode(
$cookie_data
, true);
07.
if
(
is_array
(
$cart_data
) ||
is_object
(
$cart_data
)){
08.
foreach
(
$cart_data
as
$keys
=>
$values
){
09.
$sql13
= "SELECT DISTINCT SPD.unit_price, PM.description FROM sale_pricelist_detail AS SPD WITH (NOLOCK)
10.
INNER JOIN product_master AS PM WITH (NOLOCK) ON PM.item_no = SPD.item_no
11.
WHERE SPD.client =
'001'
AND SPD.order_no =
'".$member_status."'
AND SPD.item_no =
'".$values["item_code"]."'
AND SPD.uom =
'".$values["unit"]."'
";
12.
$query13
= sqlsrv_query(
$conn2
,
$sql13
);
13.
14.
if
(
$data13
= sqlsrv_fetch_array(
$query13
)){
15.
16.
?>