Line 1:
Line 1:
+
<!-- BEGIN interlang links -->
+
<!-- Do NOT edit this section
+
Links below are automatically managed by PolyglotBot
+
You can edit links on the English source page : Module_ECommerce_NG_(Magento) -->
+
[[en:Module_ECommerce_NG_(Magento)]]
+
<!-- END interlang links -->
+
[[Category:Modules complémentaires]]
[[Category:Modules complémentaires]]
[[Category:Magento]]
[[Category:Magento]]
Line 5:
Line 12:
{{TemplateDocDev}}
{{TemplateDocDev}}
{{TemplateDocUtil}}
{{TemplateDocUtil}}
−
<keywords content="Magento, Dolibarr, synchro, synchronisation, interface" />
+
<seo metak="Magento, Dolibarr, synchro, synchronisation, interface" />
= Informations =
= Informations =
{{TemplateModuleInfo
{{TemplateModuleInfo
−
|modulename=Magento
+
|modulename=ECommerce NG (Magento)
|editor=Teclib
|editor=Teclib
|web=[http://www.teclib.com www.teclib.com]
|web=[http://www.teclib.com www.teclib.com]
Line 14:
Line 21:
|status=development
|status=development
|prerequisites=
|prerequisites=
−
|minversion=3.8.0+
+
|minversion=3.9.0+
−
Magento version 1.9+
+
Prerequisite of Magento: Magento version 1.9.* - 1Gb of allowed memory on the PHP where Magento run may be required
|note=
|note=
}}
}}
= Fonctionnalités =
= Fonctionnalités =
−
Intègre une synchronisation Magento - Dolibarr.
+
Intègre une synchronisation entre Dolibarr et une plateforme eCommerce. Le support pour Magento es stable, celui pour WooCommerce est experimental, celui pour Prestashop est un développement non terminé (contributions pour cela bienvenues).
−
Il s'agit d'un module qui s'installe sur Dolibarr. L'accès à Magento est fait par Dolibarr en utilisant les Web services par défaut de Magento.
+
+
Il s'agit d'un module qui s'installe sur Dolibarr uniquement. L'accès à la plateforme eCommerce est fait par Dolibarr en utilisant les Web services fournis par la plateforme.
= Installation =
= Installation =
Line 52:
Line 60:
= Développement =
= Développement =
{{TemplateModTeclibFr}}
{{TemplateModTeclibFr}}
+
+
+
= TroubleShooting =
+
A cause de problèmes dans Magento, si vous avez un nombre important de catégories de produits, vous constaterez de très mauvaise performance lors du comptage des données à synchroniser ou lors de la synchronisation. Voici une modification qui peut améliorer cela:
+
+
Sur Magento 1.9, éditer le fichier '''app/code/core/Mage/Catalog/Model/Category/Api.php''' pour ajouter la ligne visible en commentaire
+
+
<syntaxHighlight lang="php">
+
+
...
+
+
/**
+
* Convert node to array
+
*
+
* @param Varien_Data_Tree_Node $node
+
* @return array
+
*/
+
protected function _nodeToArray(Varien_Data_Tree_Node $node)
+
{
+
// Only basic category data
+
$result = array();
+
$result['category_id'] = $node->getId();
+
$result['parent_id'] = $node->getParentId();
+
$result['name'] = $node->getName();
+
$result['is_active'] = $node->getIsActive();
+
$result['position'] = $node->getPosition();
+
$result['level'] = $node->getLevel();
+
+
+
/* FIX Add here this new line to add the missing property returned by web service */
+
/*********/
+
$result['updated_at'] = $node->getUpdatedAt();
+
/*********/
+
+
+
$result['children'] = array();
+
+
foreach ($node->getChildren() as $child) {
+
$result['children'][] = $this->_nodeToArray($child);
+
}
+
+
return $result;
+
}
+
+
...
+
+
</syntaxHighlight>