Coder Social home page Coder Social logo

plugin-magento2's Introduction

Lengow for Magento 2

Overview

Lengow is the e-commerce automation solution that helps brands and distributors improve their performance, automate their business processes, and grow internationally. The Lengow platform is the key to strong profitability and visibility for products sold by online retailers around the world on all distribution channels: marketplaces, comparison shopping engines, affiliate platforms and display/retargeting platforms. Since 2009, Lengow has integrated more than 1,600 partners into its solution to provide a powerful platform to its 4,600 retailers and brands in 42 countries around the world.

Major features in Lengow include:

  • Easily import your product data from your cms
  • Use Lengow to target and exclude the right products for the right channels and tools (marketplaces, price comparison engines, product ads, retargeting, affiliation) and automate the process of product diffusion.
  • Manipulate your feeds (categories, titles, descriptions, rules…) - no need for technical knowledge.
  • Lengow takes care of the centralisation of orders received from marketplaces and synchronises inventory data with your backoffice. Track your demands accurately and set inventory rules to avoid running out of stock.
  • Monitor and control your ecommerce activity using detailed, yet easy to understand graphs and statistics. Track clicks, sales, CTR, ROI and tweak your campaigns with automatic rules according to your cost of sales / profitability targets.
  • Thanks to our API, Lengow is compatible with many applications so you can access the functionality of all your ecommerce tools on a single platform. There are already more than 40 available applications: marketing platform, translation, customer review, email, merchandise, price watch, web-to-store, product recommendation and many more

The Lengow plugin is free to download and it enables you to export your product catalogs and manage your orders. It is compatible only with the new version of our platform. A Lengow account is created during the extension installation and you will have free access to our platform for 15 days. To benefit from all the functionalities of Lengow, this requires you to pay for an account on the Lengow platform.

Plugin installation

Follow the instruction below if you want to install Lengow for Magento 2 using Git.

1.) Clone the git repository in the Magento 2 app/code folder using:

git clone [email protected]:lengow/plugin-magento2.git Lengow/Connector

In case you wish to contribute to the plugin, fork the dev branch rather than cloning it, and create a pull request via Github. For further information please read the section "Become a contributor" of this document.

2.) Set the correct directory permissions:

chmod -R 755 app/code/Lengow/Connector

Depending on your server configuration, it might be necessary to set whole write permissions (777) to the files and folders above. You can also start testing with lower permissions due to security reasons (644 for example) as long as your php process can write to those files.

3.) Connect via SSH and run the following commands (make sure to run them as the user who owns the Magento files!)

php bin/magento module:enable Lengow_Connector
php bin/magento maintenance:enable
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento maintenance:disable

4.) Go to "System" > "Cache Management" and click both the "Flush Magento Cache" as well as the "Flush Cache Storage" button. This is required to activate the extension.

5.) Log in with your Lengow credentials and configure the plugin

Frequently Asked Questions

Where can I find Lengow documentation and user guides?

For help setting up and configuring Lengow plugin please refer to our user guide

Where can I get support?

To make a support request to Lengow, use our helpdesk.

Become a contributor

Lengow for Magento 2 is available under license (OSL-3.0). If you want to contribute code (features or bugfixes), you have to create a pull request via Github and include valid license information.

The master branch contains the latest stable version of the plugin. The dev branch contains the version under development. All Pull requests must be made on the dev branch and must be validated by reviewers working at Lengow.

By default the plugin is made to work on our pre-production environment (my.lengow.net). To change this environment, you must modify the two constants present in the file Lengow/Connector/Model/Connector.php

const LENGOW_URL = 'lengow.net';
const LENGOW_API_URL = 'https://api.lengow.net';

Translation

Translations in the plugin are managed via a key system and associated yaml files.

Please note that in Magento 2, English content is used as the translation key. You have to be careful that the English translation is identical in the code and in the yml files.

Start by installing Yaml Parser:

sudo apt-get install php5-dev libyaml-dev
sudo pecl install yaml

To translate the project, use specific key in php code and modify the *.yml files in the directory: Lengow/Connector/tools/yml/

Once the translations are finished, just run the translation update script in Lengow/Connector/tools folder

php translate.php

The plugin is translated into English, French and German.

Changelog

The changelog and all available commits are located under CHANGELOG.

plugin-magento2's People

Contributors

alherlengow avatar arnaud-hours avatar benjaminlgw avatar clovis-lgw avatar gaeldelmer avatar gthomas-lengow avatar michaelmaslengow avatar paullengow avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

plugin-magento2's Issues

Remove return type declaration to Interceptor classes

Hi,

Since 1.4.2, you've added return type declarations pointing to Interceptors. You probably meant to use Interfaces.

