diff --git a/api/v2/get/transactions.php b/api/v2/get/transactions.php index 7d286e4..30b0e9b 100644 --- a/api/v2/get/transactions.php +++ b/api/v2/get/transactions.php @@ -18,8 +18,6 @@ list($whereclause,$condition) = getWhereclauselvl2("transactions",$permission,$p $criterias = []; $clause = ''; -var_dump($w) - //Check for $_GET variables and build up clause if(isset($get_content) && $get_content!=''){ //GET VARIABLES FROM URL diff --git a/api/v2/post/translations_details.php b/api/v2/post/translations_details.php index 040d4a2..cf32181 100644 --- a/api/v2/post/translations_details.php +++ b/api/v2/post/translations_details.php @@ -76,6 +76,8 @@ elseif ($command == 'insert' && isAllowed('translation_manage',$profile,$permiss $sql = 'INSERT INTO text_variables_translations ('.$clause_insert.') VALUES ('.$input_insert.')'; $stmt = $pdo->prepare($sql); $stmt->execute($execute_input); + // Return ID + echo json_encode(array('rowID'=> $pdo->lastInsertId())); } elseif ($command == 'delete' && isAllowed('translation_manage',$profile,$permission,'D') === 1){ $stmt = $pdo->prepare('DELETE FROM text_variables_translations WHERE rowID = ? '.$whereclause.''); diff --git a/assets/functions.php b/assets/functions.php index 9e89a40..84dbeab 100644 --- a/assets/functions.php +++ b/assets/functions.php @@ -175,7 +175,12 @@ function filterMenuByProfile($menu, $profileString) { // Add main_menu - if section not in profile but submenu found, use first submenu as main_menu if (!$sectionIncluded && $submenuFound && $firstSubmenuItem !== null) { - $filteredMenu[$sectionKey]['main_menu'] = $firstSubmenuItem; + // Create hybrid main_menu - keep name and icon from original, but use URL and selected from submenu + $hybridMainMenu = $section['main_menu']; + $hybridMainMenu['url'] = $firstSubmenuItem['url']; + $hybridMainMenu['selected'] = $firstSubmenuItem['selected']; + + $filteredMenu[$sectionKey]['main_menu'] = $hybridMainMenu; } else { $filteredMenu[$sectionKey]['main_menu'] = $section['main_menu']; } @@ -223,15 +228,14 @@ function menu($selected,$selected_child){ $menu .= '
=$order['id']?>
-=$order['txn_id']?>
-=$order['shipping_method'] ? htmlspecialchars($order['shipping_method'], ENT_QUOTES) : '--'?>
-=$order['payment_method']?>
-=$order['payment_status']?>
-=date('F j, Y H:ia', strtotime($order['created']))?>
-=htmlspecialchars($order['discount_code'], ENT_QUOTES)?>
-=htmlspecialchars($order['a_first_name'], ENT_QUOTES)?> =htmlspecialchars($order['a_last_name'], ENT_QUOTES)?>
-=htmlspecialchars($order['a_address_street'], ENT_QUOTES)?>
- =htmlspecialchars($order['a_address_city'], ENT_QUOTES)?>
- =htmlspecialchars($order['a_address_state'], ENT_QUOTES)?>
- =htmlspecialchars($order['a_address_zip'], ENT_QUOTES)?>
- =htmlspecialchars($order['a_address_country'], ENT_QUOTES)?>
-
=htmlspecialchars($order['a_address_phone'], ENT_QUOTES)?> -
-The order is not associated with an account.
- -=htmlspecialchars($order['payer_email'], ENT_QUOTES)?>
-=htmlspecialchars($order['first_name'], ENT_QUOTES)?> =htmlspecialchars($order['last_name'], ENT_QUOTES)?>
-=htmlspecialchars($order['address_street'], ENT_QUOTES)?>
- =htmlspecialchars($order['address_city'], ENT_QUOTES)?>
- =htmlspecialchars($order['address_state'], ENT_QUOTES)?>
- =htmlspecialchars($order['address_zip'], ENT_QUOTES)?>
- =htmlspecialchars($order['address_country'], ENT_QUOTES)?>
-
=htmlspecialchars($order['a_address_phone'], ENT_QUOTES)?> -
-| Product | -Options | -Qty | -Price | -Total | -
| There are no order items | -||||
| =$item['productcode']?> =$item['name'] ? htmlspecialchars($item['name'], ENT_QUOTES) : '(Product ' . $item['item_id'] . ')'?> | -=$item['item_options'] ? htmlspecialchars(str_replace(',', ', ', $item['item_options']), ENT_QUOTES) : '--'?> | -=$item['item_quantity']?> | -=currency_code?>=number_format($item['item_price'], 2)?> | -=currency_code?>=number_format($item['item_price']*$item['item_quantity'], 2)?> | -
| - | ||||
| Subtotal | -=currency_code?>=number_format($subtotal, 2)?> | -|||
| Shipping | -=currency_code?>=number_format($order['shipping_amount'], 2)?> | -|||
| Discount | -=currency_code?>=number_format(($order['payment_amount']+$order['shipping_amount'])-($subtotal), 2)?> | -|||
| VAT | -=currency_code?>=number_format($order['tax_amount'], 2)?> | -|||
| Total | -=currency_code?>=number_format($order['payment_amount'], 2)?> | -|||
| Giftcard | -Valid | -Value | -||
| There are no order items | -||||
| =$giftcard['discount_code']?> | -=$current_date >= strtotime($giftcard['start_date']) && $current_date <= strtotime($giftcard['end_date']) ? 'Yes' : 'No'?> | -=currency_code?>=number_format($giftcard['discount_value'], 2)?> | -||
| - | ||||
| - - | -- - | -- - | -