7

I installed and configured Mage_GoogleShopping.

In the attribute set, the following attributes are configured:

  • Title
  • Description
  • Condition
  • MPN
  • Color
  • Brand
  • Price

When uploading products, I get the following warning in the error.log. Even if the products seem to appear in the Google Merchants center, the process is not completed (Message: "Google Shopping synchronization process is running").

 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/Mpn.php): failed to open stream: No such file or directory  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(): Failed opening 'Mage/GoogleShopping/Model/Attribute/Mpn.php' for inclusion (include_path='app/code/local:app/code/community:app/code/core:lib:.:/usr/share/php:/usr/share/pear')  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/Brand.php): failed to open stream: No such file or directory  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(): Failed opening 'Mage/GoogleShopping/Model/Attribute/Brand.php' for inclusion (include_path='app/code/local:app/code/community:app/code/core:lib:.:/usr/share/php:/usr/share/pear')  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/SalePrice.php): failed to open stream: No such file or directory  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(): Failed opening 'Mage/GoogleShopping/Model/Attribute/SalePrice.php' for inclusion (include_path='app/code/local:app/code/community:app/code/core:lib:.:/usr/share/php:/usr/share/pear')  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/SalePriceEffectiveDateFrom.php): failed to open stream: No such file or directory  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(): Failed opening 'Mage/GoogleShopping/Model/Attribute/SalePriceEffectiveDateFrom.php' for inclusion (include_path='app/code/local:app/code/community:app/code/core:lib:.:/usr/share/php:/usr/share/pear')  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/SalePriceEffectiveDateTo.php): failed to open stream: No such file or directory  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(): Failed opening 'Mage/GoogleShopping/Model/Attribute/SalePriceEffectiveDateTo.php' for inclusion (include_path='app/code/local:app/code/community:app/code/core:lib:.:/usr/share/php:/usr/share/pear')  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/Name.php): failed to open stream: No such file or directory  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(): Failed opening 'Mage/GoogleShopping/Model/Attribute/Name.php' for inclusion (include_path='app/code/local:app/code/community:app/code/core:lib:.:/usr/share/php:/usr/share/pear')  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/Description.php): failed to open stream: No such file or directory  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(): Failed opening 'Mage/GoogleShopping/Model/Attribute/Description.php' for inclusion (include_path='app/code/local:app/code/community:app/code/core:lib:.:/usr/share/php:/usr/share/pear')  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/SalePrice.php): failed to open stream: No such file or directory  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(): Failed opening 'Mage/GoogleShopping/Model/Attribute/SalePrice.php' for inclusion (include_path='app/code/local:app/code/community:app/code/core:lib:.:/usr/share/php:/usr/share/pear')  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/SalePriceEffectiveDateFrom.php): failed to open stream: No such file or directory  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(): Failed opening 'Mage/GoogleShopping/Model/Attribute/SalePriceEffectiveDateFrom.php' for inclusion (include_path='app/code/local:app/code/community:app/code/core:lib:.:/usr/share/php:/usr/share/pear')  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/SalePriceEffectiveDateTo.php): failed to open stream: No such file or directory  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(): Failed opening 'Mage/GoogleShopping/Model/Attribute/SalePriceEffectiveDateTo.php' for inclusion (include_path='app/code/local:app/code/community:app/code/core:lib:.:/usr/share/php:/usr/share/pear')  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/Name.php): failed to open stream: No such file or directory  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(): Failed opening 'Mage/GoogleShopping/Model/Attribute/Name.php' for inclusion (include_path='app/code/local:app/code/community:app/code/core:lib:.:/usr/share/php:/usr/share/pear')  in lib/Varien/Autoload.php on line 93
 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/Description.php): failed to open stream: No such file or directory  in lib/Varien/Autoload.php on line 93

Those files actually do not exist in the module. If have double checked this by re-downloading the module.

  • Have you traced if theses are configured as attribute models in database? If yes, then developers should respond as where they are. If not, then some debugging is needed to find out where the calls come from. – Petar Dzhambazov Jan 24 '13 at 15:12
  • I am pretty sure those are not attribute models in the database, they more look like those Google shopping attributes. I do not even have an attribute "Brand". Mine is called googleshopping_brand. – Alex Jan 25 '13 at 23:16
  • I noticed in their setup code, they copy a bunch of things from google base if it was enabled. May be check there? There are lots of google attribute classes, but none of those which cause errors. My guess is they are glued together somewhere in code. It would help if you had the origin in code where getModel is called. – Petar Dzhambazov Jan 26 '13 at 12:32
  • My guess is Mage_GoogleShopping_Model_Type::_createAttribute @ line 189 is to balme – Petar Dzhambazov Jan 26 '13 at 12:41
2

One of our clients was having this issue; the following solution from the extension's reviews page (http://www.magentocommerce.com/magento-connect/google-content-api-for-shopping.html) seems to have fixed it completely:

Please change following line then try again.
File: /app/code/core/Mage/GoogleShopping/Model/Service/Item.php on line 64
$published = $this->convertContentDateToTimestamp($entry->getPublished()->getText());

To:

$published = date();
  • You mean time() ? Now the items are added, but the warnings persist. – Alex Jan 28 '13 at 13:45
2

The module is probing classes for existence. This triggeres the autoloader which causes warnings if the files are not existing.

A workaround would be to patch the class Mage_GoogleShopping_Model_Type::_createAttribute by creating an own module or copying the file to app/local.

Not very nice because we have to use the shut-up operator:

protected function _createAttribute($name)
{
    $modelName = 'googleshopping/attribute_' . $this->_prepareModelName($name);
    $useDefault = false;
    try {
        $className = Mage::app()->getConfig()->getModelClassName($modelName);
        // [FIX] BEGIN
        if (!@class_exists($className)) {
            throw new Exception('Class ' . $className . ' does not exist');
        }
        // [FIX] END 
        $attributeModel = Mage::getModel($modelName);
        $useDefault = !$attributeModel;
    } catch (Exception $e) {
        $useDefault = true;
    }
    if ($useDefault) {
        $attributeModel = Mage::getModel('googleshopping/attribute_default');
    }
    $attributeModel->setName($name);

    return $attributeModel;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.