Execute("select * from " . TABLE_PRODUCTS . " limit 1"); if ($chk_products->RecordCount() < 1) { $messageStack->add_session(ERROR_DEFINE_PRODUCTS, 'caution'); zen_redirect(zen_href_link(FILENAME_CATEGORIES)); } require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); $products_filter = (isset($_GET['products_filter']) ? $_GET['products_filter'] : $products_filter); $action = (isset($_GET['action']) ? $_GET['action'] : ''); $current_category_id = (isset($_GET['current_category_id']) ? $_GET['current_category_id'] : $current_category_id); if ($action == 'new_cat') { $current_category_id = (isset($_GET['current_category_id']) ? $_GET['current_category_id'] : $current_category_id); $sql = "SELECT ptc.* FROM " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON ptc.products_id = pd.products_id AND pd.language_id = '" . (int)$_SESSION['languages_id'] . "' LEFT join " . TABLE_PRODUCTS . " p ON p.products_id = pd.products_id LEFT JOIN " . TABLE_PRODUCT_TYPES . " pt ON p.products_type = pt.type_id WHERE ptc.categories_id='" . $current_category_id . "' AND pt.allow_add_to_cart = 'Y' ORDER by pd.products_name"; $new_product_query = $db->Execute($sql); $products_filter = $new_product_query->fields['products_id']; zen_redirect(zen_href_link(FILENAME_PRODUCTS_PRICE_MANAGER, 'products_filter=' . $products_filter . '¤t_category_id=' . $current_category_id)); } // set categories and products if not set if ($products_filter == '' and $current_category_id != '') { $sql = "SELECT ptc.* FROM " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON ptc.products_id = pd.products_id AND pd.language_id = '" . (int)$_SESSION['languages_id'] . "' LEFT join " . TABLE_PRODUCTS . " p ON p.products_id = pd.products_id LEFT JOIN " . TABLE_PRODUCT_TYPES . " pt ON p.products_type = pt.type_id WHERE ptc.categories_id='" . $current_category_id . "' AND pt.allow_add_to_cart = 'Y' ORDER by pd.products_name"; $new_product_query = $db->Execute($sql); $products_filter = $new_product_query->fields['products_id']; if ($products_filter != '') { zen_redirect(zen_href_link(FILENAME_PRODUCTS_PRICE_MANAGER, 'products_filter=' . $products_filter . '¤t_category_id=' . $current_category_id)); } } else { if ($products_filter == '' and $current_category_id == '') { $reset_categories_id = zen_get_category_tree('', '', '0', '', '', true); $current_category_id = $reset_categories_id[0]['id']; $sql = "SELECT ptc.* FROM " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON ptc.products_id = pd.products_id AND pd.language_id = '" . (int)$_SESSION['languages_id'] . "' LEFT join " . TABLE_PRODUCTS . " p ON p.products_id = pd.products_id LEFT JOIN " . TABLE_PRODUCT_TYPES . " pt ON p.products_type = pt.type_id WHERE ptc.categories_id='" . $current_category_id . "' AND pt.allow_add_to_cart = 'Y' ORDER by pd.products_name"; $new_product_query = $db->Execute($sql); $products_filter = $new_product_query->fields['products_id']; $_GET['products_filter'] = $products_filter; } } require(DIR_WS_MODULES . FILENAME_PREV_NEXT); if ($action == 'delete_special') { $delete_special = $db->Execute("delete from " . TABLE_SPECIALS . " where products_id='" . $products_filter . "'"); // reset products_price_sorter for searches etc. zen_update_products_price_sorter($products_filter); zen_redirect(zen_href_link(FILENAME_PRODUCTS_PRICE_MANAGER, 'products_filter=' . $products_filter . '¤t_category_id=' . $current_category_id)); } if ($action == 'delete_featured') { $delete_featured = $db->Execute("delete from " . TABLE_FEATURED . " where products_id='" . $products_filter . "'"); zen_redirect(zen_href_link(FILENAME_PRODUCTS_PRICE_MANAGER, 'products_filter=' . $products_filter . '¤t_category_id=' . $current_category_id)); } if ($action == 'add_discount_qty_id') { $add_id = $db->Execute("select discount_id from " . TABLE_PRODUCTS_DISCOUNT_QUANTITY . " where products_id='" . $products_filter . "' order by discount_id desc limit 1"); $add_cnt = 1; $add_id = $add_id->fields['discount_id']; while ($add_cnt <= DISCOUNT_QTY_ADD) { $db->Execute("insert into " . TABLE_PRODUCTS_DISCOUNT_QUANTITY . " (discount_id, products_id) values ('" . ($add_id + $add_cnt) . "', '" . $products_filter . "')"); $add_cnt++; } zen_redirect(zen_href_link(FILENAME_PRODUCTS_PRICE_MANAGER, 'action=edit' . '&products_filter=' . $products_filter . '¤t_category_id=' . $current_category_id)); } if (zen_not_null($action)) { switch ($action) { case ('update'): if ($_POST['master_category']) { $master_categories_id = $_POST['master_category']; } else { $master_categories_id = $_POST['master_categories_id']; } $products_date_available = ((zen_db_prepare_input($_POST['product_start']) == '') ? 'null' : "'".zen_date_raw($_POST['product_start'])."'"); $specials_date_available = ((zen_db_prepare_input($_POST['special_start']) == '') ? '0001-01-01' : zen_date_raw($_POST['special_start'])); $specials_expires_date = ((zen_db_prepare_input($_POST['special_end']) == '') ? '0001-01-01' : zen_date_raw($_POST['special_end'])); $featured_date_available = ((zen_db_prepare_input($_POST['featured_start']) == '') ? '0001-01-01' : zen_date_raw($_POST['featured_start'])); $featured_expires_date = ((zen_db_prepare_input($_POST['featured_end']) == '') ? '0001-01-01' : zen_date_raw($_POST['featured_end'])); $tmp_value = zen_db_prepare_input($_POST['products_price_sorter']); $products_price_sorter = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value; $db->Execute("update " . TABLE_PRODUCTS . " set products_price='" . zen_db_prepare_input($_POST['products_price']) . "', products_tax_class_id='" . zen_db_prepare_input($_POST['products_tax_class_id']) . "', products_date_available=" . $products_date_available . ", products_last_modified=now(), products_status='" . zen_db_prepare_input($_POST['products_status']) . "', products_quantity_order_min='" . zen_db_prepare_input($_POST['products_quantity_order_min']) . "', products_quantity_order_units='" . zen_db_prepare_input($_POST['products_quantity_order_units']) . "', products_quantity_order_max='" . zen_db_prepare_input($_POST['products_quantity_order_max']) . "', product_is_free='" . zen_db_prepare_input($_POST['product_is_free']) . "', product_is_call='" . zen_db_prepare_input($_POST['product_is_call']) . "', products_quantity_mixed='" . zen_db_prepare_input($_POST['products_quantity_mixed']) . "', products_priced_by_attribute='" . zen_db_prepare_input($_POST['products_priced_by_attribute']) . "', products_discount_type='" . (int)zen_db_prepare_input($_POST['products_discount_type']) . "', products_discount_type_from='" . (int)zen_db_prepare_input($_POST['products_discount_type_from']) . "', products_price_sorter='" . $products_price_sorter . "', master_categories_id='" . zen_db_prepare_input($master_categories_id) . "', products_mixed_discount_quantity='" . (int)zen_db_prepare_input($_POST['products_mixed_discount_quantity']) . "' where products_id='" . $products_filter . "'"); if ($_POST['specials_id'] != '') { $specials_id = zen_db_prepare_input($_POST['specials_id']); if ($_POST['products_priced_by_attribute'] == '1') { $products_price = zen_get_products_base_price($products_filter); } else { $products_price = zen_db_prepare_input($_POST['products_price']); } $specials_price = zen_db_prepare_input($_POST['specials_price']); if (substr($specials_price, -1) == '%') $specials_price = ($products_price - (($specials_price / 100) * $products_price)); $db->Execute("update " . TABLE_SPECIALS . " set specials_new_products_price='" . zen_db_input($specials_price) . "', specials_date_available='" . zen_db_input($specials_date_available) . "', specials_last_modified=now(), expires_date='" . zen_db_input($specials_expires_date) . "', status='" . zen_db_input($_POST['special_status']) . "' where products_id='" . $products_filter . "'"); } if ($_POST['featured_id'] != '') { $db->Execute("update " . TABLE_FEATURED . " set featured_date_available='" . zen_db_input($featured_date_available) . "', expires_date='" . zen_db_input($featured_expires_date) . "', featured_last_modified=now(), status='" . zen_db_input($_POST['featured_status']) . "' where products_id='" . $products_filter . "'"); } $db->Execute("delete from " . TABLE_PRODUCTS_DISCOUNT_QUANTITY . " where products_id='" . $products_filter . "'"); $i=1; $new_id = 0; $discount_cnt = 0; for ($i=1, $n=sizeof($_POST['discount_qty']); $i<=$n; $i++) { if ($_POST['discount_qty'][$i] > 0) { $new_id++; $db->Execute("insert into " . TABLE_PRODUCTS_DISCOUNT_QUANTITY . " (discount_id, products_id, discount_qty, discount_price) values ('" . $new_id . "', '" . $products_filter . "', '" . $_POST['discount_qty'][$i] . "', '" . $_POST['discount_price'][$i] . "')"); $discount_cnt++; } else { loop; } } if ($discount_cnt <= 0) { $db->Execute("update " . TABLE_PRODUCTS . " set products_discount_type='0' where products_id='" . $products_filter . "'"); } // reset products_price_sorter for searches etc. zen_update_products_price_sorter($products_filter); $messageStack->add_session(PRODUCT_UPDATE_SUCCESS, 'success'); zen_redirect(zen_href_link(FILENAME_PRODUCTS_PRICE_MANAGER, 'products_filter=' . $products_filter . '¤t_category_id=' . $current_category_id)); break; case 'set_products_filter': $_GET['products_filter'] = $_POST['products_filter']; zen_redirect(zen_href_link(FILENAME_PRODUCTS_PRICE_MANAGER, 'products_filter=' . $_GET['products_filter'] . '¤t_category_id=' . $_POST['current_category_id'])); break; case 'deleteconfirm': // demo active test if (zen_admin_demo()) { $_GET['action']= ''; $messageStack->add_session(ERROR_ADMIN_DEMO, 'caution'); zen_redirect(zen_href_link(FILENAME_PRODUCTS_PRICE_MANAGER, 'page=' . $_GET['page'])); } $featured_id = zen_db_prepare_input($_GET['fID']); $db->Execute("delete from " . TABLE_FEATURED . " where featured_id = '" . (int)$featured_id . "'"); zen_redirect(zen_href_link(FILENAME_PRODUCTS_PRICE_MANAGER, 'page=' . $_GET['page'])); break; case 'edit': // set edit message $messageStack->add_session(PRODUCT_WARNING_UPDATE, 'caution'); zen_redirect(zen_href_link(FILENAME_PRODUCTS_PRICE_MANAGER, 'action=edit_update' . '&products_filter=' . $_GET['products_filter'] . '¤t_category_id=' . $current_category_id)); break; case 'cancel': // set edit message $messageStack->add_session(PRODUCT_WARNING_UPDATE_CANCEL, 'warning'); zen_redirect(zen_href_link(FILENAME_PRODUCTS_PRICE_MANAGER, 'products_filter=' . $_GET['products_filter'] . '¤t_category_id=' . $current_category_id)); break; } } ?> > <?php echo TITLE; ?>
method="post">get_allow_add_to_cart($products_filter) == 'Y') { ?> Execute("select p.products_id, f.featured_id, f.expires_date, f.featured_date_available, f.status from " . TABLE_PRODUCTS . " p, " . TABLE_FEATURED . " f where p.products_id = f.products_id and f.products_id = '" . $_GET['products_filter'] . "'"); if ($product->RecordCount() > 0) { $fInfo = new objectInfo($product->fields); } // specials information $product = $db->Execute("select p.products_id, s.specials_id, s.specials_new_products_price, s.expires_date, s.specials_date_available, s.status from " . TABLE_PRODUCTS . " p, " . TABLE_SPECIALS . " s where p.products_id = s.products_id and s.products_id = '" . $_GET['products_filter'] . "'"); if ($product->RecordCount() > 0) { $sInfo = new objectInfo($product->fields); } // products information $product = $db->Execute("select p.products_id, p.products_model, p.products_price, p.products_date_available, p.products_tax_class_id, p.products_quantity_order_min, products_quantity_order_units, p.products_quantity_order_max, p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.products_priced_by_attribute, p.products_status, p.products_discount_type, p.products_discount_type_from, p.products_price_sorter, pd.products_name, p.master_categories_id, p.products_mixed_discount_quantity from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $_GET['products_filter'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'"); if ($product->RecordCount() > 0) { $pInfo = new objectInfo($product->fields); } // set statuses if (!isset($pInfo->products_status)) $pInfo->products_status = '1'; switch ($pInfo->products_status) { case '0': $products_in_status = false; $products_out_status = true; break; case '1': default: $products_in_status = true; $products_out_status = false; } if (!isset($fInfo->status)) $fInfo->status = '1'; switch ($fInfo->status) { case '0': $featured_in_status = false; $featured_out_status = true; break; case '1': default: $featured_in_status = true; $featured_out_status = false; } if (!isset($sInfo->status)) $sInfo->status = '1'; switch ($sInfo->status) { case '0': $special_in_status = false; $special_out_status = true; break; case '1': default: $special_in_status = true; $special_out_status = false; } // Product is Priced by Attributes if (!isset($pInfo->products_priced_by_attribute)) $pInfo->products_priced_by_attribute = '0'; switch ($pInfo->products_priced_by_attribute) { case '0': $is_products_priced_by_attribute = false; $not_products_priced_by_attribute = true; break; case '1': $is_products_priced_by_attribute = true; $not_products_priced_by_attribute = false; break; default: $is_products_priced_by_attribute = false; $not_products_priced_by_attribute = true; } // Product is Free if (!isset($pInfo->product_is_free)) $pInfo->product_is_free = '0'; switch ($pInfo->product_is_free) { case '0': $in_product_is_free = false; $out_product_is_free = true; break; case '1': $in_product_is_free = true; $out_product_is_free = false; break; default: $in_product_is_free = false; $out_product_is_free = true; } // Product is Call for price if (!isset($pInfo->product_is_call)) $pInfo->product_is_call = '0'; switch ($pInfo->product_is_call) { case '0': $in_product_is_call = false; $out_product_is_call = true; break; case '1': $in_product_is_call = true; $out_product_is_call = false; break; default: $in_product_is_call = false; $out_product_is_call = true; } // Products can be purchased with mixed attributes retail if (!isset($pInfo->products_quantity_mixed)) $pInfo->products_quantity_mixed = '0'; switch ($pInfo->products_quantity_mixed) { case '0': $in_products_quantity_mixed = false; $out_products_quantity_mixed = true; break; case '1': $in_products_quantity_mixed = true; $out_products_quantity_mixed = false; break; default: $in_products_quantity_mixed = true; $out_products_quantity_mixed = false; } // Products can be purchased with mixed attributes for discount if (!isset($pInfo->products_mixed_discount_quantity)) $pInfo->products_mixed_discount_quantity = '1'; switch ($pInfo->products_mixed_discount_quantity) { case '0': $in_products_mixed_discount_quantity = false; $out_products_mixed_discount_quantity = true; break; case '1': $in_products_mixed_discount_quantity = true; $out_products_mixed_discount_quantity = false; break; default: $in_products_mixed_discount_quantity = true; $out_products_mixed_discount_quantity = false; } // Product is product discount type - None, Percentage, Actual Price, $$ off $discount_type_array = array(array('id' => '0', 'text' => DISCOUNT_TYPE_DROPDOWN_0), array('id' => '1', 'text' => DISCOUNT_TYPE_DROPDOWN_1), array('id' => '2', 'text' => DISCOUNT_TYPE_DROPDOWN_2), array('id' => '3', 'text' => DISCOUNT_TYPE_DROPDOWN_3)); // Product is product discount type from price or special $discount_type_from_array = array(array('id' => '0', 'text' => DISCOUNT_TYPE_FROM_DROPDOWN_0), array('id' => '1', 'text' => DISCOUNT_TYPE_FROM_DROPDOWN_1)); // tax class id $tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE)); $tax_class = $db->Execute("select tax_class_id, tax_class_title from " . TABLE_TAX_CLASS . " order by tax_class_title"); while (!$tax_class->EOF) { $tax_class_array[] = array('id' => $tax_class->fields['tax_class_id'], 'text' => $tax_class->fields['tax_class_title']); $tax_class->MoveNext(); } ?> products_id != '') { ?> products_id != '') { ?> products_id != '') { ?> master_categories_id != zen_get_products_category_id($products_filter)) { $sql = "update " . TABLE_PRODUCTS . " set master_categories_id='" . zen_get_products_category_id($products_filter) . "' where products_id='" . $products_filter . "'"; $db->Execute($sql); $pInfo->master_categories_id = zen_get_products_category_id($products_filter); } ?> products_id != '') { ?> method="post">specials_id); echo zen_draw_hidden_field('featured_id', $fInfo->featured_id); echo zen_draw_hidden_field('discounts_list', $discounts_qty); ?> products_id != '') { ?> products_id != '') { ?> products_id != '') { ?>
' . zen_image_button('button_reset.gif', IMAGE_RESET) . '  '; } echo HEADING_TITLE_SEARCH_DETAIL . ' ' . zen_draw_input_field('search') . zen_hide_session_id(); if (isset($_GET['search']) && zen_not_null($_GET['search'])) { $keywords = zen_db_input(zen_db_prepare_input($_GET['search'])); echo '
' . TEXT_INFO_SEARCH_DETAIL_FILTER . $keywords; } echo ''; ?>
 
' . TEXT_PRICED_BY_ATTRIBUTES . '' . '
' : ''); echo zen_get_products_display_price($_GET['products_filter']) . '

'; echo zen_get_products_quantity_min_units_display($_GET['products_filter'], $include_break = true); $not_for_cart = $db->Execute("select p.products_id from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCT_TYPES . " pt on p.products_type= pt.type_id where pt.allow_add_to_cart = 'N'"); while (!$not_for_cart->EOF) { $not_for_cart_array[] = $not_for_cart->fields['products_id']; $not_for_cart->MoveNext(); } ?>
fields, true, $_GET['products_filter'], true, true); ?>
' . zen_image_button('button_details.gif', IMAGE_DETAILS) . '
' . TEXT_PRODUCT_DETAILS . '' . '   '; echo '
'; echo '' . zen_image_button('button_edit_product.gif', IMAGE_EDIT_PRODUCT) . '
' . TEXT_PRODUCT_EDIT . '
'; echo '
'; echo '' . zen_image_button('button_edit_attribs.gif', IMAGE_EDIT_ATTRIBUTES) . '
' . TEXT_ATTRIBUTE_EDIT . '
' . '   '; } ?>
' . IMAGE_PRODUCTS_TO_CATEGORIES . ''; ?>
products_id . '  ' . $pInfo->products_name; ?>   products_model; ?>
' . TEXT_INFO_PREVIEW_ONLY . '' : ''); ?>
' . zen_image_button('button_edit.gif', IMAGE_EDIT_PRODUCT) . '' . '
' . TEXT_INFO_EDIT_CAUTION; } else { echo zen_image_submit('button_update.gif', IMAGE_UPDATE_PRICE_CHANGES) . '  ' . '' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '' . '
' . TEXT_UPDATE_COMMIT; } ?>
master_categories_id != zen_get_products_category_id($products_filter)) { ?> master_categories_id); ?>
products_tax_class_id); echo zen_image(DIR_WS_IMAGES . 'icon_yellow_on.gif', IMAGE_ICON_LINKED) . '  '; echo zen_draw_pull_down_menu('master_category', zen_get_master_categories_pulldown($products_filter), $pInfo->master_categories_id); ?>
' . TEXT_INFO_PREVIEW_ONLY . '' : TEXT_INFO_UPDATE_REMINDER); ?>
master_categories_id, zen_get_products_category_id($products_filter)); ?>
master_categories_id, zen_get_products_category_id($products_filter)); ?>
products_tax_class_id); ?>
' . zen_draw_input_field('products_price', (isset($pInfo->products_price) ? $pInfo->products_price : '')); ?>
' . zen_draw_radio_field('products_status', '0', $products_out_status) . ' ' . TEXT_PRODUCT_NOT_AVAILABLE; ?>
 
