Fix Tax import

  • Posts: 177
  • Thank you received: 1
9 years 11 months ago #181389

-- HikaShop version -- : latest

Hi All,
i need to create a new tax, but, this one must be fixed for each order. € 1,81 per order.

How can i do this?

Thanks

Andrea

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

  • Posts: 13201
  • Thank you received: 2322
9 years 11 months ago #181421

Hi,

This will require the development of a little plugin and edition of the "checkout / cart" view.
www.hikashop.com/support/support/documen...r-documentation.html

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

  • Posts: 117
  • Thank you received: 3
9 years 9 months ago #190269

This would be a nice feature to add. In Italy we need to add a fixed specific tax on every order in some cases. Some vendors are obliged by law to add this tax.

The following user(s) said Thank You: andreasuriani

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

  • Posts: 177
  • Thank you received: 1
9 years 9 months ago #190275

Yes, it's true.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 9 months ago #190318

What you can do is add that fee as a price in your payment methods and rename the text "payment fee" to the name of your fixed tax.

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

  • Posts: 117
  • Thank you received: 3
9 years 9 months ago #190376

Ok I'll try it. Will you add this feature anyway?

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

  • Posts: 177
  • Thank you received: 1
9 years 9 months ago #190377

And if i have already payment tax in that payment method?

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

  • Posts: 117
  • Thank you received: 3
9 years 9 months ago #190378

andreasuriani wrote: And if i have already payment tax in that payment method?


Yes, that's right. Be carefull anyway andreasuriani to use the fee on payment method if you need to manage invoices 'cause actually HikaShop cannot handle correctly the VAT amount on the fee of payment methods for italian invoices structure. ;)

Last edit: 9 years 9 months ago by crealiagroup.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 9 months ago #190511

Hi,

It's just a trick I'm giving you to be able to do it since there is no support for that for now in HikaShop.
It's not meant to cover all the cases and if you already have payment fees then that solution wouldn't work.

Here is a plugin you can install in order to add a fixed fee to carts on your website:

File Attachment:

File Name: global_cart_fee.zip
File Size:1 KB

I've had some free time this afternoon...

Install it via the joomla extensions manager and the configure it via the "new" button of the System>Plugins menu of HikaShop.
You'll be able to set a name ( the name of the tax ), and a price ( the amount of the tax ) and it will be added automatically to all the carts on your checkout.
It's also a good small plugin to start with if you're a developer and you want to develop a hikashop plugin to add fees on the carts.

Attachments:

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

  • Posts: 17
  • Thank you received: 0
9 years 9 months ago #190516

The plugin works fine. thank you. But I need this tax only for liquids. In the current version fits on any article

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 9 months ago #190542

So what happens in your case when you have products from different categories in the cart ?
What happens when you have several liquids ?
Do you have different fixed taxes for different product categories in your country ? What happens if two products from two different tax category, both with a different fixed tax, are added to the cart ? Are both taxes added to the cart ? Only the higher one ?

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

  • Posts: 117
  • Thank you received: 3
9 years 9 months ago #190568

nicolas wrote: Here is a plugin you can install in order to add a fixed fee to carts on your website:

File Attachment:

File Name: global_cart_fee.zip
File Size:1 KB

I've had some free time this afternoon...

Install it via the joomla extensions manager and the configure it via the "new" button of the System>Plugins menu of HikaShop.
You'll be able to set a name ( the name of the tax ), and a price ( the amount of the tax ) and it will be added automatically to all the carts on your checkout.
It's also a good small plugin to start with if you're a developer and you want to develop a hikashop plugin to add fees on the carts.


Hi Nicolas,

thanks for developing this plugin, we all know that you are really busy. That's what also make HikaShop a good software, good people behind it! :-)

What's the field "Value" intended for? It seems that if I fill it or not, nothing happens.
Also, we are testing it with HikaInvoices and seems work fine except for the fact that the value in the invoice (I used [ORDER:ADDITIONAL.0.ORDER_PRODUCT_PRICE] ) is reported as 1.81000 instead of 1,81€. Maybe we need another key? I'll ask for that to HikaInvoices developer anyway about this; just would ask you first 'cause I'm not sure it's only a problem related to HikaInvoices but also to some HikaShop variable or something else.

