Tax (VAT) Not Showing on Certain Product Config...

Version: Pro 3.0.5



Ok - need to display prices Nett of UK VAT and Inclusive. Have this working fine and have increased the font size of the Vat Inclusive display so that more obvious to customers.



Now, this is where I have the issue - I have configured a product (which will form the basis of many of our core products) which has a zero £0.00 price. I have amended template so that zero price displays as: 'Awaiting configuration options…'



I then have numerous options which the customer selects to build the product - it just seems so much easier doing it this way after exhaustive time-wasting on the Configurator add-on.



As soon as the first option is selected the variant price nicely updates the product price via ajax - BUT it doesn't display the VAT Inclusive price! The only way I can get it to do so is if I have an option with a price increase variant as first variant - effectively this means that the product detail page loads with the variant price displayed in main product price along with the VAT inclusive price.



Any thoughts?

Ok, let me elaborate on this as I feel that it may help others who need to achieve similar results!!!



My 'Master' product (of which there will be many similar so need to get this right for the first one!) has a price of '0.00' with a 'Zero Price Action' set of 'Do not allow customers to add the product to cart' (this sets a 'zero price action' property 'R' which is dealt with by the system) and all I have done is amend the 'Language' variable 'contact_us_for_price' to display 'Awaiting product configuration'



Each of these 'Master' products have their own options as check boxes/selects etc. some required, some not - this all works fine. As soon as an option is selected, the price updates from my text 'Awaiting product configuration' via Ajax to reflect the selected option values. As soon as the price is adjusted to reflect the chosen option the 'Add To Cart' button duly appears as required/expected.



BUT - the price is shown as only the nett price without the (£XX.XX inc Tax/VAT) price shown. The ONLY way I can get this to display is to set an arbitrary initial price for the 'Master Product' of, say £10.00 THEN all displays as it should BUT I cannot have this.



To clarify, ALL other products ARE displaying their prices correctly as Ex Tax and (Inc Tax)



I understand that the problem is that when the zero_price_action flag is 'R' the template (skins/blah/customer/common_templates/product_data.tpl does this:



{elseif $product.zero_price_action == "R"}
{$lang.contact_us_for_price}
{/if}




which is where my adapted 'Language' variable 'contact_us_for_price' to display 'Awaiting product configuration' comes in to play.



Because there is no initial display of a nett price and inc tax price - there seems to be no container (div or span) for the 'innerHTML' whatever to be updated by the Ajax response when an option is selected.



My PHP is rusty and more procedural than OOP just yet as I am returning from a long break from development work (10+ years!)



What seems to need to happen is for that last elseif block where
$product.zero_price_action == "R"
for the necessary 'blank' containers to be loaded ready to accept the Ajax updates…



If anyone has any ideas I would be grateful.

try maybe as works when shipping is set to 0, we actually have to set it to 0.001, this dosent show but allows the cart to think there is a calculation. So try a sample product with a price of 0.001







John

Hi John,



Thanks for that suggestion - I had tried with 0.01 and works perfectly (of course as it has a physical price!)



Afraid that 0.001 doesn't work as it is treating it as 0.00 price with same effect as 0.00 physically entered in price.



This is a real bugbear as the product configurator is a no-no for all the reasons reported throughout the forum…



This is my only option for creating the products the way that I require… I have made a number of test edits to the product_data.tpl to no avail as yet. I will get there in the end but trying to save myself some hours/days!!!



Thanks

Andrew

Thinking about this as logically as I can - I am looking at creating an action where the price is 0.01 as this will trigger the price display properly but I am attempting to amend the initial display where this price is set (0.01). We will never have a REAL product at 0.01 so this will be a unique condition…



I will post back if I have any success.



I will welcome further suggestions!

Nope - has to be value great enough to trigger a tax calc i.e. UK Vat at 20% needs a price of 0.03p to trigger inc tax display in the first place…

tough one…Im not sure if I seen an addon that helped this a while back that could be brought up to date.



i will have a root

Thanks John



I am making some progress! (in the spirit of your signature motto…)



I will post details when/if I achieve end result. I have set price to 0.05 and hidden 'Add To Cart' button where price <= 0.05

Fairly certain we're never going to have products 1p - 5p !!!



Now working on price display and hopeful I can get it sorted. Fair bit of head scratching…!

I appear to have cracked it! My only 'bug' that I can find so far is that I need to deduct the base 0.05 from the price - I think I can sort.

[quote name='Wilko' timestamp='1361802812' post='156352']

I appear to have cracked it! My only 'bug' that I can find so far is that I need to deduct the base 0.05 from the price - I think I can sort.

[/quote]



I think a few users would benefit from your findings when you post them



John

Hi John



Hopefully so! As with all such 'mods' there's a payload in so far as fix something - break something… caused a few glitches but ironing them out as I go.



I will post when I am as confident as I can be that it will help without causing major disaster.

Ok - paddled up one tributary - dead end - back to the river and up the next tributary…



Have achieved what I wanted for zero priced product. I am now checking how this impacts any other functions but from the scenario of my OP, I have achieved what I want.



In the end this is what I have done (found at around line 255) in:



[color=#282828][font=arial, verdana, tahoma, sans-serif]skins/blahblah/customer/common_templates/product_data.tpl[/font][/color]



[color=#282828][font=arial, verdana, tahoma, sans-serif]If it breaks anything, don't blame me anyone! This is a 'hack' and have tested it only for my situation and need and there may still be something wrong that I haven't found yet![/font][/color]



[color=#282828][font=arial, verdana, tahoma, sans-serif]My next action will be to create a new 'flag' in the product admin where one selects zero_price_action i.e. Allow Customer to Add Product To Cart etc. I'm not sure yet but something like 'Special Use Of 0.00 Pricing' or similar… to make this cleaner.[/font][/color]


```php

{******************* Clean Price ****************}

{capture name=“clean_price_$obj_id”}

{if $show_price_values && $show_clean_price && $settings.Appearance.show_prices_taxed_clean == “Y”}{
Last && Condition Removed (was && $product.tax_price)
}

















{if $product.price >= 0.00 || ($product.clean_price != $product.taxed_price && $product.included_tax)} {New Starting condition $product.price >= 0.00 || added - next three bracketed (… != … && …)}







{This if block edited/added}

{if $product.price == 0}



{else}

({include file=“common_templates/price.tpl” value=$product.taxed_price span_id=“product_price_$obj_prefix``$obj_id” class=“list-price nowrap”} {$lang.inc_tax})

{/if}

{End of Edit}





{elseif $product.clean_price != $product.taxed_price && !$product.included_tax}

({$lang.including_tax})



{/if}






{/if}
{/capture}
{if $no_capture}
{assign var="capture_name" value="clean_price_`$obj_id`"}
{$smarty.capture.$capture_name}
{/if}
{********************** You Save ******************}

```