As an example, you've added return type declarations ?ProductInterceptor (Magento\Catalog\Model\Product\Interceptor) to :

  • \Lengow\Connector\Model\Export\Product::getProduct
  • \Lengow\Connector\Model\Export\Product::getParentProduct
  • \Lengow\Connector\Model\Export\Product::getConfigurableProduct

Please, use \Magento\Catalog\Api\Data\ProductInterface instead. Otherwise, everythings breaks when a module applies a preference on the Product model.

Error on the export process:

TypeError: Return value of Lengow\Connector\Model\Export\Product::getProduct() must be an instance of Magento\Catalog\Model\Product\Interceptor or null, instance of DialogInsight\DI\Model\Override\Catalog\Product\Interceptor returned in /path/to/website/vendor/lengow/module-connector/Model/Export/Product.php:556
Stack trace:
#0 /path/to/website/vendor/lengow/module-connector/Model/Export/Product.php(312): Lengow\Connector\Model\Export\Product->getProduct()
#1 /path/to/website/generated/code/Lengow/Connector/Model/Export/Product/Interceptor.php(32): Lengow\Connector\Model\Export\Product->load()
#2 /path/to/website/vendor/lengow/module-connector/Model/Export.php(532): Lengow\Connector\Model\Export\Product\Interceptor->load()
#3 /path/to/website/vendor/lengow/module-connector/Model/Export.php(454): Lengow\Connector\Model\Export->export()
#4 /path/to/website/generated/code/Project/Lengow/Model/Export/Interceptor.php(50): Lengow\Connector\Model\Export->exec()
#5 /path/to/website/vendor/lengow/module-connector/Controller/Export/Index.php(190): Project\Lengow\Model\Export\Interceptor->exec()
#6 /path/to/website/vendor/magento/framework/Interception/Interceptor.php(58): Lengow\Connector\Controller\Export\Index->execute()
#7 /path/to/website/vendor/magento/framework/Interception/Interceptor.php(138): Lengow\Connector\Controller\Export\Index\Interceptor->___callParent()
#8 /path/to/website/vendor/magento/framework/Interception/Interceptor.php(153): Lengow\Connector\Controller\Export\Index\Interceptor->Magento\Framework\Interception\{closure}()
#9 /path/to/website/generated/code/Lengow/Connector/Controller/Export/Index/Interceptor.php(23): Lengow\Connector\Controller\Export\Index\Interceptor->___callPlugins()
#10 /path/to/website/vendor/magento/framework/App/Action/Action.php(111): Lengow\Connector\Controller\Export\Index\Interceptor->execute()
#11 /path/to/website/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch()
#12 /path/to/website/vendor/magento/framework/Interception/Interceptor.php(138): Lengow\Connector\Controller\Export\Index\Interceptor->___callParent()
#13 /path/to/website/vendor/magento/framework/Interception/Interceptor.php(153): Lengow\Connector\Controller\Export\Index\Interceptor->Magento\Framework\Interception\{closure}()
#14 /path/to/website/generated/code/Lengow/Connector/Controller/Export/Index/Interceptor.php(32): Lengow\Connector\Controller\Export\Index\Interceptor->___callPlugins()
#15 /path/to/website/vendor/magento/framework/App/FrontController.php(245): Lengow\Connector\Controller\Export\Index\Interceptor->dispatch()
#16 /path/to/website/vendor/magento/framework/App/FrontController.php(212): Magento\Framework\App\FrontController->getActionResponse()
#17 /path/to/website/vendor/magento/framework/App/FrontController.php(147): Magento\Framework\App\FrontController->processRequest()
#18 /path/to/website/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch()
#19 /path/to/website/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent()
#20 /path/to/website/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(99): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#21 /path/to/website/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch()
#22 /path/to/website/vendor/fastly/magento2/Model/FrontControllerPlugin.php(128): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#23 /path/to/website/vendor/magento/framework/Interception/Interceptor.php(135): Fastly\Cdn\Model\FrontControllerPlugin->aroundDispatch()
#24 /path/to/website/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(71): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#25 /path/to/website/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch()
#26 /path/to/website/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#27 /path/to/website/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins()
#28 /path/to/website/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch()
#29 /path/to/website/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch()
#30 /path/to/website/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#31 /path/to/website/pub/index.php(29): Magento\Framework\App\Bootstrap->run()
#32 {main}

You don't use it in the code but it's the same issue with all occurences of StoreInterceptor. You never have to call any Interceptor class yourself.

Regards

Error in backoffice with the last version of the module 1.4.5

https://i.imgur.com/04drurw.png

