<?php
$total = 0;
$hash = $_COOKIE['hash'];
$msg = $_GET['msg'];
$ok = $_GET['ok'];
$date = date("Y-m-d");
$query = "SELECT * FROM `modx_cart` WHERE hash = '".$hash."' AND type <> 'P' ORDER BY id ASC";
$output = '<table border="0" width="100%">
';
$result = $modx->db->query( $query );
//id, type, content_id, article_name, article_price, article_description, hash, number, date, extra
while( $row = $modx->db->getRow( $result ) ) {
$output .= '<tr><td>'.$row['article_name'].'</td><td> € '.$row['article_price'].'</td><td><a href="'.$row['id'].'" class="deletefromcart" title="Delete from cart">x</a></td></tr>
';
$total = $total + $row['article_price'];
}
$output .= '
<tr><td colspan="3">................................................................................</td></tr>
<tr><td>Total:</td><td>€ '.number_format($total,2).'</td><td> </td></tr>
</table>
<p> </p>
<p class="buy_now_detail_page"><a href="assets/components/msp/pay.php?price='.(100*$total).'&hash='.$hash.'" class="payment" title="MultiSafepay met iDeal" onClick="window.resizeTo(800,800);"><img src="assets/templates/Milky/[[skin]]/skin/button_buy_now_detail_page.png" alt="MultiSafepay met iDeal" /></a></p>
';
if (($ok)&&($msg)){
$output .= '<p> </p>
<h4>'.$msg.'</h4>
<p>We zullen uw order zo snel als mogelijk verwerken en versturen.</p>
<script>setTimeout("window.close()",6000);</script>';
}
if ((!($ok))&&($msg)){
$output .= '<p> </p>
<h4>'.$msg.'</h4>
';
}
return $output;

no records .... i think becouse of the hash snippets.
, <?php
$total = 0;
$hash = $_COOKIE['hash'];
$msg = $_GET['msg'];
$ok = $_GET['ok'];
$date = date("Y-m-d");
$query = "SELECT * FROM `modx_cart` WHERE hash = '".$hash."' AND type <> 'P' ORDER BY id ASC";
$output .= '<table border="0" width="100%">
';
$result = $modx->query( $query );
while ($row = $result->fetch(id, type, content_id, article_name, article_price, article_description, hash, number, date, extra)){
$output .= '<tr><td>'.$row['article_name'].'</td><td> € '.$row['article_price'].'</td><td><a href="'.$row['id'].'" class="deletefromcart" title="Delete from cart">x</a></td></tr>
';
$total = $total + $row['article_price'];
}
$output .= '
<tr><td colspan="3">................................................................................</td></tr>
<tr><td>Total:</td><td>€ '.number_format($total,2).'</td><td> </td></tr>
</table>
<p> </p>
<p class="buy_now_detail_page"><a href="assets/components/msp/pay.php?price='.(100*$total).'&hash='.$hash.'" class="payment" title="MultiSafepay met iDeal" onClick="window.resizeTo(800,800);"><img src="assets/templates/Milky/[[skin]]/skin/button_buy_now_detail_page.png" alt="MultiSafepay met iDeal" /></a></p>
';
if (($ok)&&($msg)){
$output .= '<p> </p>
<h4>'.$msg.'</h4>
<p>We zullen uw order zo snel als mogelijk verwerken en versturen.</p>
<script>setTimeout("window.close()",6000);</script>';
}
if ((!($ok))&&($msg)){
$output .= '<p> </p>
<h4>'.$msg.'</h4>
';
}
return $output;<?php
$total = 0;
$hash = $_COOKIE['hash'];
$msg = $_GET['msg'];
$ok = $_GET['ok'];
$date = date("Y-m-d");
$query = "SELECT * FROM `modx_cart` WHERE hash = '".$hash."' AND type <> 'P' ORDER BY id ASC";
$output .= '<table border="0" width="100%">
';
$result = $modx->query( $query );
while ($row = $result->fetch(PDO::FETCH_ASSOC)){
$output .= '<tr><td>'.$row['article_name'].'</td><td> € '.$row['article_price'].'</td><td><a href="'.$row['id'].'" class="deletefromcart" title="Delete from cart">x</a></td></tr>
';
$total = $total + $row['article_price'];
}
$output .= '
<tr><td colspan="3">................................................................................</td></tr>
<tr><td>Total:</td><td>€ '.number_format($total,2).'</td><td> </td></tr>
</table>
<p> </p>
<p class="buy_now_detail_page"><a href="assets/components/msp/pay.php?price='.(100*$total).'&hash='.$hash.'" class="payment" title="MultiSafepay met iDeal" onClick="window.resizeTo(800,800);"><img src="assets/templates/Milky/[[skin]]/skin/button_buy_now_detail_page.png" alt="MultiSafepay met iDeal" /></a></p>
';
if (($ok)&&($msg)){
$output .= '<p> </p>
<h4>'.$msg.'</h4>
<p>We zullen uw order zo snel als mogelijk verwerken en versturen.</p>
<script>setTimeout("window.close()",6000);</script>';
}
if ((!($ok))&&($msg)){
$output .= '<p> </p>
<h4>'.$msg.'</h4>
';
}
return $output;$stmt = "INSERT INTO modx_cart VALUES( NULL, '', '".$content_id."', '".$article_name."', '".$article_price."', '".$article_description."', '".$hash."', '".$number."', '".$date."', '0')"; //id, type, content_id, article_name, article_price, article_description, hash, number, date, extra //$result = $modx->db->query( $query );