products_quantity_order_min == 0 ? 1 : $pInfo->products_quantity_order_min), 'size="6"'); ?>

products_quantity_order_units == 0 ? 1 : $pInfo->products_quantity_order_units), 'size="6"'); ?>

products_quantity_order_max, 'size="6"'); ?>

 
 
product_is_free == 1 ? '' . TEXT_PRODUCTS_IS_FREE_EDIT . '' : ''); ?>

product_is_call == 1 ? '' . TEXT_PRODUCTS_IS_CALL_EDIT . '' : ''); ?>

products_priced_by_attribute == 1 ? '' . TEXT_PRODUCTS_PRICED_BY_ATTRIBUTES_EDIT . '' : ''); ?>

status == 0) { ?>
' . zen_draw_input_field('specials_price', (isset($sInfo->specials_new_products_price) ? $sInfo->specials_new_products_price : '')); ?>


' . zen_image_button('button_remove.gif', IMAGE_REMOVE_SPECIAL) . ''; ?>
' . TEXT_SPECIAL_DISABLED . ''; ?>


products_model, 0, 4) != 'GIFT') { ?>
specials_id . '&go_back=ON') . '">' . zen_image_button('button_install.gif', IMAGE_INSTALL_SPECIAL) . ''; ?>

status == 0) { ?>



' . zen_image_button('button_remove.gif', IMAGE_REMOVE_FEATURED) . ''; ?>
' . TEXT_FEATURED_DISABLED . ''; ?>

' . zen_image_button('button_install.gif', IMAGE_INSTALL_FEATURED) . ''; ?>

Execute("select * from " . TABLE_PRODUCTS_DISCOUNT_QUANTITY . " where products_id='" . $products_filter . "' order by discount_qty"); $discount_cnt = $discounts_qty->RecordCount(); $make = 1; $i = 0; while (!$discounts_qty->EOF) { $i++; $discount_name[] = array('id' => $i, 'discount_qty' => $discounts_qty->fields['discount_qty'], 'discount_price' => $discounts_qty->fields['discount_price']); $discounts_qty->MoveNext(); } ?> RecordCount() > 0) { ?> products_discount_type) { // none case '0': $discounted_price = 0; break; // percentage discount case '1': if ($pInfo->products_discount_type_from == '0') { $discounted_price = $display_price - ($display_price * ($discount_name[$i]['discount_price']/100)); } else { if (!$display_specials_price) { $discounted_price = $display_price - ($display_price * ($discount_name[$i]['discount_price']/100)); } else { $discounted_price = $display_specials_price - ($display_specials_price * ($discount_name[$i]['discount_price']/100)); } } break; // actual price case '2': if ($pInfo->products_discount_type_from == '0') { $discounted_price = $discount_name[$i]['discount_price']; } else { $discounted_price = $discount_name[$i]['discount_price']; } break; // amount offprice case '3': if ($pInfo->products_discount_type_from == '0') { $discounted_price = $display_price - $discount_name[$i]['discount_price']; } else { if (!$display_specials_price) { $discounted_price = $display_price - $discount_name[$i]['discount_price']; } else { $discounted_price = $display_specials_price - $discount_name[$i]['discount_price']; } } break; } ?> RecordCount() > 0 ?>
  
'; echo '' . zen_image_button('button_blank_discounts.gif', IMAGE_ADD_BLANK_DISCOUNTS) . '' . '
'; echo TEXT_BLANKS_INFO; } else { echo ($action == '' ? '' . TEXT_INFO_PREVIEW_ONLY . '' : ''); } ?>
products_discount_type); ?> products_discount_type_from); ?>
display_price($discounted_price, '', 1) . ' ' . $currencies->display_price($discounted_price, zen_get_tax_rate(1), 1); ?> display_price($discounted_price, '', $discount_name[$i]['discount_qty']) . ' ' . $currencies->display_price($discounted_price, zen_get_tax_rate(1), $discount_name[$i]['discount_qty']); ?> display_price($discounted_price, '', 1); ?> display_price($discounted_price, '', $discount_name[$i]['discount_qty']); ?>
'; echo '' . zen_image_button('button_blank_discounts.gif', IMAGE_ADD_BLANK_DISCOUNTS) . '' . '
'; echo TEXT_BLANKS_INFO; } else { echo ($action == '' ? '' . TEXT_INFO_PREVIEW_ONLY . '' : '') . '
'; echo TEXT_INFO_NO_DISCOUNTS; } ?>
' . TEXT_INFO_PREVIEW_ONLY . '' : ''); ?>
' . zen_image_button('button_edit.gif', IMAGE_EDIT_PRODUCT) . '' . '
' . TEXT_INFO_EDIT_CAUTION; } else { echo zen_image_submit('button_update.gif', IMAGE_UPDATE_PRICE_CHANGES) . '  ' . '' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '' . '
' . TEXT_UPDATE_COMMIT; } ?>