sessioncheck(); if(isset($_SESSION['token'])) { $token = $_SESSION['token']; } else { $token = $cryptography->getToken(); $_SESSION['token'] = $token; } $host_path = $shop->getbase(true); /* Get the currency of site.json * To change the default currency, edit site.json which has a numeric value that corresponds to the values inside currencies.json. * DO NOT edit currencies.json, unless adding a new currency, as this file is used throughout OpenShop and might break functionality. */ $sitecurrency = $shop->getsitecurrency('../server/config/site.conf.json','../server/config/currencies.conf.json'); ?> getmeta(); ?>

Shopping Cart

= 1) { $c = count($_SESSION['cart']); if(($c > 0) && ($c < 9999) ) { ?>

  • Product Name
  • Description
  • Variants
  • Price
  • Qty
  • Total
  • getproductlist('../inventory/shop.json'); // var_dump($products); $fixedpriceshipping = 0; $productsum_total = 0; for($i=0; $i < $c; $i++) { if($_SESSION['cart'][$i]) { $product = (int) $_SESSION['cart'][$i]['product.id']; if($_SESSION['cart'][$i]['product.qty'] == 0) { $_SESSION['cart'][$i]['product.qty'] = 1; } $productqty = $_SESSION['cart'][$i]['product.qty']; } $j = 0; if(isset($products)) { foreach($products as $key => $value) { if(isset($products[$j]) && $products[$j][0][1] == $product ) { for($k=0;$k=0) { if($value[$k][0] == 'variant.price1') { if(stristr($value[$k][1],',')) { $values = explode(',',$value[$k][1]); $productprice = trim($values[$key]); } } } if($value[$k][0] == 'product.description') { $productdesc = $sanitizer->sanitize($value[$k][1],'encode'); } if($value[$k][0] == 'product.title') { $producttitle = $sanitizer->sanitize($value[$k][1],'encode'); } } if($productprice == null || $productprice == 0 ) { $productprice = 1; } if($productqty == null || $productqty == 0 ) { $productqty = 1; } if($productshipping != null || $productshipping != 0 ) { $fixedpriceshipping += ($productshipping * (int)$productqty); } $productsum = round(($productprice * (int)$productqty),2); $productsum_total = ($productsum_total + $productsum); $qtyid = 'tscart-'.$j.$product; ?>
  • '; if($vc >=1) { for($j=0;$j<$vc;$j++) { echo $variants[$j]; if($j < ($vc-1)) { echo ', '; } } } else { echo 'n/a'; } echo ''; } ?>
  • json->load_json("../server/config/shipping.conf.json"); $siteconf2 = $shop->json->load_json("../server/config/site.conf.json"); $carbonoffsetting = $shop->getasetting($siteconf2,'site.carbonoffset'); if($carbonoffsetting == '1') { $coprices = $carbonoffsetting; if(stristr($coprices,',')) { $coboxdisplay = '
    '; $coboxdisplay .= 'Carbon offset option: '; $coboxdisplay .= '
    '; $cobox = true; } else { $cobox = false; } } ?>

    Checkout


    e-mailaddress:




    '; } ?>
    Cart is empty.
    "; } ?>