• Resolved PozHonks

    (@pozhonks)


    Hello. I am switching from AWD to AGP plugin because today AWD is not compatible with Woocommerce 2.1 and there is no support from the developer. Everything is working except for one thing: sales tax is partially supported.

    In France and in Germany (maybe in other countries), we sell some items (like books, some foods and other things) with a low tax rate, but we must use the standard tax rate for shipping fees.

    Config: WP 3.8.1, WC 2.1, AGP Plugin 1.3.6.
    So, I have a basket with books (low tax rate) and a shipping fee (standard tax rate). The low tax rate is correctly calculated and displayed, but the standard tax rate for shipping is ignored.

    AWD is doing it flawlessly. My tax settings in WC are well defined because it works with AWD and WooCommerce flat rate. In AGP plugin, I have set the standard tax rate for each geographic settings.

    Is there something I have missed or is it a bug ?

    One last thing, during my tests, when I deactivate (not delete) AGP Plugin, I loose all my settings when I activate it again. AWD is keeping them, which saves my time.

    Thank you.

    https://www.ads-software.com/plugins/woocommerce-apg-weight-and-postcodestatecountry-shipping/

Viewing 10 replies - 1 through 10 (of 10 total)
  • same thing over here… pls help!

    I agree with the deactivating part. It loses all the values righnow. And a temporary solution I have copied all values in a text file for reference, you would also like to do this for now. Until this is fixed in an update.

    And what about the tax issue?

    Plugin Author Art Project Group

    (@artprojectgroup)

    The plugin support different types of taxes. Probably you have any mistake on your configuration.

    Please, read this post with Google Translate: ?Cómo se configura WooCommerce – APG Weight and Postcode/State/Country Shipping?.

    Thread Starter PozHonks

    (@pozhonks)

    Sorry, I disagree. It works as expected with AWD and flat rate, but not APG, so it is not a configuration mistake. In fact, I have found the problem, but I don’t like the solution.

    The truth is that APG Plugin tax settings is in conflict with Woocommerce tax settings. APG plugin is ignoring the Woocommerce “Standard Tax Rate” class, which is the by default tax class. Whatever the settings (I tried a lot of combinations), APG will ignore the by default standard tax rate class. So, I have to create a new tax rate class in Woocommerce with “my” standard tax rate, and apply it to goods and shipping. The by default “Standard Rate” class is left over. What a pity!

    It is not a bug, it is a problem on how the APG plugin is written.

    I thank you for giving the URL on how to configure APG plugin, but I notice it is written for Woocommerce 0.9. Since, version 2.0, Woocommerce has dramatically changed the way it calculates taxes.

    Please update your plugin accordingly, so it will work nicely with a modern version of Woocommerce.

    Plugin Author Art Project Group

    (@artprojectgroup)

    This lines get the taxes:

    $impuestos = false;
    			if ($this->tax_status != 'none')
    			{
    				$impuestos = new WC_Tax();
    				$impuestos = $impuestos->calc_shipping_tax($precio, $impuestos->get_rates($this->settings['Tax_' . $grupo]));
    			}

    And it was written for a modern version of WooCommerce, like you can see on Class WC_Tax.

    Please, if you think that you can create a better code, please, send it to us and we’ll be pleasure to add it to our plugin.

    Kind regards.

    Thread Starter PozHonks

    (@pozhonks)

    Yes, I have a better code. When I say that APG Plugin tax settings is in conflict with Woocommerce tax settings, it is true.

    When I decide to remove the tax calculation done by APG (from lines 368 to 373) and let Woocommerce handling it, it finally works. I have also changed the line 379. Now the by default Standard Tax class is handled.

    /* $impuestos = false;
    			if ($this->tax_status != 'none')
    			{
    				$impuestos = new WC_Tax();
    				$impuestos = $impuestos->calc_shipping_tax($precio, $impuestos->get_rates($this->settings['Tax_' . $grupo]));
    			} */
    
    			$tarifa = array(
    				'id'		=> $this->id,
    				'label'		=> $this->title,
    				'cost'		=> $precio,
    				'taxes'		=> '',  /* $impuestos removed */
    				'calc_tax'	=> 'per_order'
    			);

    I understand that your plugin is working for most of the case. I believe that my situation reveals that the way APG is handling taxes is not a good solution. Let Woocommerce handling it.

    Plugin Author Art Project Group

    (@artprojectgroup)

    Good, now the plugin can’t use a different tax per group, just one per shipping.

    Great solutions ??

    Plugin Author Art Project Group

    (@artprojectgroup)

    Change this:
    $impuestos = $impuestos->calc_shipping_tax($precio, $impuestos->get_rates($this->settings['Tax_' . $grupo]));
    With this:
    $impuestos = $impuestos->calc_shipping_tax($precio, $impuestos->get_shipping_tax_rates($this->settings['Tax_' . $grupo]));
    And works fine for you.

    We’ll fix it on version 1.4.

    Thread Starter PozHonks

    (@pozhonks)

    Thank you.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Fail to use two sales tax rates’ is closed to new replies.