Support » Plugin: Product Configurator for WooCommerce » Product Configurator Prices Wrong

  • Resolved epginformatique

    (@epginformatique)


    So I have the plugin with the Extra-Price addon. The products always add the taxes 2 times on my options, even if my site is setup to have “exluded taxes” from prices.

    I can’t seem to find any solutions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter epginformatique

    (@epginformatique)

    Also, I tried changing from Woocommerce automated taxes to TaxJar, not working.

    Thread Starter epginformatique

    (@epginformatique)

    Finally I got it after deleting all theses codes in the plugin itself :

    function maybe_apply_taxes( amount ) {
    		var compound_rates = [];
    		var normal_rates = [];
    		_.each( tax_info.tax_rates, function( rate ) {
    			if ( 'yes' == rate.compound ) {
    				compound_rates.push( rate );
    			} else {
    				normal_rates.push( rate );
    			}
    		} );
    
    		var tax_amount = 0;
    		_.each( normal_rates, function( rate ) {
    			tax_amount += amount * ( rate.rate / 100 );
    		} );
    
    		var price_including_taxes = amount + tax_amount;
    		_.each( compound_rates, function( rate ) {
    			price_including_taxes += price_including_taxes * ( rate.rate / 100 );
    		} );
    		return price_including_taxes;
    	}
    
    	function get_tax_rates() {
    		var configurator = $('.configure-product[data-product_id]');
    		if ( ! configurator.length ) return []; 
    		wp.ajax.send( 'mkl_pc_get_tax_rates', {
    			data: {
    				product_id: configurator.data( 'product_id' ),
    			},
    			success: function ( data ) {
    				if ( 'taxable' != data.prod_tax_status ) return;
    				should_update_prices = true;
    				tax_info = data;
    				setSubTotal();
    				wp.hooks.doAction( 'PC.fe.extra_price.after.get_tax_rates' );
    			},
    			error: function (data) {
    				console.log(data);
    			}
    			
    		});
    	}
    Plugin Contributor Marc Lacroix

    (@marcusig)

    Hi there,

    I’ll resolve this topic as we can’t provide support for premium products here (it’s forbidden by the forum rules).
    But I’ve responded to your other message.

    Best,
    Marc

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.