`[2023-11-06T11:20:47.332710+00:00] report.CRITICAL: TypeError: Lengow\Connector\Helper\Security::getPluginVersion(): Return value must be of type string, null returned in /var/www/html/vendor/lengow/module-connector/Helper/Security.php:180

Apparently, the issue was introduced here : 07d69b7#diff-cfc6d0cac6c218df3440a678610688f93f9628a67a457c49030a50f4e7fc50d5L3

Magento uses the "setup_version" to determine the version of the module.

Fatal error on Lengow\Connector\Plugin\RulesApplier::aroundApplyRules() with Magento 2.4.4 and above

Unfortunately, Magento has changed the signature of applyRules() between 2.4.3 and 2.4.4 which breaks your plugin:

2.4.3
https://github.com/magento/magento2/blob/4c36116dcf878e127059d9be9566a119783583f2/app/code/Magento/SalesRule/Model/RulesApplier.php#L96-L106

2.4.4
https://github.com/magento/magento2/blob/0f9a056c8d83c4f319626b3e56ec52a533999f25/app/code/Magento/SalesRule/Model/RulesApplier.php#L99-L109

$rules is now a simple array and not a Magento\SalesRule\Model\ResourceModel\Rule\Collection anymore.

Deprecated functionality trim() in Import/Customer.php

Hi, magento 246 php 8.1 we get this error when trying to import order from amazon - spartoo works well

'Deprecated Functionality: trim(): Passing null to parameter #1 ($string) of type string is deprecated in vendor/lengow/module-connector/Model/Import/Customer.php on line 623'

Payment model name is not provided in config

Hi,

after installing the lengow module v1.4.2 into magento 2.4.3 (php7.4) via composer, the checkout page stopped working. The checkout page shows a white screen. The following error appears in var/log/exception.log:

main.CRITICAL: Payment model name is not provided in config! {"exception":"[object] (UnexpectedValueException(code: 0): Payment model name is not provided in config! at /vendor/magento/module-payment/Helper/Data.php:113)"} []

After digging a while I saw a solution at this comment:
https://magento.stackexchange.com/a/146017/15499

I've took a look into the lengow module code. There are some payment method declarations (lengow & lengow_purchaseorder) in etc/config.xml but the method code which is set in Model/Payment/Lengow.php to the value lengow_payment is missing in etc/config.php

image

image

ADMIN_RESOURCE

Adding ADMIN_RESOURCE consts in each controller would be a great security measure

Upload it on packagist

Hello,

Could you upload the module on Packagist so we can install it with Composer?

Thank you!

Error During compilation

PHP: 7.3
Magento:2.4

I have update Magento 2.3.4 to Magento 2.4
Lengow connector provide error when run command
PHP bin/magento setup:di:compile

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in  
   /var/www/vhosts/website.com/httpdocs/app/code/Lengow/Connector/Model/Import/Marketplace.php on l  
  ine 385

LENGOW_URL and LENGOW_API_URL constants

Hello,

I don't understand why you stored the Lengow url and Lengow API url into constants, it causes a lot of issues:

  • We must modify the Lengow module code and our modification will be erased at every update
  • We must have a different code version between production and staging
  • If we install the module via Composer, we can't modify the module code
  • dev and master branches have these values configured to lengow.io so we can't select a production branch

Why didn't you put these values in config?

Is there any plan to change this behavior?

Thank you.

Wrong phone number clean at order import

return preg_replace('/[^0-9]*/', '', $phoneNumber);

Hello,
This regex remove the "+" of the country calling code of the phone during order import.
Exemple "+336123456789" is stored in magento as "336123456789" wich is a wrong phone number.

A quick fix could be :

return preg_replace('/[^0-9+]*/', '', $phoneNumber);

But a more precise clean of the phone number could be better.

Thanks

New order ship to old adress

On my magento 2.4.6 version, if customer already exist in magento, the order goes on old adress shipping and billing not the new adress create and set in default. So if the customer relocate... Can you look if i am alone in this situation ?

Error in system.log when exporting product feed

When exporting an product feed in de admin panel, we get the following error in the system.log:

Warning: Cannot modify header information - headers already sent by (output started at vendor/lengow/module-connector/Model/Export/Feed.php:423) in vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php on line 152

image

Backend order detail page fails to render

Hi,

In vendor/lengow/module-connector/Block/Adminhtml/Sales/Order/Tab/Info.php::getOrderImportedDate there is a dependency on the order status history. The first item of the status history returns the orderImportedDate. The problem is that there can be orders which don't have any status history items. The method fails on the return type. It returns null but allowed is only string.

image

TypeError: Return value of Lengow\Connector\Block\Adminhtml\Sales\Order\Tab\Info::getOrderImportedDate() must be of the type string, null returned in /var/www/share/production/src/vendor/lengow/module-connector/Block/Adminhtml/Sales/Order/Tab/Info.php

@benjaminlgw

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.