Thanks so much!

Last edit: 9 years 9 months ago by crealiagroup.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 9 months ago #190605

@crealiagroup : it's probably that HikaInvoices doesn't take additionals into account properly. It's kind of a hidden feature that is only used by custom plugins so no wonder the developer didn't know about it.

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

  • Posts: 29
  • Thank you received: 9
9 years 9 months ago #191427

HikaInvoices is able to display all the field but effectively, here you need a reformatting.
I will add a "FMT" keyword for this field as well as a repetitive block to be able displaying the additional info inside a loop.

The following user(s) said Thank You: nicolas

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

  • Posts: 117
  • Thank you received: 3
9 years 4 months ago #207060

Hi Nicolas,

I've tryed to install your plugin over a Joomla 3.4.2 with HikaShop 2.5.0 but I cannot see the plugin in the plugins' list of HikaShop. Ican activate it by joomla plugin list but then I cannot configure it 'cause I cannot access to hikashop edit for that plugin.

What's wrong?

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

  • Posts: 117
  • Thank you received: 3
9 years 4 months ago #207063

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

  • Posts: 117
  • Thank you received: 3
9 years 4 months ago #209167

Hi Nicolas,
i have a problem using that plugin.

When i use pay pal payment method, the flat tax is not included in the final amount to pay.

So, if i assign 2 Euro to Global cart fee, it's correctly displayed on invoice and on the total amount of the bill, but when it pass the value to paypal, this value (2 Euro) disappear.

how can i resolve it?

Last edit: 9 years 4 months ago by crealiagroup.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 4 months ago #209178

Hi,

I think that you have the setting in the paypal plugin to send the cart content to paypal.
Please deactivate that setting in order to just send the cart total and the processed taxes (and not let the plugin re-process it).

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: crealiagroup

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

  • Posts: 117
  • Thank you received: 3
9 years 3 months ago #209276

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

  • Posts: 177
  • Thank you received: 1
7 years 6 months ago #270034

Hi Guys,
i'm sorry to re-open this discussion but i have this problem:
Plugin works fine but (as @crealiagroup know) the tax is allowed if the total order is more then € 77.47.
Now, how can i change the plugin code to do something like this?

// exmple

if ($total > 77.47) {
class plgHikashopGlobal_cart_fee extends hikashopPlugin {
	var $multiple = true;
	var $name = 'global_cart_fee';

	var $pluginConfig = array(
		'name' => array('HIKA_NAME', 'input'),
		'price' => array('PRICE', 'input'),
		'value' => array('VALUE', 'input'),
	);

	function onAfterCartProductsLoad(&$cart) {
		$plugins = array();
		$this->listPlugins($this->name, $plugins, false, true);

		if(!count($plugins)){
			return;
		}

		foreach($plugins as $plugin){
			$this->pluginParams($plugin);

			if(isset($cart->additional['global_cart_fee_'.$plugin]))
				continue;

			$additional = new stdClass();
			if(!empty($this->plugin_params->name)){
				$key = strtoupper($this->plugin_params->name);
				if(JText::_($key)!=$key){
					$this->plugin_params->name = JText::_($key);
				}
			}
			$additional->name = $this->plugin_params->name;
			$additional->value = $this->plugin_params->value;
			if(!empty($this->plugin_params->price)){
				$additional->price_currency_id = hikashop_getCurrency();
				$additional->price_value = $this->plugin_params->price;
				$additional->price_value_with_tax = $this->plugin_params->price;
			}else{
				$additional->price_currency_id = 0;
				$additional->price_value = 0;
				$additional->price_value_with_tax = 0;
			}

			$cart->additional['global_cart_fee_'.$plugin] = $additional;
		}
	}
}
} else {


}

Thanks in advance..

Andrea

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

Time to create page: 0.145 seconds
Powered by Kunena Forum