Skip to main content

Standard tax category at adding products by vendor

More
11 years 3 months ago #206657 by Rijs Solutions
-- HikaShop version -- : 2.5.0
-- HikaMarket version -- : 1.6.3
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : Firefox/38.0

When logged in as a vendor at the frontend, you need to select tax category for adding tax to the selling price. Is it possible to set this tax by default on 'default tax category' instead of 'none'. Because 'none' doesn't calculate any tax at all.

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

More
11 years 3 months ago #206661 by Jerome
Hi,

One fast solution will be to create a "product template" in the HikaMarket backend and assign that template for your vendors.
So each time a product will be created, the product template will be used to pre-set the first fields.
And you can set the default category tax you want, which will be automatically selected.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

More
11 years 3 months ago #206672 by Rijs Solutions
This doesn't seem to be the solution either. I cannot select any tax at all in the template the required custom fields are also required. So I need to fill in values, where I meant to let them empty for the vendor.

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

More
11 years 3 months ago #206673 by Jerome
Hi,

You're right, there is an issue in HikaShop 2.5.0 for the new product edition and the product templates.
You have two solutions :
- Add the parameter "&legacy=1" in the URL while editing the product template,
You should be able to set the product tax category in the legacy mode

- Edit the file "administrator/components/com_hikashop/views/product/form.php" and replace
Code:
if((!isset($this->product->product_type) || $this->product->product_type == 'main') && hikashop_acl('product/edit/tax')) {
By
Code:
if((!isset($this->product->product_type) || in_array($this->product->product_type, array('main', 'template'))) && hikashop_acl('product/edit/tax')) {
(I will submit that patch to HikaShop)

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

More
11 years 3 months ago #206713 by Rijs Solutions
Thnx! I am able to select the tax indeed. The custom fields were still required, but changing this into not required and saving the template was a solution for now.

But I do mis the option to automatically asign this new template to all new vendors? Or do I need to asign this template manually to every new user?

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

More
11 years 3 months ago #206716 by Jerome
Hi,

In the HikaMarket configuration, first tab, you have a setting named "default product template".
www.hikashop.com/support/documentation/1...tml#config_main_main

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

More
11 years 3 months ago #206734 by Rijs Solutions
My mistake, I'm sorry!

Thank you for your help!

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

More
9 years 11 months ago - 9 years 11 months ago #254591 by flexsus
It's a bit old this threat, any news on this?
When I add a new product in back-end as a super user, the products is with default tax category.
But when a Vendor in front-end add a new product, he has to change from None to Default Tax Category. All my vendors will have my only one tax category, so is there not any place in settings where you can set this for vendors too?
Or do I need to make a product template for that?

.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building
Last edit: 9 years 11 months ago by flexsus. Reason: typo

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

More
9 years 11 months ago #254648 by Jerome
Hi,

You can add that code in the HikaMarket productmarket view.
Code:
if(empty($product_id) && !isset($product->product_tax_id)) { $mainTaxCategory = 'tax'; $categoryClass = hikamarket::get('shop.class.category'); $categoryClass->getMainElement($mainTaxCategory); $query = 'SELECT category_id FROM '. hikamarket::table('shop.category'). ' WHERE category_type = \'tax\' && category_parent_id = '.(int)$mainTaxCategory.' ORDER BY category_ordering DESC'; $db->setQuery($query); $product->product_tax_id = (int)$db->loadResult(); }
just after the block which handle the $fail variable.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: flexsus

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

More
9 years 11 months ago #254649 by flexsus
Working perfect!
Much better :-)

.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building

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

More
9 years 1 month ago #277468 by flexsus
Hi Jerome

This is a part of 1.7.3 now and I don't need this core edit, correct?
I just use product template where I set default tax.

Regards,
Henrik

.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building

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

More
9 years 1 month ago #277475 by Jerome
Hello,

Yes HikaMarket 1.7.3 contains the previous patch.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

Moderators: Obsidev
Time to create page: 0.377 seconds
Powered by Kunena Forum