Git Product home page Git Product logo

mongogento's People

Contributors

afoucret avatar astik avatar buric avatar romainruaud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mongogento's Issues

addAttributeToFilter()

Hi,

I am working on mongo and after importing all mysql product attributes from mysql to mongo-db and it worked smooth and when I checked the mongo-db, found different attributes have different data type few are (Int32,String...).

So when we add custom attributes like discontinued using the function addAttributeToFilter then I did not get records and after reviewing all things found that there is difference of data type as I am passing this custom attribute as string and it is Int32 in mongo-db due to that records did not found as there is mis-match of data type.

So in my opinion, there is an functionality is missing when we add to filter an custom attribute to addAttributeToFilter which used to _buildDocumentFilter. So before building filter it should first convert that filter it to data-type which we set in mongo-db while importing.

_loadAttributes()

Hi,
I am working on this extension and found a function public function _loadAttributes($printQuery = false, $logQuery = false) in class Smile_MongoCatalog_Model_Resource_Override_Catalog_Product_Collection

`public function _loadAttributes($printQuery = false, $logQuery = false)
{
parent::_loadAttributes($printQuery, $logQuery);

    if (!empty($this->_itemsById)) {

        $storeFilter = array_unique(array('attr_' . $this->getDefaultStoreId(), 'attr_' . $this->getStoreId()));

        if (is_null($this->_loadedDocuments)) {

            $documentIds = $this->getLoadedIds();

            foreach ($documentIds as $key => $value) {
                $documentIds[$key] = (int)$value;
            }

my question is that did we need to call parent::_loadAttributes($printQuery, $logQuery); this function to load attributes from mysql as it return all attributes which is then useless to load the data in below code.

can we removed parent::_loadAttributes($printQuery, $logQuery); this part or thier is any logic/point .

can you explained

thanks in advanced

is it support Flat Table

Fatal error: Class undefined: MongoInt32 in /vagrant/shell/smile/mongoify.php on line 942

[7:14]
\nFatal error: Call to undefined method Mage_Catalog_Model_Resource_Product_Flat::getSqlAttributesCodes() in /vagrant/app/code/community/Smile/MongoCatalog/Model/Resource/Override/Catalog/Product/Collection.php on line 213

exception 'BadMethodCallException' with message 'Call to a member function addData()

Hello all,
I facing this issue when I try to load product collection in chunks
exception 'BadMethodCallException' with message 'Call to a member function addData() on a non-object (null)' in /app/code/community/Smile/MongoCatalog/Model/Resource/Override/Catalog/Product/Collection.php:173
in _loadAttributes() function. My code is
`public function updateIndex()
{
$productsCollection = Mage::getModel('catalog/product')->getCollection()
->addFieldToFilter('visibility', Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH);

$productsCollection->setPageSize(100);

$pages = $productsCollection->getLastPageNumber();
$currentPage = 1;

do {
    $productsCollection->setCurPage($currentPage);
    $productsCollection->load();

    foreach ($productsCollection as $_product) {

        $insertData = array(
            'entity_id' => $_product->getId(),
            'title' => $_product->getName(),
            'image' => $_product->getImage(),
            'url' => $_product->getUrlKey(),
            'price' => $_product->getFinalPrice(),
        );

        $this->_getWriteAdapter()->insertOnDuplicate(
            $this->getTable('atwix_sonar/suggestions'),
            $insertData,
            array('title', 'image', 'url', 'price')
        );
    }

    $currentPage++;
    //clear collection and free memory
    $productsCollection->clear();
} while ($currentPage <= $pages);

}`
Note this is just test code from atwix tutorial
Do you have any solution for this?

category_ids is not supported since magento 1.4

PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.category_ids' in 'field list'' in /var/www/html/scw.com/lib/Zend/Db/Statement/Pdo.php:228

Caused by $staticFields[0]='category_ids' being passed to 👍

protected function _getProducts(array $staticFields, $productIds = null, $lastProductId = 0)
{
$readAdapter = $this->_getReadAdapter();

    $select = $readAdapter->select()
        ->useStraightJoin(true)
        ->from(
            array('e' => $this->getTable('catalog/product')),
            array_merge(array('entity_id', 'type_id', 'attribute_set_id', 'entity_type_id'), $staticFields)
        );

"Magento removing the field “category_ids” from catalog_product_entity table in version 1.4 "

unset($staticFields[0]); is not a graceful way to patch this!

Mongogento en Windows

hola, tengo una pregunta hace rato que he querido integrar este modulo en mi tienda magento pero no he podido ya que yo hago uso de magento para windows y los pasos de instalación presentados son para linux, mi pregunta es ¿esta integración se puede hacer en windows? de ser así ¿como puedo integrarlo en la plataforma windows?...
gracias de antemano

Populate monogdb

Hi

How do we initially populate mongodb with all products? So far I can only do this by saving each and every product, which isn't an option when dealing with 100,000+ products.

Regards
Shem

{__FILE__} notnull : unsuported MongoDB attribute filter

Receiving the above error when trying to view a product from the admin panel. The attribute in question is a drop down attribute that is not included in layered nav, advance search or product listing. I am using Magento CE 1.6.1. MongoDB version 2.4.10. PHP driver 1.5.1

Trace:
#0 _product/app/code/community/Smile/MongoCatalog/Model/Resource/Override/Catalog/Product/Collection.php(401): Mage::throwException('{FILE} notn...')
#1 _product/app/code/community/Smile/MongoCatalog/Model/Resource/Override/Catalog/Product/Collection.php(268): Smile_MongoCatalog_Model_Resource_Override_Catalog_Product_Collection->_buildDocumentFilter('hort_plantpotsi...', Array)
#2 _product/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(863): Smile_MongoCatalog_Model_Resource_Override_Catalog_Product_Collection->_beforeLoad()
#3 _product/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(526): Mage_Eav_Model_Entity_Collection_Abstract->load()
#4 _product/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid.php(144): Mage_Adminhtml_Block_Widget_Grid->_prepareCollection()
#5 _product/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(618): Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Grid->_prepareCollection()
#6 _product/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(624): Mage_Adminhtml_Block_Widget_Grid->_prepareGrid()
#7 _product/app/code/core/Mage/Core/Block/Abstract.php(862): Mage_Adminhtml_Block_Widget_Grid->_beforeToHtml()
#8 _product/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#9 _product/app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('grid', true)
#10 _product/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php(198): Mage_Core_Block_Abstract->getChildHtml('grid')
#11 _product/app/design/adminhtml/default/default/template/catalog/product/edit/super/config.phtml(139): Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config->getGridHtml()
#12 _product/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/vhosts...')
#13 _product/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#14 _product/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#15 _product/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#16 _product/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml()
#17 _product/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php(303): Mage_Core_Block_Abstract->toHtml()
#18 _product/app/design/adminhtml/default/default/template/widget/tabs.phtml(38): Mage_Adminhtml_Block_Widget_Tabs->getTabContent(Object(Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config))
#19 _product/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/vhosts...')
#20 _product/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#21 _product/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#22 _product/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#23 _product/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml()
#24 _product/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#25 _product/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Text_List->_toHtml()
#26 _product/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#27 _product/app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('left', true)
#28 _product/app/design/adminhtml/default/default/template/page.phtml(60): Mage_Core_Block_Abstract->getChildHtml('left')
#29 _product/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/vhosts...')
#30 _product/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#31 _product/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#32 _product/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#33 _product/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml()
#34 _product/app/code/core/Mage/Core/Controller/Varien/Action.php(391): Mage_Core_Model_LayoutOverriddenClass->getOutput()
#35 _product/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(269): Mage_Core_Controller_Varien_Action->renderLayout()
#36 _product/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Adminhtml_Catalog_ProductController->editAction()
#37 _product/var/cache/ew/files/Mage/Core/Controller/Varien/Router/Standard/088bf81233af8a733a03eb4d9a3bcae0.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')
#38 _product/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_StandardOverriddenClass->match(Object(Mage_Core_Controller_Request_Http))
#39 _product/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#40 _product/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#41 _product/index.php(91): Mage::run('hedgenursery', 'website')
#42 {main}

Can't canonicalize query: BadValue $in needs an array

get this error when I try index, this is failing on the search index.

assertion 17287 Can't canonicalize query: BadValue $in needs an array ns:mongogento.catalog_product_entity query:{ _id: { $in: { 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 34: 34, 35: 35, 36: 36, 37: 37, 38: 38, 39: 39, 41: 41, 42: 42, 44: 44, 45: 45, 46: 46, 47: 47, 48: 48, 49: 49, 51: 51, 52: 52, 53: 53, 54: 54, 74: 74, 75: 75, 79: 79, 80: 80, 81: 81, 82: 82, 83: 83, 84: 84, 85: 85, 86: 86, 87: 87, 88: 88, 89: 89, 90: 90, 91: 91, 92: 92, 93: 93, 97: 97, 96: 96, 95: 95, 94: 94, 98: 98, 99: 99, 100: 100, 101: 101, 102: 102, 103: 103, 104: 104, 105: 105, 106: 106, 107: 107, 108: 108, 109: 109, 110: 110, 111: 111, 112: 112, 113: 113, 114: 114, 115: 115, 117: 117, 118: 118, 119: 119, 120: 120, 121: 121, 122: 122, 123: 123, 124: 124, 125: 125, 126: 126, 127: 127, 128: 128, 129: 129, 130: 130, 131: 131, 132: 132, 133: 133, 134: 134, 135: 135, 138: 138, 139: 139, 140: 140, 141: 141, 142: 142, 143: 143, 144: 144, 145: 145, 146: 146, 147: 147 } } }

Magento support version

Hello All,
We are using Magento Community Edition 1.9.1, looking into the performance matrix of mongogento we would like to migrate our application into it. Please suggest is mongogento compatible with my magento version. We have also long list of extension used in the site where should we cross verify there compatibility.

Regards
Abhijit

Fatal error: MongoInt32 class not found

I am getting following fatal error:

Fatal error: Class 'MongoInt32' not found in app\code\community\Smile\MongoCatalog\Model\Resource\Override\Catalog\Product\Collection.php on line 142

What can be the issue?

Could not convert BSON document to a PHP variable

When reading a collection of 250k products I get the following error, any idea why am I getting it?


Fatal error: Uncaught exception 'MongoDB\Driver\Exception\UnexpectedValueException' with message 'Could not convert BSON document to a PHP variable' in /srv/dd/www/app/code/community/Smile/MongoCatalog/Model/Resource/Override/Catalog/Product/Collection.php:153
Stack trace:
#0 /srv/dd/www/app/code/community/Smile/MongoCatalog/Model/Resource/Override/Catalog/Product/Collection.php(153): MongoDB\Driver\Cursor->next()
#1 /srv/dd/www/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(874): Smile_MongoCatalog_Model_Resource_Override_Catalog_Product_Collection->_loadAttributes()
#2 /srv/dd/www/lib/Varien/Data/Collection.php(741): Mage_Eav_Model_Entity_Collection_Abstract->load()
#3 /srv/dd/www/shell/product-without-category.php(21): Varien_Data_Collection->getIterator()
#4 /srv/dd/www/shell/product-without-category.php(60): Mage_Shell_ProductWithoutCategory->run()
#5 {main}

Does MongoGento Work on Magento Community Edition?

Hello,

Your project to integrate Mage and MongoDB looks awesome. I wish to contribute to the project. Does your project work with Magento Community edition? I am working on Mage CE 1.8

Regards,

Aks

using mongodb connection in the application.

Mongogento request to put:

    <document_db>

        <!-- MongoDB connection string (see : http://www.php.net/manual/fr/mongoclient.construct.php) -->
        <connection_string><![CDATA[mongodb://localhost:27017/]]></connection_string>

        <!-- MongoDB database name : will be created if not exists -->
        <dbname><![CDATA[db]]></dbname>
    </document_db>

its possible to use that connection if we develop new areas in mongogento? how can we use the connection in local.xml in modules developed in magento?.

thanks in advance.
brgds

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.