I realize that you have a problem that you want fixed and while SBA doesn't currently fix the problem, contrary to the original post about the problem, SBA doesn't cause it and truly is unrelated to it. I am able to say this from independently performing the following tests:
It appears that I didn't give good direction on how to setup a product that has all of the same characteristics as the original reported, but is not Stocked by Attributes. So, I did this, but it also means that you should still do this to prove to yourself what I am saying.
Starting with a ZC 1.5.5f system. I went into configuration->my store and set the display price with tax for store and admin to true. I then created a tax rate and associated zoning to be able to apply a 6% tax rate to product. I then created a product that is enabled, priced-by-attributes, has a 0 price, has the tax rate just created, and has a quantity of 100.
I then went through the save process.
I went into the attributes controller for that product and added a single attribute of option name size and option value of small. I set all buttons on the attribute except for display only and required. I added a price to the attribute of 23.5849.
I saved the attribute.
I verified that I had the shipping option of in store enabled and the payment of check/money order enabled. Neither of these adds a price to the overall operation working like a digital product (for shipping).
On the store side, I now went through the purchase process for the product. The product page showed a product price of 24.99, the attribute showed 25.00. Going through checkout, using pickup in store and check/money order, the shopping cart showed 24.99 all the way through to checkout success with tax being 1.41. After checkout, looking at the orders_product for the order, it was shown as 23.5800, the orders table reflected a total price of 24.9948 and the orders_products_attributes shows 23.5849. This is before SBA was even installed. Which means that SBA as I said, does not cause the pricing problem that you are seeing... it is something that exists already in the ZC software.
Further, when I attempted to create a product that didn't have attributes (and therefore wasn't priced-by-attributes and also not controlled by SBA) that had a "final" (gross) price of 25.00, it had a net price of 23.5849. On every page except for the confirmation page the price showed as 25.00. On the confirmation page the price showed as 24.99...
The rounding is occurring in includes/classes/order.php within the function cart() where the final_price is being set at:
Code:
'final_price' => zen_round($products[$i]['price'] + $_SESSION['cart']->attributes_price($products[$i]['id']), $decimals),
and where $decimals is set at the beginning of the function as:
Code:
$decimals = $currencies->get_decimal_places($_SESSION['currency']);
For the Netherlands this results in a 2 decimal quantity being set for the products final price. SBA doesn't modify either of these values. Then after the assignment of final_price to the product, the overall price to collect from the customer is "calculated" which in this case results in the loss of a "penny". Perhaps ZC should behave differently when the price of the product includes the taxes (such that the ORDER_PRODUCTS table is populated with the four decimal value instead of rounding to the current currency).
Anyways, most of the above really should be addressed outside of this forum and I recommend that you continue to seek resolution and perhaps a global solution for all conditions, but outside of the Stock By Attributes forum.
Bookmarks