я думаю что нужно решить первую проблему путем работы с файлом отвечающий за бокс Корзина (это я пока отложила ибо отсутствие цен более критично)
насчет второго я немного в смятении. В файле www/shopping_cart.php ничего нужного нет.
работаю с www/includes/classes/shopping_cart.php
а тут просто масса всего и что из этого нужно править я в потерях.
первым делом ткнулась в
// products price
$product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
if ($product = tep_db_fetch_array($product_query)) {
$prid = $product['products_id'];
$products_tax = tep_get_tax_rate($product['products_tax_class_id']);
$products_price = $product['products_price'];
$products_weight = $product['products_weight'];
//TotalB2B start
$products_price = tep_xppp_getproductprice($prid);
$customer_discount = tep_get_discount_b2b($prid);
if ($customer_discount >= 0) {
$products_price = $products_price + $products_price * abs($customer_discount) / 100;
} else {
$products_price = $products_price - $products_price * abs($customer_discount) / 100;
}
if ($special_price = tep_get_products_special_price($prid)) $products_price = $special_price;
//TotalB2B end
$this->total += $currencies->calculate_price($products_price, $products_tax, $qty);
$this->weight += ($qty * $products_weight);
}
// attributes price
if (isset($this->contents[$products_id]['attributes'])) {
reset($this->contents[$products_id]['attributes']);
while (list($option, $value) = each($this->contents[$products_id]['attributes'])) {
$attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$prid . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'");
$attribute_price = tep_db_fetch_array($attribute_price_query);
//TotalB2B start
$customer_discount = tep_get_discount_b2b($product['products_id']);
if ($customer_discount >= 0) {
$attribute_price['options_values_price'] = $attribute_price['options_values_price'] + $attribute_price['options_values_price'] * abs($customer_discount) / 100;
} else {
$attribute_price['options_values_price'] = $attribute_price['options_values_price'] - $attribute_price['options_values_price'] * abs($customer_discount) / 100;
}
//TotalB2B end
далее
$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
if ($products = tep_db_fetch_array($products_query)) {
$prid = $products['products_id'];
$products_price = $products['products_price'];
//TotalB2B start
$products_price = tep_xppp_getproductprice($prid);
$customer_discount = tep_get_discount_b2b($prid);
if ($customer_discount >= 0) {
$products_price = $products_price + $products_price * abs($customer_discount) / 100;
} else {
$products_price = $products_price - $products_price * abs($customer_discount) / 100;
}
if ($special_price = tep_get_products_special_price($prid)) $products_price = $special_price;
//TotalB2B end
$products_array[] = array('id' => $products_id,
'name' => $products['products_name'],
'model' => $products['products_model'],
'image' => $products['products_image'],
'price' => $products_price,
'quantity' => $this->contents[$products_id]['qty'],
'weight' => $products['products_weight'],
'final_price' => ($products_price + $this->attributes_price($products_id)),
'tax_class_id' => $products['products_tax_class_id'],
'attributes' => (isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : ''));
Первый код насколько хватает моего понимания отвечает за расчет цены. второй на отображение цены в итоге и корзине.