Tax rules listing - erroneous Tax Category

  • Posts: 272
  • Thank you received: 3
  • Hikashop Business
13 years 10 months ago #4367

If a tax rule is set up and the tax category is set to 'None', when the tax rule is viewed on the listings page a product category is shown. However the if the tax rule is edited and the tax category is set the tax category shows correctly. However reset the tax category back to 'None' a product category is shown. (In the database table hikashop taxation the category_namekey field is blank ).

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 10 months ago #4368

I cannot reproduce that on our end. When I create a tax rule without a tax category, nothing is displayed for that tax rule in the tax category column on the tax rules listing.
The only explanation I would see is that you have in the table hikashop_category a category with nothing in the column category_namekey which should not happen normally.

You could try to change the line

$query = ' FROM '.hikashop::table('taxation').' AS a LEFT JOIN '.hikashop::table('tax').' AS b ON a.tax_namekey=b.tax_namekey LEFT JOIN '.hikashop::table('category').' AS c ON a.category_namekey=c.category_namekey LEFT JOIN '.hikashop::table('zone').' AS d ON a.zone_namekey=d.zone_namekey'.$filters.$order;
to
$query = ' FROM '.hikashop::table('taxation').' AS a LEFT JOIN '.hikashop::table('tax').' AS b ON a.tax_namekey=b.tax_namekey LEFT JOIN '.hikashop::table('category').' AS c ON a.category_namekey=c.category_namekey AND a.category_namekey!=\'\' AND c.category_type=\'tax\' LEFT JOIN '.hikashop::table('zone').' AS d ON a.zone_namekey=d.zone_namekey AND a.zone_namekey!=\'\''.$filters.$order;
in the file administrator/components/com_hikashop/views/taxation/view.html.php

Please Log in or Create an account to join the conversation.

  • Posts: 272
  • Thank you received: 3
  • Hikashop Business
13 years 10 months ago #4397

Hi Nicolas,

you are right with your first hypothesis:

The only explanation I would see is that you have in the table hikashop_category a category with nothing in the column category_namekey which should not happen normally.


We had imported some categories from a CSV file and the first line had not been inserted correctly.

Thanks, James

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum