Author - Kristof Ringleff

Hi I'm Kristof the founder of Fooman. I will share some of my experiences gained from developing Magento extensions since version 1.0 here on MageBase.

You can see a list of all my open source and commercial extensions on Magento Connect.

More Info »

Reader Comments (7)

  1. Citrus Orange
    December 21, 2010 at 4:54 am /

    Good Article Kristof, we have some Sites where System Generates the TAX, while we want to reach a RRP of example 70.00 we must Input a Price of 59.574 but we find the system rounds up to 70.01 or 69.99 depending what we play with. Is there any guidlines on how to fix this?

    Kevin

    Reply
  2. Citrus Orange
    December 21, 2010 at 10:55 pm /

    Thanks Kristof for your swift Reply. I did manage to get it displaying correctly by changing the store.php roundprice() to use 3 decimal places. I must test now like you mentioned above.
    Good to make contact with you, were here in Ireland :) -13.5 C (Coldest Winter for decades)
    Happy Christmas and wishing you a successful 2011

    Reply
  3. Rushman
    Rushman
    September 7, 2011 at 4:09 am /

    After hours of research I tried to extract the shipping tax rate directly from the database via sql and it seems to work:

    private function getShippingTaxRate($store) {
    		
    		$tax_class_id 	= Mage::helper('tax')->getShippingTaxClass($store);
    		
    		$resource 		= Mage::getSingleton('core/resource');
    		$readConnection = $resource->getConnection('core_read');
    	
       		$tableName 		= $resource->getTableName('tax_calculation_rate'); //because of prefix !
    		$tableName2 	= $resource->getTableName('tax_calculation');
    		
       		$query 			= 'SELECT rate FROM ' . $tableName . ' WHERE tax_calculation_rate_id=(SELECT tax_calculation_rate_id FROM ' . $tableName2 . ' WHERE product_tax_class_id='.$tax_class_id.')';
       		   		
       		$shipping_rate = $readConnection->fetchOne($query);   		
       		
       		return $shipping_rate;
    	}
    

    I am a Magento beginner, so I am not sure if this is good practice or not. I will be greatful for any comments.

    Reply

Add a Comment & Join the Discussion

Insert small snippets of code by using [code]{your_code_here}[/code]
For larger code blocks please use http://pastebin.com and paste your link.

You may also use the following HTML in your comment: <a href="" title=""> <abbr title="">
<acronym title=""> <blockquote cite=""> <cite> <em> <strike> <strong>