yamaguchitarou / bakesale

Automatically exported from code.google.com/p/bakesale
0 stars 0 forks source link

[IMPORTANT] Subproduct prices are incorrectly set in product page #28

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
PROBLEM:

When a product has an special price and subproducts with different prices,
the dropdown menu to choose a subproduct in the products' page shows
incorrect prices.

I think this is critical, and I have checked that also happens in the demo
(1.1 preAlpha). I have changed the prices so you can see this bug in action
in http://demo.bakesalehq.com/products/show/25

SOLUTION:

In /app/views/products/show.thtml

Find:

echo $price->format($data['Product'], 'flat', $row['price']);

Replace with:

if (isset($data['Special']) && $data['Special']['active'] == 1)
  $finalPrice = $data['Special'];
else
  $finalPrice = $data['Product'];
echo $price->format($finalPrice, 'flat', $row['price']);

Original issue reported on code.google.com by jaime.it...@gmail.com on 19 Mar 2008 at 3:58

GoogleCodeExporter commented 8 years ago
Subproducts now have their own price.

Original comment by putkonen...@gmail.com on 13 Apr 2009 at 9:14