I have also added the Dynamic Price Updater sidebox on teh right hand side, and the pricing here reads correctly.
I have also added the Dynamic Price Updater sidebox on teh right hand side, and the pricing here reads correctly.
Looks like a perceived improvement was unnecessary...
The following should restore the operation:
in includes/classes/dynamic_price_updater.php
line 116, change:
BACK To:Code:$this->responseText['priceTotal'] .= $currencies->display_price($this->shoppingCart->total, zen_get_tax_rate($product_check->fields['products_tax_class_id'])/* 0 */ /* DISPLAY_PRICE_WITH_TAX */);
Deleting the additional tax calculation/determination. Seeing that the shopping cart class already determines the price based on tax included/excluded, there is no need to do a further calculation here.Code:$this->responseText['priceTotal'] .= $currencies->display_price($this->shoppingCart->total, 0/* 0 */ /* DISPLAY_PRICE_WITH_TAX */);
This will be again incorporated back into the upcoming change that I have been preparing to use the ZC zcJS variable (when available), and to provide an improved installer so that issues like previously seen are less likely to occur. :)
Currently what is seen is that on page load a price is displayed, upon change of attribute (triggering the price adjustment), the displayed price becomes adjusted as if the displayed price needed to have the tax rate applied to it (again)... Thank you for your testing, the values and explanation of what was going wrong.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Yayyyy it works
I'm always glad to help on the very odd occasions that I do.
Thank you
I think what happened was that I was going to add more return data so that both the price with and price without tax could be returned as separate values and got sidetracked... Even trying to look at it now, it seems I would have to do a "reverse" calculation for cases where the store is set to display the price with tax and the without tax price was desired, because the function to "add" tax does not accept a negative number and at the point of return of data to the class, the shopping cart has already done all its math with the tax included in the final price and no "intermediate" or untaxed value is returned. I.e. other method is to do like what is done in the sidebox of running all of the numbers in the code. Prefer re-usability over maintaining additional/duplicate code, but... Alternatively the incl VAT/Excl VAT code includes some features for this, so could detect and reuse that code as necessary adding a potential dependency.
*shaking head* okay enough about that, thank you for noting the issue and providing the explanation(s). Once I had a "final" price, original price and an idea of what the VAT percentage was and looking at the code, it became quite obvious what was going on.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Hi is there a way to add a suffix after the price? Because we're displaying the price including & excluding VAT, we need to make sure that the customer knows the price is ex VAT
There is, but seems to me that with the incl/exc VAT program installed that there are quite a few options available, things to set and a few modifications to make such as modifying the information to be displayed at the product info page to have/contain the suffix related to the price being displayed and that is contained in its own span.
Basically, the suffix (like the prefix) information (right or wrong) is located in the includes/classes/dynamic_price_updater.php file within the prepareOutput function. A suffix would logically follow after the assignment/line I suggested changing above.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Ok the updated price once an attribute is selected does not display whether the price is including or ex VAT. As we cater to both trade and customer, this makes a big difference (especially at 20%)
I see where to add the suffix, but (and yes I am a newbie when it comes to javascript) what do I add: I tried document.write() and this didn't work
Please help :)