chrometweaks.org

I wish to make a website with iPage without buying website tonight (website Builder), possible?

Click Here To View All Answers...


Quick question: I wish to make a website with iPage without buying website tonight (website Builder), possible? Thanks for any response. Second question of mine... I've installed both QTPro and Actual Attribute Price for our store, and am having a problem with the main shopping_cart.php..

The total calculates correctly. However, for each product line item, if it has multiple attributes (e.g., size & color), the price for that line item shows as either zero or negative (the color is the second attribute selected, and it has no price)..

Looking at shopping_cart.php, I've put in various code to no avail. My problem seems to be right here (line 157 for me)..

$info_box_contents[$cur_row][] = array('align' => 'right', 'params' => 'class="productListing-data" valign="top"', 'text' => '<b>'$currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity'])'</b>');.

I have no idea where this "display_price($products[$i]['final_price']" comes from in order to edit it properly..

Any ideas?..

Comments (22)

Hmm... I need to find out myself. I don't know what is the answer to your question. I'll do some investigation and get back to you if I find an answer. You should email the people at iPage as they probably could help you..

Comment #1

Are you pricing by size or by product plus size diffential. For example.

Product Shirt - no price.

Attribute size - price.

Attribute color - no price.

Or.

Product shirt - X price.

Attribute size - Add Y price to X price.

Attribute color - no price.

$orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from "TABLE_ORDERS_PRODUCTS" where orders_id = '"(int)$order_id"'");.

While ($orders_products = tep_db_fetch_array($orders_products_query)) {.

$this->products[$index] = array('qty' => $orders_products['products_quantity'],.

'id' => $orders_products['products_id'],.

'name' => $orders_products['products_name'],.

'model' => $orders_products['products_model'],.

'tax' => $orders_products['products_tax'],.

'price' => $orders_products['products_price'],.

'final_price' => $orders_products['final_price']);.

$subindex = 0;.

$attributes_query = tep_db_query("select products_options, products_options_values, options_values_price, price_prefix from "TABLE_ORDERS_PRODUCTS_ATTRIBUTES" where orders_id = '"(int)$order_id"' and orders_products_id = '"(int)$orders_products['orders_products_id']"'");.

If (tep_db_num_rows($attributes_query)) {.

While ($attributes = tep_db_fetch_array($attributes_query)) {.

$this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'],.

'value' => $attributes['products_options_values'],.

'prefix' => $attributes['price_prefix'],.

'price' => $attributes['options_values_price']);.

$subindex++;.

}.

}.

$this->info['tax_groups']["{$this->products[$index]['tax']}"] = '1';.

$index++;.

}.

}.

Found this in catalog/includes/classes/order.php..

Comment #2

I would use Master Products rather than the QTPro/Actual Attribute Price combination. YMMV..

In regards to your problem, if it helps, the 'final_price' is set in the get_products function of the shopping_cart class..

Hth,.

Matt..

Comment #3

Mac-E.

Thanks, I'll go diving in there and see what I find..

Bloodshoteyes.

I'm using the first option, pricing by size. And that code is interesting...I'm just not sure how it applies to what I have. Forgive me for being denseI've had a horrible stomach bug for the last 36 hours, so I'm not thinking too clearly. But the actual order is calculating correctly...when I look at the total in either the info box or the cart page, everything's fine. It's the individual line items that are a problem..

Ecartz.

Thanks for the advice. I checked out Master Products, but it really doesn't fit the type of situation I have. In addition, I don't want each size listed as an individual product...I want the product with the sizes. It's just me being picky...I'm trying to gain every edge on competitors, and they all have the product for each size, which many people complain is very confusing...

Comment #4

Ok...the solution if anyone comes back to this thread in a search....

The update to Actual Attributes Price added 3/3/04 both fixed and broke my code..

I had to comment out this code in the classes/shopping_cart.php in the latest version of the contribution. For me, it was lines 257-262..

If ($price_prefix == '').

{  if ($attribute_price['options_values_price'] == '0').

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

}.

This if statement caused my product price to be doubled for the order total. So if an item for $14 was added to the cart, the item's line showed correctly at $14, but the cart's total was $28..

Other than that, the newest addition to the contribution worked great and fixed my line item problem!..

Comment #5

Master Products displays as.

Master Product w/description.

Size 1 w/ price and quantity selector.

Size 2.

Size 3.

Not as separate products (although it stores as separate products on the back end). It is your option if the slave products will display separately..

If the other solution is working for you, that's great, no need to make changes. However, I think that in general, Master Products is a better fit for your type of needs than the mix of the other two contributions. In fact, it was designed for exactly that kind of issue..

Hth,.

Matt..

Comment #6

Hmmm...you may be right, Matt. I didn't realize Master Products allows you to display only the master on the page... I'm starting to wonder if the QTPro/AAP combo is going to work for me, esp since I'm trying to implement the Quickbooks contribution..

Will Master Products allow me to have two attributes for a product, both color & size?.

Looks like I need to do some more research!..

Comment #7

I've installed both QTPro and Actual Attribute Price for our store, and am having a problem with the main shopping_cart.php..

The total calculates correctly. However, for each product line item, if it has multiple attributes (e.g., size & color), the price for that line item shows as either zero or negative (the color is the second attribute selected, and it has no price)..

Looking at shopping_cart.php, I've put in various code to no avail. My problem seems to be right here (line 157 for me)..

$info_box_contents[$cur_row][] = array('align' => 'right', 'params' => 'class="productListing-data" valign="top"', 'text' => '<b>'$currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity'])'</b>');.

I have no idea where this "display_price($products[$i]['final_price']" comes from in order to edit it properly..

Any ideas?..

Comment #8

That function is in ./include/classes/currencies.php if that helps any..

Eric..

Comment #9


This question was taken from a support group/message board and re-posted here so others can learn from it.