} $contents[] = array('text' => HTML_BR . olc_info_image_c($cInfo->categories_image, $cInfo->categories_name) . HTML_BR . $cInfo->categories_image); $contents[] = array('text' => HTML_BR . TEXT_SUBCATEGORIES . HTML_NBSP . $cInfo->childs_count . HTML_BR . TEXT_PRODUCTS . HTML_NBSP . $cInfo->products_count); } elseif (is_object($pInfo)) { // product info box contents $heading[] = array('text' => HTML_B_START . olc_get_products_name($pInfo->products_id, $_SESSION['languages_id']) . HTML_B_END); $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=new_product') . '">' . olc_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . olc_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=delete_product') . '">' . olc_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . olc_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=move_product') . '">' . olc_image_button('button_move.gif', IMAGE_MOVE) . '</a> <a href="' . olc_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=copy_to') . '">' . olc_image_button('button_copy_to.gif', IMAGE_COPY_TO) . HTML_A_END . olc_draw_form('edit_attributes', FILENAME_NEW_ATTRIBUTES, EMPTY_STRING, 'post') . ' <input type="hidden" name="action" value="edit"><input type="hidden" name="current_product_id" value="' . $pInfo->products_id . '"><input type="hidden" name="cpath" value="' . $cPath . '">' . olc_image_submit('button_edit_attributes.gif', 'edit_attributes') . '</form>'); $contents[] = array('text' => HTML_BR . TEXT_DATE_ADDED . HTML_NBSP . olc_date_short($pInfo->products_date_added)); if (olc_not_null($pInfo->products_last_modified)) { $contents[] = array('text' => TEXT_LAST_MODIFIED . HTML_NBSP . olc_date_short($pInfo->products_last_modified)); } if (date('Y-m-d') < $pInfo->products_date_available) { $contents[] = array('text' => sprintf(TEXT_DATE_AVAILABLE, olc_date_short($pInfo->products_date_available))); } $contents[] = array('text' => HTML_BR . olc_product_info_image($pInfo->products_image, $pInfo->products_name) . HTML_BR . $pInfo->products_image); // START IN-SOLUTION Berechung des Bruttopreises $price = $pInfo->products_price; $price = olc_round($price, PRICE_PRECISION); $price_string = TEXT_PRODUCTS_PRICE_INFO . HTML_NBSP . $currencies->format($price); if (PRICE_IS_BRUTTO == TRUE_STRING_S && ($_GET['read'] == 'only' || $action != 'new_product_preview')) { $price_netto = olc_round($price, PRICE_PRECISION); $tax_query = olc_db_query("select tax_rate from " . TABLE_TAX_RATES . " where tax_class_id = '" . $pInfo->products_tax_class_id . APOS); $tax = olc_db_fetch_array($tax_query); $price = $price * ($tax[tax_rate] + 100) / 100; $price_string = TEXT_PRODUCTS_PRICE_INFO . $currencies->format($price) . ' - ' . TXT_NETTO . $currencies->format($price_netto); } $contents[] = array('text' => HTML_BR . $price_string . HTML_BR . TEXT_PRODUCTS_DISCOUNT_ALLOWED_INFO . HTML_NBSP . $pInfo->products_discount_allowed . HTML_BR . TEXT_PRODUCTS_QUANTITY_INFO . HTML_NBSP . $pInfo->products_quantity); // END IN-SOLUTION // $contents[] = array('text' => HTML_BR . TEXT_PRODUCTS_PRICE_INFO . HTML_NBSP . $currencies->format($pInfo->products_price) . HTML_BR . TEXT_PRODUCTS_QUANTITY_INFO . HTML_NBSP . $pInfo->products_quantity); $contents[] = array('text' => HTML_BR . TEXT_PRODUCTS_AVERAGE_RATING . HTML_NBSP . number_format($pInfo->average_rating, 2) . '%');
$contents = array(); switch ($action) { case 'delete': $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_DELETE_SPECIALS . HTML_B_END); $contents = array('form' => olc_draw_form('specials', FILENAME_SPECIALS, 'page=' . $page . '&sID=' . $sInfo->specials_id . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); $contents[] = array('text' => '<br/><b>' . $sInfo->products_name . HTML_B_END); $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . olc_href_link(FILENAME_SPECIALS, 'page=' . $page . '&sID=' . $sInfo->specials_id) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END); break; default: if (is_object($sInfo)) { $heading[] = array('text' => HTML_B_START . $sInfo->products_name . HTML_B_END); $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_SPECIALS, 'page=' . $page . '&sID=' . $sInfo->specials_id . '&action=edit') . '">' . olc_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . olc_href_link(FILENAME_SPECIALS, 'page=' . $page . '&sID=' . $sInfo->specials_id . '&action=delete') . '">' . olc_image_button('button_delete.gif', IMAGE_DELETE) . HTML_A_END); $contents[] = array('text' => HTML_BR . TEXT_INFO_DATE_ADDED . BLANK . olc_date_short($sInfo->specials_date_added)); $contents[] = array('text' => '' . TEXT_INFO_LAST_MODIFIED . BLANK . olc_date_short($sInfo->specials_last_modified)); $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_product_info_image($sInfo->products_image, $sInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT)); $contents[] = array('text' => HTML_BR . TEXT_INFO_ORIGINAL_PRICE . BLANK . $currencies->format($sInfo->products_price)); $contents[] = array('text' => '' . TEXT_INFO_NEW_PRICE . BLANK . $currencies->format($sInfo->specials_new_products_price)); $contents[] = array('text' => '' . TEXT_INFO_PERCENTAGE . BLANK . number_format(100 - $sInfo->specials_new_products_price / $sInfo->products_price * 100) . '%'); $contents[] = array('text' => HTML_BR . TEXT_INFO_EXPIRES_DATE . ' <b>' . olc_date_short($sInfo->expires_date) . HTML_B_END); $contents[] = array('text' => '' . TEXT_INFO_STATUS_CHANGE . BLANK . olc_date_short($sInfo->date_status_change)); } break; } if (olc_not_null($heading) && olc_not_null($contents)) { echo ' <td width="25%" valign="top">' . NEW_LINE; $box = new box(); echo $box->infoBox($heading, $contents); echo ' </td>' . NEW_LINE; } }