Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Post price including VAT to google base
 
equiplogistics
Member
 
Total Posts:  57
Joined:  2009-05-15
 

When I post items to google base the price doesn’t include tax.  Only the price excluding tax.  How do I change this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
itchytrig
Sr. Member
 
Avatar
Total Posts:  162
Joined:  2008-10-03
UK
 

Hi,

Just noticed this error too! This will get us removed from Google Products. Anyone managed to fix it?

Thanks in advance!

 
Magento Community Magento Community
Magento Community
Magento Community
 
magentippper
Jr. Member
 
Total Posts:  3
Joined:  2008-12-03
 

#at Mage 1.3.2.3.

Hi!
yes i noticed this to. Notice that :

1. Lawable correct price in google base >> Insert Product prices for european markets incl. tax.
2. Multistore and google base >> acutally you could only transfer ONE google base destination/ Target Country (United Kingdom, USA or Germany).
2.1 Notice that google required some attributes. The characteristic of the attribute has to be translated in the language of the target country (read the google manual, for german markets: http://base.google.com/support/bin/answer.py?answer=78170&hl;=de#Produkte )
If you are customizing the attribute sets, you have to be aware that the required attr. are in the default attr.set ( that doesnt work retrospectiv) and the attr. are set in the products.
2.2. Magento with different languages and google base. That doesnt work because in Mage 1.3.2.3 you cant choose the language/ the storeview of the products that you want to transfer to google base. It work only for one target country, but be aware that you have to set the characteristica/markedness of required attributes in the correct language. Otherwise google dont accept your data feed.

@varien: If I dont be mistaken, I think google base plugin has to programmed fit for multistore ability by the next releases, hasnt it?

 
Magento Community Magento Community
Magento Community
Magento Community
 
WebShopApps
Guru
 
Avatar
Total Posts:  460
Joined:  2008-05-30
London, UK
 

A hack to put incl tax in.  Modify this file:

app/code/core/Mage/GoogleBase/Model/Service/Item.php

Around Line 338 multiple $value by tax rate e.g.

protected function _setAttributePrice($attribute$value$type 'text')
    
{
        
if (!$this->getData('price_assigned')) {
            $targetCountry 
$this->getConfig()->getTargetCountry($this->getStoreId());
            
$this->_setAttribute(
                
$this->getConfig()->getCountryInfo($targetCountry'price_attribute_name'$this->getStoreId()),
                
sprintf('%.2f'$value*1.15),
                
'floatUnit'
            
);
            
$this->setData('price_assigned'true);
        
}
    }

This only seems to work with new inserts - though I cant spot reason why updates are not updating.

You could make this actually pick up the tax values correctly rather than this hack, which would be advisable for stores where some items are zero vat or some of the EU countries.

Thanks to itchytrig for testing this solution!

Rgds

Karen

 
Magento Community Magento Community
Magento Community
Magento Community
 
barnyshergold
Member
 
Avatar
Total Posts:  53
Joined:  2011-02-05
 

There’s a better place to put the fix.

Go to the function _setUniversalData() in the same file

You need to find this block of code :

if (isset($attributeValues['price']['value']) && floatval($attributeValues['price']['value']) > 0{
  $price 
$attributeValues['price']['value'];
 
else {
  
//$price = $object->getPrice(); // CORE
  
$price Mage::helper('tax')->getPrice($object$object->getFinalPrice()); // CUSTOM
}

And make the change as shown. This way GoogleBase will pick up the VAT rate from your Admin shop. TBH this works in the UK as we have to charge everyone VAT at the same rate now (legal requirement) so it doesn’t matter about foreign currencies.

Even better solution is to do this as a local override as then if you upgrade Magento you won’t wipe out the change.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Greybeard
Jr. Member
 
Total Posts:  11
Joined:  2011-07-07
 

Using Magento 1.6.2 and Google Shopping API 1.6

I have tried the code edits mentioned here - in both places - but I am still not getting the right prices including VAT in google.

I have tried it with new items as well as synching items

I have the googlebase folder, but the folder that got installed was googleshopping and the service/item.php code is quite different, and looking at the that one, I cannot quite work out where the change might be.

Any ideas?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top