Tax checkbox always selected

How we can make the checkbox always selected for prooduct add on

/ skins / basic / admin / views / products / update.tpl



The code that needs to be modified to change from default uncheck


<br />
<div class="form-field"><br />
	<label for="products_tax_id">{$lang.taxes}:</label><br />
	<div class="select-field"><br />
		<input type="hidden" name="product_data[tax_ids]" value="" /><br />
		{foreach from=$taxes item="tax"}<br />
			<input type="checkbox" name="product_data[tax_ids][{$tax.tax_id}]" id="product_data_{$tax.tax_id}" {if $tax.tax_id|in_array:$product_data.taxes}checked="checked"{/if} class="checkbox" value="{$tax.tax_id}" /><br />
			<label for="product_data_{$tax.tax_id}">{$tax.tax}</label><br />
		{foreachelse}<br />
			–<br />
		{/foreach}<br />
	</div><br />
</div><br />
</fieldset><br />

```<br />
<br />
TIA

This would be great. Something I would use as well.



Adam









basically just removing the {if} statement that determines if it needs to be checked or not and making it always checked.

That’s good to know. I need that. Thank you!

I was wondering that if i have one time enabled the Checkbox and save the article and see then again to the checkbox it is again diabled also not checked, if i now save the article again it have not taxes. Was gives it for a sense?

i am having the same problem as triplex, in that although i select the tax checkbox, each time i go into that product the checkbox remains unselected, and the vat doesn’t show for that product…



what might be causing this please?

[quote name=‘thanetm’]i am having the same problem as triplex, in that although i select the tax checkbox, each time i go into that product the checkbox remains unselected, and the vat doesn’t show for that product…



what might be causing this please?[/QUOTE]



I´ve get this as solution, please try it in demo mode before you test it in live mode!



-----------------------------------------------



Thank you for your time and patience.



In order to fix it you should replace the following part of code:



if (!empty($product) && Registry::get(‘settings.Appearance.show_prices_taxed_clean’) == ‘Y’ && $auth[‘tax_exempt’] != ‘Y’) {





with this one:



if (!empty($product) && Registry::get(‘settings.Appearance.show_prices_taxed_clean’) == ‘Y’ && $auth[‘tax_exempt’] != ‘Y’ && AREA != ‘A’) {





in the “fn.catalog.php” file located in the “core” directory of your CS-Cart installation.



Please check it and let us know the result.



Thank you.





Sincerely yours

Pavel Zyukin,

thank you - that seems to have done the trick!



thank you for your speedy response!! :smiley: