Jump to content
Sign in to follow this  
osik

?! special prices & AWB Quantity Price Breaks Per Produc

Recommended Posts

I found out, that the problem is in includes/classes/shopping_cart.php

 

If I take the old code, it is working properly, but it doesn`t show the correct quantity price.

 

/ 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'];

 

$specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'");

if (tep_db_num_rows ($specials_query)) {

$specials = tep_db_fetch_array($specials_query);

$products_price = $specials['specials_new_products_price'];

}

 

$this->total += tep_add_tax($products_price, $products_tax) * $qty;

$this->weight += ($qty * $products_weight);

}

 

 

 

 

If i insert the new code:

 

// products price

if ($product = $pf->loadProduct($products_id)){

$prid = $product['products_id'];

$products_tax = tep_get_tax_rate($product['products_tax_class_id']);

$products_price = $pf->computePrice($qty);

$products_weight = $product['products_weight'];

 

$this->total += tep_add_tax($products_price, $products_tax) * $qty;

$this->weight += ($qty * $products_weight);

}

 

The sub-total shows 0.00

 

Any ideas?

 

Thanks and best regards

 

Tom

Edited by HIGH-FLYERS

Share this post


Link to post
Share on other sites

The code that you show looks exactly like mine. Did you forget the line above this code:

      $pf = new PriceFormatter;

Just to be certain, here's the entire function:

    function calculate() {
     $this->total = 0;
     $this->weight = 0;
     if (!is_array($this->contents)) return 0;
     $pf = new PriceFormatter;
     reset($this->contents);
     while (list($products_id, ) = each($this->contents)) {
       $qty = $this->contents[$products_id]['qty'];
// products price
       if ($product = $pf->loadProduct($products_id)){
         $prid = $product['products_id'];
         $products_tax = tep_get_tax_rate($product['products_tax_class_id']);
         $products_price = $pf->computePrice($qty);
         $products_weight = $product['products_weight'];
         $this->total += tep_add_tax($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);
           if ($attribute_price['price_prefix'] == '+') {
             $this->total += $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax);
           } else {
             $this->total -= $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax);
           }
         }
       }
     }
   }

If yours looks like that then the error is somewhere else -- probably some part of the code that produces the data that PriceFormatter uses. In that case, I would go through the diff again and check that all of the changes are made. I've had to do this a couple of times -- it's easy to miss something in a change this involved. :(

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi Jim,

 

thanks again for your reply.

 

I checked the .diff, but I found nothing.

 

I have installed the whole testshop, deliverd by the author of this contribution local with my actual sql database, but it won?t work with it. The test products are working, but only as long, as I don?t import other products through easy populate. In phpMyAdmin they have all the same fields, with nearly the same data, nothing left and nothing more.

 

Perhaps it has trouble with other installed contributions, e.g. easy populate, product_sort_order or others.

 

The strange is, that the correct total is somewhere, otherwise the order process hadn?t the right amount! So there must be a solution to show this amount in the shopping cart.

 

Thanks and best regards

 

Tom

Share this post


Link to post
Share on other sites

I am trying to install Price break.

I have completed the first step successfully i.e. Modify the 'products' data table, and the second does not apply.

It is the next step that I am confused about.

I have the file oscommerce-2.2ms2-with-price-break-1.1.diff downloaded.

I just don't understand what the terms "apply code patches to admin and catalog" and "access to the 'patch' command" mean and consequently I don't know what to do next.

 

Some assistance here would be most welcome. I have been unable to find any reference to these terms anywhere.

Share this post


Link to post
Share on other sites

I believe I am underway to completing the install.

I have opened the diff file with editpad and can see what to do now.

Share this post


Link to post
Share on other sites

Fatal error: Cannot instantiate non-existent class: priceformatter in /home/computik/public_html/includes/classes/shopping_cart.php on line 81

 

Line 81 $pf = new PriceFormatter;

 

Priceformatter was not present in classes. i created the file and input the code in it like specified in the contribution. Everythign is installed like specified in teh contribution. What might be causing the fatal error. Thanks for the help

Share this post


Link to post
Share on other sites

Hi Madman00,

 

I have downloaded the testshop with the already installed priceformatter.php and copyed it in my actual shop. I had no problems with it.

 

Are you using MS2 or MS1?

 

Regards

 

 

Tom

Share this post


Link to post
Share on other sites

Hi, the author mailed me a new shopping_cart.php

 

Save it in catalog/ includes/classes/shopping_cart.php

Here is the code:

 

<?php

/*

$Id: shopping_cart.php,v 1.35 2003/06/25 21:14:33 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

class shoppingCart {

var $contents, $total, $weight, $cartID, $content_type;

 

function shoppingCart() {

$this->reset();

}

 

function restore_contents() {

global $customer_id;

 

if (!tep_session_is_registered('customer_id')) return false;

 

// insert current cart contents in database

if (is_array($this->contents)) {

reset($this->contents);

while (list($products_id, ) = each($this->contents)) {

$qty = $this->contents[$products_id]['qty'];

$product_query = tep_db_query("select products_id from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "'");

if (!tep_db_num_rows($product_query)) {

tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id) . "', '" . $qty . "', '" . date('Ymd') . "')");

if (isset($this->contents[$products_id]['attributes'])) {

reset($this->contents[$products_id]['attributes']);

while (list($option, $value) = each($this->contents[$products_id]['attributes'])) {

tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id) . "', '" . (int)$option . "', '" . (int)$value . "')");

}

}

} else {

tep_db_query("update " . TABLE_CUSTOMERS_BASKET . " set customers_basket_quantity = '" . $qty . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "'");

}

}

}

 

// reset per-session cart contents, but not the database contents

$this->reset(false);

 

$products_query = tep_db_query("select products_id, customers_basket_quantity from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "'");

while ($products = tep_db_fetch_array($products_query)) {

$this->contents[$products['products_id']] = array('qty' => $products['customers_basket_quantity']);

// attributes

$attributes_query = tep_db_query("select products_options_id, products_options_value_id from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products['products_id']) . "'");

while ($attributes = tep_db_fetch_array($attributes_query)) {

$this->contents[$products['products_id']]['attributes'][$attributes['products_options_id']] = $attributes['products_options_value_id'];

}

}

 

$this->cleanup();

}

 

function reset($reset_database = false) {

global $customer_id;

 

$this->contents = array();

$this->total = 0;

$this->weight = 0;

$this->content_type = false;

 

if (tep_session_is_registered('customer_id') && ($reset_database == true)) {

tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "'");

tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "'");

}

 

unset($this->cartID);

if (tep_session_is_registered('cartID')) tep_session_unregister('cartID');

}

 

function add_cart($products_id, $qty = '1', $attributes = '', $notify = true) {

global $new_products_id_in_cart, $customer_id;

global $languages_id;

 

$pf = new PriceFormatter;

$pf->loadProduct($products_id, $languages_id);

$qty = $pf->adjustQty($qty);

 

$products_id = tep_get_uprid($products_id, $attributes);

if ($notify == true) {

$new_products_id_in_cart = $products_id;

tep_session_register('new_products_id_in_cart');

}

 

if ($this->in_cart($products_id)) {

$this->update_quantity($products_id, $qty, $attributes);

} else {

$this->contents[] = array($products_id);

$this->contents[$products_id] = array('qty' => $qty);

// insert into database

if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id) . "', '" . $qty . "', '" . date('Ymd') . "')");

 

if (is_array($attributes)) {

reset($attributes);

while (list($option, $value) = each($attributes)) {

$this->contents[$products_id]['attributes'][$option] = $value;

// insert into database

if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id) . "', '" . (int)$option . "', '" . (int)$value . "')");

}

}

}

$this->cleanup();

 

// assign a temporary unique ID to the order contents to prevent hack attempts during the checkout procedure

$this->cartID = $this->generate_cart_id();

}

 

function update_quantity($products_id, $quantity = '', $attributes = '') {

global $customer_id;

 

if (empty($quantity)) return true; // nothing needs to be updated if theres no quantity, so we return true..

 

$this->contents[$products_id] = array('qty' => $quantity);

// update database

if (tep_session_is_registered('customer_id')) tep_db_query("update " . TABLE_CUSTOMERS_BASKET . " set customers_basket_quantity = '" . $quantity . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "'");

 

if (is_array($attributes)) {

reset($attributes);

while (list($option, $value) = each($attributes)) {

$this->contents[$products_id]['attributes'][$option] = $value;

// update database

if (tep_session_is_registered('customer_id')) tep_db_query("update " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " set products_options_value_id = '" . (int)$value . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "' and products_options_id = '" . (int)$option . "'");

}

}

}

 

function cleanup() {

global $customer_id;

 

reset($this->contents);

while (list($key,) = each($this->contents)) {

if ($this->contents[$key]['qty'] < 1) {

unset($this->contents[$key]);

// remove from database

if (tep_session_is_registered('customer_id')) {

tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($key) . "'");

tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($key) . "'");

}

}

}

}

 

function count_contents() { // get total number of items in cart

$total_items = 0;

if (is_array($this->contents)) {

reset($this->contents);

while (list($products_id, ) = each($this->contents)) {

$total_items += $this->get_quantity($products_id);

}

}

 

return $total_items;

}

 

function get_quantity($products_id) {

if (isset($this->contents[$products_id])) {

return $this->contents[$products_id]['qty'];

} else {

return 0;

}

}

 

function in_cart($products_id) {

if (isset($this->contents[$products_id])) {

return true;

} else {

return false;

}

}

 

function remove($products_id) {

global $customer_id;

 

unset($this->contents[$products_id]);

// remove from database

if (tep_session_is_registered('customer_id')) {

tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "'");

tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "'");

}

 

// assign a temporary unique ID to the order contents to prevent hack attempts during the checkout procedure

$this->cartID = $this->generate_cart_id();

}

 

function remove_all() {

$this->reset();

}

 

function get_product_id_list() {

$product_id_list = '';

if (is_array($this->contents)) {

reset($this->contents);

while (list($products_id, ) = each($this->contents)) {

$product_id_list .= ', ' . $products_id;

}

}

 

return substr($product_id_list, 2);

}

 

function calculate() {

global $languages_id;

 

$this->total = 0;

$this->weight = 0;

if (!is_array($this->contents)) return 0;

 

$pf = new PriceFormatter;

 

reset($this->contents);

while (list($products_id, ) = each($this->contents)) {

$qty = $this->contents[$products_id]['qty'];

/*

// 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'];

 

$specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'");

if (tep_db_num_rows ($specials_query)) {

$specials = tep_db_fetch_array($specials_query);

$products_price = $specials['specials_new_products_price'];

}

 

$this->total += tep_add_tax($products_price, $products_tax) * $qty;

$this->weight += ($qty * $products_weight);

} */

 

if ($product = $pf->loadProduct($products_id, $languages_id)){

$prid = $product['products_id'];

$products_tax = tep_get_tax_rate($product['products_tax_class_id']);

//- $products_price = $product['products_price'];

$products_price = $pf->computePrice($qty);

$products_weight = $product['products_weight'];

 

//- $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'");

//- if (tep_db_num_rows ($specials_query)) {

//- $specials = tep_db_fetch_array($specials_query);

//- $products_price = $specials['specials_new_products_price'];

//- }

//-

$this->total += tep_add_tax($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);

if ($attribute_price['price_prefix'] == '+') {

$this->total += $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax);

} else {

$this->total -= $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax);

}

}

}

}

}

 

function attributes_price($products_id) {

$attributes_price = 0;

 

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)$products_id . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'");

$attribute_price = tep_db_fetch_array($attribute_price_query);

if ($attribute_price['price_prefix'] == '+') {

$attributes_price += $attribute_price['options_values_price'];

} else {

$attributes_price -= $attribute_price['options_values_price'];

}

}

}

 

return $attributes_price;

}

 

function get_products() {

global $languages_id;

 

if (!is_array($this->contents)) return false;

$pf = new PriceFormatter;

$products_array = array();

reset($this->contents);

while (list($products_id, ) = each($this->contents)) {

/*

$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'];

 

$specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'");

if (tep_db_num_rows($specials_query)) {

$specials = tep_db_fetch_array($specials_query);

$products_price = $specials['specials_new_products_price'];

}

*/

if ($products = $pf->loadProduct($products_id, $languages_id)) {

$products_price = $pf->computePrice($this->contents[$products_id]['qty']);

 

$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'] : ''));

}

}

 

return $products_array;

}

 

function show_total() {

$this->calculate();

 

return $this->total;

}

 

function show_weight() {

$this->calculate();

 

return $this->weight;

}

 

function generate_cart_id($length = 5) {

return tep_create_random_value($length, 'digits');

}

 

function get_content_type() {

$this->content_type = false;

 

if ( (DOWNLOAD_ENABLED == 'true') && ($this->count_contents() > 0) ) {

reset($this->contents);

while (list($products_id, ) = each($this->contents)) {

if (isset($this->contents[$products_id]['attributes'])) {

reset($this->contents[$products_id]['attributes']);

while (list(, $value) = each($this->contents[$products_id]['attributes'])) {

$virtual_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad where pa.products_id = '" . (int)$products_id . "' and pa.options_values_id = '" . (int)$value . "' and pa.products_attributes_id = pad.products_attributes_id");

$virtual_check = tep_db_fetch_array($virtual_check_query);

 

if ($virtual_check['total'] > 0) {

switch ($this->content_type) {

case 'physical':

$this->content_type = 'mixed';

 

return $this->content_type;

break;

default:

$this->content_type = 'virtual';

break;

}

} else {

switch ($this->content_type) {

case 'virtual':

$this->content_type = 'mixed';

 

return $this->content_type;

break;

default:

$this->content_type = 'physical';

break;

}

}

}

} else {

switch ($this->content_type) {

case 'virtual':

$this->content_type = 'mixed';

 

return $this->content_type;

break;

default:

$this->content_type = 'physical';

break;

}

}

}

} else {

$this->content_type = 'physical';

}

 

return $this->content_type;

}

 

function unserialize($broken) {

for(reset($broken);$kv=each($broken);) {

$key=$kv['key'];

if (gettype($this->$key)!="user function")

$this->$key=$kv['value'];

}

}

 

}

?>

 

 

 

This should help!

Share this post


Link to post
Share on other sites

Hello,

 

I install this contribution.

 

I want to mix specials with quantity break.

 

For example, i want to have a special rate apply for all the levels of quantity.

 

When i try to do this, i lost the quantity break and only the special is active.

 

Who have an idea to solve this problem ?

 

Thanks

Share this post


Link to post
Share on other sites

does anybody know how to install the quantity price breaks contribution in the ADMIN?

 

i have the edit_orders installed and i can make new orders in my admin...

but then my system uses the normal prices.. not the prices of this contribution.

 

also "recover carts" and "who's online" doesn't use the quantity prices.

 

i hope someone has done this before and hopefully he/she can explain it to us on this board.

 

thank you in forward! :D

Share this post


Link to post
Share on other sites

Im currently using 2.2MS2 and i have an problem with Price Breaks, i have installed it and went it through a few times, but when i add something to cart it shows 0.00 in total?

 

Anyone have a clue whats wrong?

 

Thanks in advance for all replies.


//Maz

Share this post


Link to post
Share on other sites

Anyone have an idea on how to base quanity discounts on the total quantity of a product in a cart if it shows up as two items because it's been entered with different attributes?

Share this post


Link to post
Share on other sites
To MikeMike:

 

I 've changed in awb_pb.php those lines:

 

if (tep_not_null($product_info['specials_new_products_price']))

{

  return $product_info['specials_new_products_price'];

}

 

for:

 

if (tep_not_null($product_info['specials_new_products_price']))

{

  $price = $product_info['specials_new_products_price'];

}else{

    $price = $product_info['products_price']; // DEFAULT PRICE

    }

HI

 

products with special price are added to the cart with the special price and not the qty price break price.

 

is the there was a way to fix this in the older version with the awb_pb.php file. But the newer version we are using does not have the awb_pb.php.

 

Does anyone know how to bypass the special pricing

 

thnaks

 

joe


----------------------------

Long Island, New York

Share this post


Link to post
Share on other sites

I have read quite a lot on this contrib and tbh, I have confused myself here, I need this contrib I think so I will run this past the people who are using to see if it will work for me.

I can use attributes but hell this would take an age to setup, so here is my idea.

 

I want to sell tubs of livefood for reptiles each tub has the same base price but I want to give price breaks for 2,3,4,5,6,7 tubs this can be done in attributes but I also need to offer the customer the option to select type of food, I have 9 options here to make, then I have size of food in tubs these choices are another 5 then I need the option to have multiples per selection, quite complicated.

 

ie

1 tub = 3.50

2 tub = 3.25

3 tub = 3.00

4 tub = 2.75

5 tub = 2.50

6 tub = 2.25

7 tub and more = 2.00

 

Customer order:

2xbrown crickets/medium size

3xBlack Crickets/small size

1xlocusts/adult

 

will cost customers 6 tubs @ 2.25 = 13.50

 

Is this contrib able to do this for me.

I hope I explained proper, thx in advance.


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

Has anyone yet figured out how to get qty breaks to calculate properly when the same item is added to an order more than once with different attributes?

 

I have spent over 8 hrs looking over the PriceFormatter.php code and I still can't figure out the logic to get it to read the order's product id's properly. And I know I have the mod installed correctly as all else works great.

 

Thanks in advance for any help. This one has me stumped.

 

Unixace

Share this post


Link to post
Share on other sites
Has anyone yet figured out how to get qty breaks to calculate properly when the same item is added to an order more than once with different attributes?

 

I have spent over 8 hrs looking over the PriceFormatter.php code and I still can't figure out the logic to get it to read the order's product id's properly. And I know I have the mod installed correctly as all else works great.

 

Thanks in advance for any help. This one has me stumped.

 

Unixace

 

 

I know this is an old thread, but did anyone get this problem solved?

 

I would love for it to ignore the attributes and just deal with the product ID, so product A: 3 in red and 4 blue: will get the 7 item price break. Right now it counts it as 2 seperate items.

 

Anyone figured it out?

Share this post


Link to post
Share on other sites
I know this is an old thread, but did anyone get this problem solved?

 

I would love for it to ignore the attributes and just deal with the product ID, so product A: 3 in red and 4 blue: will get the 7 item price break. Right now it counts it as 2 seperate items.

 

Anyone figured it out?

 

I am stuck with the same problem, i will be selling coffee.

 

For example Coffee A is available in

Box of 5 ounce $10

Box of 10 ounce $14

Box of 20 ounce $18

 

I want to display these options in product info page and customer should be able to select the quantity and in Shopping cart each should be treated as seperate product.

 

Any one knows how to handle this. Thanks in advance

Share this post


Link to post
Share on other sites
I know this is an old thread, but did anyone get this problem solved?

 

I would love for it to ignore the attributes and just deal with the product ID, so product A: 3 in red and 4 blue: will get the 7 item price break. Right now it counts it as 2 seperate items.

 

Anyone figured it out?

 

I think this is what you're looking for, hopefully I copied the link right

 

http://forums.oscommerce.com/index.php?sho...ndpost&p=584768

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×