require_once BASE_PATH . '/assets/includes/affiliate.inc.php'; define('META_TITLE', ''); // Override page title, description, keywords and page encoding here define('META_DESCRIPTION', ''); define('META_KEYWORDS', ''); define('PAGE_ENCODING', ''); require_once BASE_PATH . '/assets/includes/header.inc.php'; require_once BASE_PATH . '/assets/includes/errors.php'; require_once BASE_PATH . '/assets/classes/invoicetools.php'; try { if (!$itemType) { die('No itemType passed!'); } $invoice = new invoiceTools(); if ($downloadOrderID) { $invoice->setOrderID($downloadOrderID); // Set the order ID if ($orderInfo = $invoice->getOrderDetails()) { //print_r($orderInfo); exit; $smarty->assign('downloadOrderID', $downloadOrderID); } } $invoiceOptions = $invoice->getOnlyItemOptions($itemType, $itemID); // Get the options as a temp array $invoiceItem = $invoiceOptions[$itemID]; // Put those options into the invoice items array $invoiceItem['item_type'] = $itemType; $smarty->assign('invoiceItemID', $itemID); $smarty->assign('invoiceItem', $invoiceItem); $smarty->display('item.options.tpl'); } catch (Exception $e) {
$invoiceItems[$order['order_id']]['price_total'] = $billTotal->currency_display($order['total'], 1); } else { $priceTotal = getCorrectedPrice($order['total'], $parms); // Unpaid invoice can show in the members currency $invoiceItems[$order['order_id']]['price_total'] = $priceTotal['display']; } } } else { $invoiceItemsCount = $invoiceObj->queryInvoiceItems(); // Number of invoice items total $invoiceItems = $invoiceObj->getInvoiceItemsRaw(); } } } if ($orderID) { $invoiceObj->setOrderID($orderID); // Set the order ID if ($orderInfo = $invoiceObj->getOrderDetails()) { $invoice = $invoiceObj->getInvoiceDetailsViaOrderDBID($orderInfo['order_id']); $invoiceObj->includeGalleries = true; // Include galleries in the result $invoiceItemsCount = $invoiceObj->queryInvoiceItems(); // Number of invoice items total $invoiceItems = $invoiceObj->getAllInvoiceItems(); /* foreach($invoiceItems as $invoiceItemKey => $invoiceItem) { $invoiceItems[$invoiceItemKey]['itemDetails']['galleries'] = 'test'; } */ } else {
define('META_TITLE', ''); // Override page title, description, keywords and page encoding here define('META_DESCRIPTION', ''); define('META_KEYWORDS', ''); define('PAGE_ENCODING', ''); require_once BASE_PATH . '/assets/includes/header.inc.php'; require_once BASE_PATH . '/assets/includes/errors.php'; require_once BASE_PATH . '/assets/classes/invoicetools.php'; require_once BASE_PATH . '/assets/classes/mediatools.php'; if (!$_GET['orderID']) { // Make sure an order ID is passed and if not die die("No order ID was passed"); } try { $invoice = new invoiceTools(); $invoice->setOrderID($orderID); // Set the order ID $invoiceTotals = new number_formatting(); // Used to make sure the bills are showing in the admins currency $invoiceTotals->set_custom_cur_defaults($config['settings']['defaultcur']); $parms['noDefault'] = true; $adminCurrency = getCurrencyInfo($config['settings']['defaultcur']); if ($orderInfo = $invoice->getOrderDetails()) { $invoiceInfo = $invoice->getInvoiceDetailsViaOrderDBID($orderInfo['order_id']); $invoiceItemsCount = $invoice->queryInvoiceItems(); // Number of invoice items total //print_r($invoiceInfo); exit; $invoice->options = false; // Do not select options here $digitalInvoiceItems = $invoice->getDigitalItems(); $physicalInvoiceItems = $invoice->getPhysicalItems();
$queryStr = k_decrypt($dlKey); parse_str($queryStr, $downloadKey); // Parse the query string //$downloadKey['collectionID']; //$downloadKey['uorderID']; if ($config['EncryptIDs']) { $downloadKey['collectionID'] = k_decrypt($downloadKey['collectionID']); // Collection ID $downloadKey['uorderID'] = k_decrypt($downloadKey['uorderID']); // Order ID $downloadKey['invoiceItemID'] = k_decrypt($downloadKey['invoiceItemID']); // Invoice Item ID } //print_r($downloadKey); exit; $invoice = new invoiceTools(); $invoice->setOrderID($downloadKey['uorderID']); // Set the order ID $invoiceItem = $invoice->getSingleInvoiceItem($downloadKey['invoiceItemID']); //echo $downloadKey['invoiceItemID']; exit; if ($orderInfo = $invoice->getOrderDetails()) { $collectionResult = mysqli_query($db, "\t\t\t\r\n\t\t\t\tSELECT SQL_CALC_FOUND_ROWS *\r\n\t\t\t\tFROM {$dbinfo[pre]}collections \r\n\t\t\t\tWHERE coll_id = '{$downloadKey[collectionID]}'\r\n\t\t\t"); if ($returnRows = getRows()) { $collection = mysqli_fetch_array($collectionResult); $collectionArray = collectionsList($collection); $smarty->assign('collectionRows', $returnRows); $smarty->assign('collection', $collectionArray); if ($collection['colltype'] == 1) { $collectionGalleriesResult = mysqli_query($db, "SELECT gallery_id FROM {$dbinfo[pre]}item_galleries WHERE mgrarea = 'collections' AND item_id = '{$downloadKey[collectionID]}'"); while ($collectionGallery = mysqli_fetch_array($collectionGalleriesResult)) { $collectionGalleriesArray[] = $collectionGallery['gallery_id']; }