function attributes_price($products_id, $session)
{
    $vamPrice = new vamPrice($session['currency'], $session['customers_status']['customers_status_id'], $_SESSION['customer_id'] ? $_SESSION['customer_id'] : "");
    if (isset($session['contents'][$products_id]['attributes'])) {
        reset($session['contents'][$products_id]['attributes']);
        while (list($option, $value) = each($session['contents'][$products_id]['attributes'])) {
            $attribute_price_query = vam_db_query("select pd.products_tax_class_id, p.options_values_price, p.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " p, " . TABLE_PRODUCTS . " pd where p.products_id = '" . $products_id . "' and p.options_id = '" . $option . "' and pd.products_id = p.products_id and p.options_values_id = '" . $value . "'");
            $attribute_price = vam_db_fetch_array($attribute_price_query);
            if ($attribute_price['price_prefix'] == '+') {
                $attributes_price += $vamPrice->Format($attribute_price['options_values_price'], false, $attribute_price['products_tax_class_id']);
            } else {
                $attributes_price -= $vamPrice->Format($attribute_price['options_values_price'], false, $attribute_price['products_tax_class_id']);
            }
        }
    }
    return $attributes_price;
}
   (c) 2004 xt:Commerce (new_attributes_include.php,v 1.11 2003/08/21); xt-commerce.com

   Released under the GNU General Public License 
   --------------------------------------------------------------
   Third Party contributions:
   New Attribute Manager v4b				Autor: Mike G | mp3man@internetwork.net | http://downloads.ephing.com
   Multiple attributes change (all items of category)   Author: DaneSoul | http://danesoul.info

   Released under the GNU General Public License 
   --------------------------------------------------------------*/
defined('_VALID_VAM') or die('Direct Access to this location is not allowed.');
// include needed functions
require_once DIR_FS_INC . 'vam_get_tax_rate.inc.php';
require_once DIR_FS_INC . 'vam_get_tax_class_id.inc.php';
require DIR_FS_CATALOG . DIR_WS_CLASSES . 'vam_price.php';
$vamPrice = new vamPrice(DEFAULT_CURRENCY, $_SESSION['customers_status']['customers_status_id'], $_SESSION['customer_id'] ? $_SESSION['customer_id'] : "");
?>
    <h1 class="contentBoxHeading"><?php 
echo $pageTitle;
?>
</h1>
   
    <table border="0" width="100%" cellspacing="0" cellpadding="2">

    
<form action="<?php 
echo $_SERVER['PHP_SELF'];
?>
" method="post" name="SUBMIT_ATTRIBUTES" enctype="multipart/form-data"><input type="hidden" name="current_product_id" value="<?php 
echo $_POST['current_product_id'];
?>
  http://forums.oscommerce.com/index.php?showtopic=54032
*/
require 'includes/application_top.php';
//b2b
$cus_id = intval($_GET['cID']);
if (!$cus_id) {
    $cus_id = intval($_POST['cID']);
}
//b2b
require_once DIR_FS_CATALOG . DIR_WS_CLASSES . 'vam_price.php';
require DIR_WS_CLASSES . 'order.php';
if (!$_GET['oID']) {
    $_GET['oID'] = $_POST['oID'];
}
$order = new order($_GET['oID']);
$vamPrice = new vamPrice($order->info['currency'], $order->info['status'], $order->customer['ID']);
// include the appropriate functions & classes
include 'order_editor/functions.php';
include 'order_editor/cart.php';
include 'order_editor/order.php';
include DIR_WS_LANGUAGES . $_SESSION['language'] . '/admin/' . FILENAME_ORDERS_EDIT;
// Include currencies class
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
$oID = vam_db_prepare_input((int) $_GET['oID']);
$order = new manualOrder($oID);
// Setup variables
$step = isset($_POST['step']) ? (int) $_POST['step'] : 1;
$add_product_categories_id = isset($_POST['add_product_categories_id']) ? (int) $_POST['add_product_categories_id'] : '';
$add_product_products_id = isset($_POST['add_product_products_id']) ? (int) $_POST['add_product_products_id'] : 0;
// $_GET['action'] switch
Пример #4
0
   http://vamshop.ru
   http://vamshop.com

   Copyright (c) 2007 VaM Shop
   --------------------------------------------------------------
   based on:
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(specials.php,v 1.38 2002/05/16); www.oscommerce.com
   (c) 2003         nextcommerce (specials.php,v 1.9 2003/08/18); www.nextcommerce.org
   (c) 2004	 xt:Commerce (specials.php,v 1.9 2003/08/18); xt-commerce.com

   Released under the GNU General Public License
   --------------------------------------------------------------*/
require 'includes/application_top.php';
require DIR_FS_CATALOG . DIR_WS_CLASSES . 'vam_price.php';
$vamPrice = new vamPrice(DEFAULT_CURRENCY, $_SESSION['customers_status']['customers_status_id'], $_SESSION['customer_id']);
require_once DIR_FS_INC . 'vam_get_tax_rate.inc.php';
switch ($_GET['action']) {
    case 'setflag':
        vam_set_specials_status($_GET['id'], $_GET['flag']);
        vam_redirect(vam_href_link(FILENAME_SPECIALS, '', 'NONSSL'));
        break;
    case 'insert':
        // insert a product on special
        if (PRICE_IS_BRUTTO == 'true' && substr($_POST['specials_price'], -1) != '%') {
            $sql = "select tr.tax_rate from " . TABLE_TAX_RATES . " tr, " . TABLE_PRODUCTS . " p  where tr.tax_class_id = p. products_tax_class_id  and p.products_id = '" . $_POST['products_up_id'] . "' ";
            $tax_query = vam_db_query($sql);
            $tax = vam_db_fetch_array($tax_query);
            $_POST['specials_price'] = $_POST['specials_price'] / ($tax['tax_rate'] + 100) * 100;
        }
        if (substr($_POST['specials_price'], -1) == '%') {
Пример #5
0
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(based on original files from OSCommerce CVS 2.2 2002/08/28 02:14:35); www.oscommerce.com
   (c) 2003         nextcommerce (group_prices.php,v 1.16 2003/08/21); www.nextcommerce.org
   (c) 2004 xt:Commerce (group_prices.php,v 1.16 2003/08/21); xt-commerce.com

   Released under the GNU General Public License
   --------------------------------------------------------------
   based on Third Party contribution:
   Customers Status v3.x  (c) 2002-2003 Copyright Elari elari@free.fr | www.unlockgsm.com/dload-osc/ | CVS : http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/elari/?sortby=date#dirlist

   Released under the GNU General Public License
   --------------------------------------------------------------*/
defined('_VALID_VAM') or die('Direct Access to this location is not allowed.');
require_once DIR_FS_INC . 'vam_get_tax_rate.inc.php';
require DIR_FS_CATALOG . DIR_WS_CLASSES . 'vam_price.php';
$vamPrice = new vamPrice(DEFAULT_CURRENCY, $_SESSION['customers_status']['customers_status_id']);
$i = 0;
$group_query = vam_db_query("SELECT\n                                   customers_status_image,\n                                   customers_status_id,\n                                   customers_status_name\n                               FROM\n                                   " . TABLE_CUSTOMERS_STATUS . "\n                               WHERE\n                                   language_id = '" . $_SESSION['languages_id'] . "' AND customers_status_id != '0'");
while ($group_values = vam_db_fetch_array($group_query)) {
    // load data into array
    $i++;
    $group_data[$i] = array('STATUS_NAME' => $group_values['customers_status_name'], 'STATUS_IMAGE' => $group_values['customers_status_image'], 'STATUS_ID' => $group_values['customers_status_id']);
}
?>
          <tr>
            <td><?php 
echo TEXT_PRODUCTS_PRICE;
?>
</td>
<?php 
// calculate brutto price for display