I broke the Beta
Going from checkout_confirm to checkout_process
Error:
Notice: Undefined variable: product in ...... \library\cart\order.php on line 84
I can't buy my little green motorbike
The customer order email came through though
Going from checkout_confirm to checkout_process
Error:
Notice: Undefined variable: product in ...... \library\cart\order.php on line 84
I can't buy my little green motorbike

The customer order email came through though
Last edited by jty on Sun Oct 19, 2008 10:57 pm, edited 1 time in total.
We're getting there .............
I can now buy my green motor bike but the price is double
I'm not paying double price for my motor bike >:(
Beta 2 - Prices in cart are doubled for options. Product price is fine, only options prices double
eg option price of $100 shows in cart as $200
If product price is $1 and prefix is +, then the price in cart shows up as $201 = 1+ (100 x 2)
Good night
I can now buy my green motor bike but the price is double
I'm not paying double price for my motor bike >:(
Beta 2 - Prices in cart are doubled for options. Product price is fine, only options prices double
eg option price of $100 shows in cart as $200
If product price is $1 and prefix is +, then the price in cart shows up as $201 = 1+ (100 x 2)
Good night
I found it !!!! I was looking in the wrong file >:(
It's in library/cart.php. Duplicate code line 43 - 50
Remove one lot of of this:
It's in library/cart.php. Duplicate code line 43 - 50
Remove one lot of of this:
Code: Select all
foreach ($options as $product_to_option_id) {
$option = $this->database->getRow("select o.name as name, ov.name as `value`, p2o.price, p2o.prefix from product_to_option p2o left join `option` o on p2o.option_id = o.option_id left join option_value ov on p2o.option_value_id = ov.option_value_id where p2o.product_to_option_id = '" . (int)$product_to_option_id . "' and product_id = '" . (int)$product_id . "' and o.language_id = '" . (int)$this->language->getId() . "' and ov.language_id = '" . (int)$this->language->getId() . "'");
if ($option['prefix'] == '+') {
$option_price = $option_price + $option['price'];
} elseif ($option['prefix'] == '-') {
$option_price = $option_price - $option['price'];
}
\Option_Weight_n_Stock_079.1Beta1-RC3\library\cart\order.php
Q, Can you check the order.php line 105 - 108
Is that duplicate code? I think it is.
I was getting 2 rows written to the order_option table for each option
Q, Can you check the order.php line 105 - 108
Code: Select all
/* foreach ($product['option'] as $option) {
$sql = "insert into order_option set order_id = '?', order_product_id = '?', name = '?', `value` = '?', price = '?', prefix = '?'";
$this->database->query($this->database->parse($sql, $order_id, $order_product_id, $option['name'], $option['value'], $product['price'], $option['prefix']));
} */
I was getting 2 rows written to the order_option table for each option
Currently, in cart.php, if check stock is set to yes and
product stock = 0
option stock = 0
(or less than the qty added to cart)
I get 2 pink out of stock warnings in cart page
How do I make it so that I only get "one" warning cos 2 warnings looks silly
I would like it where it does:
If there is no option stock and
There is no product warning
then show the option warning
Otherwise, show the product warning only
or something to that effect.
product stock = 0
option stock = 0
(or less than the qty added to cart)
I get 2 pink out of stock warnings in cart page
How do I make it so that I only get "one" warning cos 2 warnings looks silly
I would like it where it does:
If there is no option stock and
There is no product warning
then show the option warning
Otherwise, show the product warning only
or something to that effect.
LOL! That was a feature! In fact, in v0.8, we are looking to change all error messages to be arrays so that multiple errors could be shown on all pages.jty wrote: Currently, in cart.php, if check stock is set to yes and
product stock = 0
option stock = 0
(or less than the qty added to cart)
I get 2 pink out of stock warnings in cart page
How do I make it so that I only get "one" warning cos 2 warnings looks silly
The more features you add, the harder it gets to please everybody >:(
That's true and the more features, the more complicated and slow the program goes.Qphoria wrote: The more features you add, the harder it gets to please everybody >:(
OK, I will live with 2 pink warnings
If I can't change the software, I will change my attitude. Easy

Well i can tell you how to change it.
in catalog/controller/cart.php
change all instances of:
$error[] to $error
in catalog/template/default/content/cart.tpl
change:
TO:
Tho that will only show you the last found error on the page, not necessarily in the priority you'd like. That is why I originally changed it to show ALL errors, so no matter what the priority, you'd see all that was wrong.
in catalog/controller/cart.php
change all instances of:
$error[] to $error
in catalog/template/default/content/cart.tpl
change:
Code: Select all
<?php foreach ($error as $errmsg) { ?>
<?php if ($errmsg) { ?>
<div class="warning"><?php echo $errmsg; ?></div>
<?php } ?>
<?php } ?>
Code: Select all
<?php if ($error) { ?>
<div class="warning"><?php echo $error; ?></div>
<?php } ?>
Last edited by Qphoria on Fri Dec 05, 2008 1:15 am, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 2 guests