$key = $variant_keys[$index]; $value = trim(str_replace('+', ' ', $variant_values[$index])); $variant_descriptions[] = "{$key}: {$value}"; } $item['variant'] = implode(', ', $variant_descriptions); } } error_log(print_r($order_details, true)); $order_details['padded_id'] = str_pad($order_details['id'], 6, 0, STR_PAD_LEFT); $order_details['order_date'] = date("M j, Y, g:i A", $order_details['creation_date']); $order_details['formatted_gross_price'] = sprintf("%01.2f", $order_details['gross_price']); if ($order_details['gross_price'] - $item_price) { $order_details['formatted_shipping'] = number_format($order_details['gross_price'] - $item_price, 2); } $order_details['formatted_net_price'] = sprintf("%01.2f", $order_details['gross_price'] - $order_details['service_fee']); $order_details['order_connection_details'] = AdminHelper::getConnectionName($order_details['connection_id']) . ' (' . $order_details['connection_type'] . ')'; //if ($order_details['fulfilled']) { $order_details['order_fulfilled'] = 'yes'; } else { $order_details['order_fulfilled'] = 'no'; } $cash_admin->page_data = array_merge($cash_admin->page_data, $order_details); $cash_admin->page_data['order_contents'] = new ArrayIterator($order_contents); $cash_admin->page_data['customer_display_name'] = $order_details['customer_details']['display_name']; $cash_admin->page_data['customer_email_address'] = $order_details['customer_details']['email_address']; $cash_admin->page_data['customer_address_country'] = $order_details['customer_details']['address_country']; $cash_admin->page_data['shipping_name'] = $order_details['customer_shipping_name']; $cash_admin->page_data['shipping_email'] = $order_details['customer_email']; $cash_admin->page_data['shipping_address1'] = $order_details['customer_address1']; $cash_admin->page_data['shipping_address2'] = $order_details['customer_address2']; $cash_admin->page_data['shipping_city'] = $order_details['customer_city']; $cash_admin->page_data['shipping_region'] = $order_details['customer_region']; $cash_admin->page_data['shipping_postalcode'] = $order_details['customer_postalcode']; $cash_admin->page_data['shipping_country'] = $order_details['customer_country']; $cash_admin->page_data['notes'] = $order_details['notes'];
} else { echo str_replace('"', '"', basename($current_asset['title'])); } ?> </h3> <?php if ($page_message) { echo '<p><span class="highlightcopy">' . $page_message . '</span></p>'; } ?> <p class="smalltext fadedtext"> size: <?php echo AdminHelper::bytesToSize($current_asset['size']); ?> , stored on: <?php echo AdminHelper::getConnectionName($current_asset['connection_id']); ?> <br /> location: <?php echo $current_asset['location']; ?> <?php if ($cash_admin->getStoredData('is_favorite')) { echo '<br /><br /><span class="icon heart_fill"></span> this asset is a favorite<br />'; } ?> </p><p> <?php if (!$cash_admin->getStoredData('is_favorite')) { ?> <a href="?togglefavorite=true" class="actionlink"><span class="icon heart_fill"></span> favorite this asset</a>
if (!$browse_path) { // no browse path at all means we're on the main browse page // list connections and categories instead of assets $list_connections = array(); foreach ($applicable_connections as $connection) { $assets_reponse = $cash_admin->requestAndStore(array('cash_request_type' => 'asset', 'cash_action' => 'getassetsforconnection', 'connection_id' => $connection['id']), 'allassets'); if (is_array($assets_reponse['payload'])) { $filecount = count($assets_reponse['payload']); $list_connections[] = array('id' => $connection['id'], 'name' => $connection['name'], 'type' => $connection['type'], 'filecount' => $filecount); } } } else { // this means connection has been set, so grab it from the request $assets_reponse = $cash_admin->requestAndStore(array('cash_request_type' => 'asset', 'cash_action' => 'getassetsforconnection', 'connection_id' => $connection_id), 'allassets'); $connection_name = 'root'; $update_connection_name = AdminHelper::getConnectionName($connection_id); if ($update_connection_name) { $connection_name = $update_connection_name; } if (is_array($assets_reponse['payload'])) { $list_assets = array('assets' => array(), 'directories' => array()); foreach ($assets_reponse['payload'] as $asset) { // grab the dirname for the asset $tmpdir = dirname($asset['location']); if ($tmpdir == $browse_path) { // if it matches the browse path then we're working with a file $list_assets['assets'][basename($asset['location'])] = $asset; } elseif (strpos($tmpdir, $browse_path) !== false || $browse_path == '.') { // not an exact match, but we're at root or under the current directory $exploded_dir = explode('/', $tmpdir); if (!in_array($exploded_dir[$browse_depth], $list_assets['directories'])) {