Guest User

Untitled

a guest
May 24th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. <?php
  2. $product_data = $this->db->get_results("SELECT id, name, price FROM `".$this->db->prefix."product_list` WHERE `id` in (".implode(', ', $ordered_productids).")",ARRAY_A);
  3. foreach($product_data as $data){
  4. $price = $products[$data['id']]->quantity * $data['price'];
  5. $sum += $price;
  6. $sku = $this->db->get_results("SELECT meta_value FROM `".$this->db->prefix."wpsc_productmeta` WHERE productid=".$data['id']." AND meta_key=`sku`",ARRAY_A);
  7. $sum_plus_shipping = $sum + $_SESSION['gottlieber_total_shipping'];
  8. $summary .= $products[$data['id']]->quantity . "\t" . $data['name'] . "\t" . "SKU: " . $sku . "\t" . "\t" . "\t" . "\t" . "\t" . $price . " CHF\n";
  9. }
  10. $this->order = $summary . "\nSubtotal: " . "\t" . "\t" . "\t" . $sum['meta_value'] . " CHF\nShipping: " . "\t" . "\t" . "\t" . $_SESSION['gottlieber_total_shipping'] . " CHF\n" . "Total (including shipping): " . "\t" .$sum_plus_shipping. " CHF";
  11. ?>
Add Comment
Please, Sign In to add comment