Code Monkey home page Code Monkey logo

doofinder-magento2's Introduction

doofinder-magento2

Build Status

IMPORTANT: If you are in trouble with the module, please contact Doofinder Support from the Doofinder website.

Docker Environment

NOTE: If you are in Windows or WSL, probably you'll have to fix CONTROL-M (^M) carriage return characters in build.sh file. Run this command to get rid of this characters:

dos2unix build.sh

Configure NGROK In order to be able to create an account or login to an existing Doofinder account during the module initial setup, you will have to expose your local webserver to internet (to receive a callback).

To do so, you can use, for example; the utility Ngrok: https://dashboard.ngrok.com/get-started/setup

And once you have the external url created simply edit the .env file and set the MAGENTO_BASE_URL={your-url.ngrok-free.app} (for example: MAGENTO_BASE_URL=forcibly-ethical-apple.ngrok-free.app)

So, when the installation process finished, instead of accessing to http://localhost:9012 you will use your url (for example: http://forcibly-ethical-apple.ngrok-free.app). Notice that you'll need to specify the 9012 port when executing ngrok.

Then setup the environment by executing:

$ docker-compose --profile setup up

from the base directory where the docker-compose.yml is located. The installation process will take some minutes to be finished. You can follow the status logging with:

docker logs setup -f

Finally, Magento 2 with the module installed will be running at http://localhost:9012.

The admin panel will be available at http://localhost:9012/admin. Admin credentials are defined in the .env, if you used the env.example would be:

User: admin
Pass: admin123

To install sample data, with the containers running, you can simply execute:

$ ./data_loader.sh

In order to make this script work, the only thing you'll need to do is to fill the username and password fields in the src/auth_json file, with the same values used previously in the .env file, base your file in the auth.json.sample file.

OR if you'd rather load the data manually, you can also:

$ docker exec -it web bash
root@...:~# cd /app
root@...:/app# php -d memory_limit=-1 bin/magento sampledata:deploy
root@...:/app# bin/magento setup:upgrade
root@...:/app# bin/magento setup:di:compile
root@...:/app# bin/magento setup:static-content:deploy -f

Note: After you run the bin/magento sampledata:deploy command you will be prompted for authentication: Authentication required (repo.magento.com):. You will have to use simply the same Magento repository tokens that you used in the .env file:

COMPOSER_AUTH_USERNAME & COMPOSER_AUTH_PASSWORD

These fields can be obtained by going to Your magento marketplace account and creating an access key. The public key will be COMPOSER_AUTH_USERNAME and the private key will be COMPOSER_AUTH_PASSWORD.

Xdebug ready to use

If you wish to debug your new Magento installation, just simply set the correct values in .env and configure your IDE attending to the remote PHP docker container web. You should also bind your local source path: ./src to the docker one: /app

PhpMyAdmin ready to use

Once the installation has finished, you can also access to a ready to use phpMyAdmin local server listening in port 8080: http://localhost:8080. Here you will see all the Magento 2 tables in the database specified in the file .env (by default: magentobase)

Uninstall the module

You can remove the Doofinder module using this straightforward method:

$ docker exec -it web bash
root@...:~# cd /app
root@...:/app# bin/magento module:uninstall Doofinder_Feed --remove-data

Manual Uninstall

php bin/magento module:disable Doofinder_Feed --clear-static-content
php bin/magento setup:upgrade
php bin/magento cache:flush
remove directory inside src/app/code

Test another versions

Change your branch to the tag that you want inside package directory

Go inside the magento container

cd app
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento module:enable Doofinder_Feed  --clear-static-content
php bin/magento cache:clean
php bin/magento cache:flush

Last notes

Please, take care when you change in .env the MAGENTO_VERSION parameter since you'll have to change probably the PHP_VERSION & COMPOSER_VERSION ones in order to maintain the compatibility. For example, if you wish the Magento 2.4.3 version you should have:

PHP_VERSION=7.4
COMPOSER_VERSION=2.0.14
MAGENTO_EDITION=community
MAGENTO_VERSION=2.4.3

but if you want to test, let's say, the 2.3.1 version you should have something like this:

PHP_VERSION=7.2
COMPOSER_VERSION=1.4.3
MAGENTO_EDITION=community
MAGENTO_VERSION=2.3.1

And please, don't forget to copy in .env your Magento repository tokens filling the parameters:

COMPOSER_AUTH_USERNAME=
COMPOSER_AUTH_PASSWORD=

Troubleshooting

Permissions issues After running the bin/magento setup:upgrade or other magento commands inside the docker container some folders are created and the user running apache can loose permissions to execute returning 500 Error. To restore permissions for these folders run in the host terminal sudo chmod 777 -R src/.

Redirect issues If after the setup process has finished the website doesn't load you may need to change the urls in the database. Connect to the database in localhost:3312 using the mysql user and password defined in the .env (magentobase). In the table core_config_data there are two configs for the base urls that magento will redirect to, with paths:

  • web/unsecure/base_url
  • web/secure/base_url Make sure that those urls are the ones you'll be using to connect to your site or magento will always redirect to them.

doofinder-magento2's People

Contributors

abraham-doofinder avatar aitor-corrales avatar brunovesar avatar carlosescri avatar davidmolinacano avatar dawidmaczynski avatar dependabot[bot] avatar dominikklemetowski avatar eduardogomez97 avatar frobs avatar ivan-doofinder avatar ivangallegoc avatar juan-gm avatar mdogo avatar mingoarte avatar ogomezba avatar paweltatarczuk avatar pedromcp90 avatar sofia-doofinder avatar tuvandev avatar yuloma avatar

Stargazers

 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

doofinder-magento2's Issues

Magento 2 - Including/excluding taxes option for doofinder aplication

There is an option for selecting the way the client wants the product's price to be displayed named "including and excluding taxes". This option shows in the product's template both prices, but giving the main focus to the including taxes one.

When we ask for the final price while this option is selected, we get the price including taxes too, but there is a problem with that, related with the way some clients tend to use this option: Sometimes they change which of the prices is shown as the main price in the products page in the template, giving the sensation that the doofinder application is not working as expected anymore because the price shown in our application is the one with taxes (as it should).

In order to palliate this situation, we could add another option into our doofinder option's site, inside Magento, allowing the client to change the way they want the price to be shown (and indexed) inside doofinder:

  • Using Magento's default configuration
  • With taxes
  • Without taxes

This way, if a client wants to change the template AND also wants to get the excluding taxes price to get indexed, instead of the including taxes one, they will be allowed.

Sorting and filtering not working on categories

Hi,

Magento version: 2.3.4

We seem to be having an issue when this module is installed and enabled - normal category sorting and filtering doesn't work. The error I get is below:

Type Error occurred when creating object: Doofinder\FeedCompatibility\Model\ResourceModel\Fulltext\Collection\SearchCriteriaResolver, Argument 6 passed to Doofinder\FeedCompatibility\Model\ResourceModel\Fulltext\Collection\SearchCriteriaResolver::__construct() must be of the type array, null given, called in /var/www/html/live/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 121

Anyone else experienced this?

Thanks.

Calculate availability using all providers

There are some magento2 users that have multiple providers for a product.
Actually when we're providing the stock_items attributes we're using only the "default provider" to calculate is the product is in stock or out of stock. Would be interesing if we obtain this value taking all availables providers and not just de "default" because can occour that one product is available with another provider and we're showing the product as out of stock.

image.png

Example of customer with this problem:
https://doofinder.freshdesk.com/a/tickets/76885

[Magento2] Fix indexation response message

The indexation response message when the index doesn't change should be:
No Changes in Feeds.
Instead of:
no changes in feeds

We should take into account the Upcase letters and the final dot

[Magento2] Doofinder missing information after create store

Seems that some information has been missing after migrate from doofAPI to doomanager endpoint:

  • Custom attributes aren't configured after plugin installation.
  • Script & installation id doesn't appear in the doofinder config section --> clean cache was deleted
  • The input selector was missing, so none was set during the store creation.
  • Hashid is not stored into data base (it is needed for update on save)
  • The layer wasn't enabled after the indexation process is completed

Stores Configuration tabs display is broken ?

Hi,
After installing, I got Stores > Configuration tabs broken :

  • Does not display left tabs column
  • Only display last left column item content
    cf screenshot

Got others installed extensions but occured only after Doofinder install.
Installation was tested by FTP drop and composer.

Tried to find something wrong in system.xml but all seems to be OK.

Am I doing something wrong ?

Thank you

Magento V2.2.4

screenshot-doofinder-feed

can't install 0.3.2 on M2.2.6

setup:upgrade or setup:di:compile give this error:

Fatal error: Interface 'Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection\SearchCriteriaResolverInterface' not found in /opt/atlassian/pipelines/agent/build/vendor/doofinder/doofinder-magento2/Model/ResourceModel/Fulltext/Collection/SearchCriteriaResolver.php on line 14

[Magento2] Add description to index processing status table

The "Index processing status" table is updated after the installation process (just first indexation).

image

To avoid misunderstanding with the customers, the idea would be add some description to this page so the user knows that this information is related just with the first indexation. We've to write some text and validate it with product.

Magento 2 - Make configurable products take inc./exc. VAT price

In the current state of the plugin, when a product is configurable and we retrieve the products price, we always get the final price, and Magento always returns the price with the VAT included.

We need to obtain the configurable product's price taking into account the platform's preference in including or not VAT matters.

TICKETS:

PR: #223

convert html entities when using API

use case:
some product described like this in the product feed (generated by our plugin):

<item>
 <id><![CDATA[8596]]></id>
 <brand><![CDATA[L&#039;Outil Parfait]]></brand>
</item>

As can be seen the "brand" value (L'Outil Parfait) is html-escaped (L&#039;Outil Parfait)

when processing this as an file feed, the html_entities filter takes care of that, but:

when using the reindex feature of our magento plugin, our plugin uses php-doofinder to access doofinder's API, and uploads everything again via API. And there's no html_entities filter in that scenario.

I guess our plugin should either doesn't produce html-escaped values, or unescaping then when reading from the magento products database, or taking care of unescaping them before submitting them via API.

@carlosescri

let know Adrien about this when it's done

https://doofinder.freshdesk.com/a/tickets/14230

[Magento2] Doofinder index processing status is not working

After the change from doofAPI to doomanager endpoint to create the store the "Doofinder Index Processing Status" table is not working.
image

It is due to is using doofAPI endpoints that now doesn't provide any information because wasn't called previously. I.e. Previously we use the endpoint [POST] /search_engines//_process to request the feed indexation and then we used the endpoint [GET] /search_engines//_process to check the indexation status. Now we don't use this endpoint to request the feed indexation, therefore we don't get any response when we try to request the status.

Separate search and indexing

Now, when you choose Doofinder as Magento's search engine, Magento uses Doofinder indexer.

There should be a way to use Doofinder for search, but using data from Doofinder that may be indexed from other source, like a custom API process or a custom data feed.

The only requirement is that the ID field of the indexed items matches the ID of the product in the database.

Sales grids in the backend do not load

I just want to report a bug we found in the magento 2 module (magento version 2.1.9). When doofinder is enabled, all sales grids in the backend do not load. In every one (orders, invoices, shipments, credit memos etc) the following message appear:

Not registered handle sales_order_grid_data_source
Not registered handle sales_order_invoice_grid_data_source
Not registered handle sales_order_shipment_grid_data_source
Not registered handle sales_order_creditmemo_grid_data_source

In the corresponding section of the magento backend. With a little bit of digging we found that there is an issue with having object declarations in etc/adminhtml/di.xml and in etc/di.xml separately.

Disabling the declarations from etc/adminhtml/di.xml and merging them in etc/di.xml seems to fix the issue. We submit this to you as a possible fix for this issue, unless you come up with something better.

Magento 2 - Callback url not receiving response from doofAPI

Whenever a client creates the structure in Doofinder as a result of the installation of the plugin in a Magento 2 platform, as a result, its products should be indexed and when this process finishes, the callback url in the client's platform should be notified.

This process is not working and as a consequence, the indexation status view is not working. Moreover, the layer is not being activated automatically either.

Datatype X not found

The Problem

Trying to reindex the search catalog via CLI produces an error saying the datatype was not found.


[DEVELOPER_A]
Btw, we've noticed that API reindex works only when we're logged to app.doofinder.com and go to the search engine. If we don't do it, we get info that the type of product was not found.

(…)

we do this:

  • start the shop
  • do bin/magento index:reindex - when it comes to reindex catalogsearch_fulltext we're getting this error: type product not found (when trying to add or delete)
  • go to the app.doofinder.com, login to our Account, choose the Magento2 search engine
  • reindexing was successful

(…)

perhaps this is because our Doofinder project is on Docker? When we launch Docker and try do run reindex, we get this error. We try again and the error occurs again. We go to app.doofinder.com, log in, choose search engine for Magento, then launch reindex in the console and it finally works. It happens every time we launch the project on Docker.


[DEVELOPER_B]
I am not aware of your development environment. Do you have a Doofinder docker container? Or just a Magento container that makes request to Doofinder production environment?

It makes sense that some request not work with Doofinder development environment because there are some subtle differences.

Anyhow, please explain in details how is your environment so I could try to guess where is the problem.


[DEVELOPER_A]
our docker container is built from php:7.0-apache.

Currently, we're working on Magento 2.1.12 with Sample Data, but the problem occured also on Magento 2.2.3.

There is nothing more. It might be some problems with the docker environment. If this is the only case, then there's not much sense in debugging it.


[DEVELOPER_B]
It is a little weird that there are some issues working with a docker container but not working in a real environment.

Maybe there are some initialization that does not run on docker for whatever reason. If you think this is just a docker issue we could forget about this. But if this happens in a real environment let us know. We will try to fix it as fast as we can.


(Some time later…)

[USER_A]
We have an error on (…) production when we launch:

php bin/magento indexer:reindex catalogsearch_fulltext

The error by the Magento Module is « Not Found: Datatype "product" not found »

[Magento 2] - Study alternative to Token Based Authentication

We have encountered recently with some Magento 2 issues with token authentication.

The problem is that Adobe has deactivated token-based authentication due to security problems, the good news is that they have enabled an option in the store configuration that allows you to reactivate this form of authentication, so we can continue working as before.

Even so, we should study the alternatives that we can implement to avoid using this authentication method that Adobe qualifies as insecure.

Link to the Adobe documentation.

Not registered handle cms_block_listing_data_source

When the module is enabled, I have the error :
Not registered handle cms_block_listing_data_source
when I am going in backoffice on the cms block grid

The problem is appeared too in cms page grid and in a grid of a personal module.

Have you a solution for this problem ?

I use the last release

Error: Call to undefined method Smile\ElasticsuiteCore\Search\Request\Query\Filtered::getMust()

Magento v2.4.1
Modules:

Error after changing

Stores > Configuration > Catalog > Catalog > Catalog Search

to Doofinder.

Error: Call to undefined method Smile\ElasticsuiteCore\Search\Request\Query\Filtered::getMust() in /var/www/share/m24.klimaworld.com/htdocs/vendor/doofinder/doofinder-magento2/Search/Filters.php:46
--
Error: Call to undefined method Smile\ElasticsuiteCore\Search\Request\Query\Filtered::getMust() in /var/www/share/magento/htdocs/vendor/doofinder/doofinder-test-lightsaml2/Search/Filters.php:46
Stack trace:
#0 /var/www/share/magento/htdocs/vendor/doofinder/doofinder-test-lightsaml2/Search/Adapter/AllFetcher.php(57): Doofinder\Feed\Search\Filters->get(Object(Smile\ElasticsuiteCore\Search\Request))
#1 /var/www/share/magento/htdocs/vendor/doofinder/doofinder-test-lightsaml2/Search/Adapter.php(54): Doofinder\Feed\Search\Adapter\AllFetcher->fetch(Object(Smile\ElasticsuiteCore\Search\Request))
#2 /var/www/share/magento/htdocs/vendor/test-lightsaml/module-search/Model/SearchEngine.php(42): Doofinder\Feed\Search\Adapter->query(Object(Smile\ElasticsuiteCore\Search\Request))
#3 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/Interception/Interceptor.php(58): test-lightsaml\Search\Model\SearchEngine->search(Object(Smile\ElasticsuiteCore\Search\Request))
#4 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/Interception/Interceptor.php(138): test-lightsaml\Search\Model\SearchEngine\Interceptor->___callParent('search', Array)
#5 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/Interception/Interceptor.php(153): test-lightsaml\Search\Model\SearchEngine\Interceptor->test-lightsaml\Framework\Interception\{closure}(Object(Smile\ElasticsuiteCore\Search\Request))
#6 /var/www/share/magento/htdocs/generated/code/test-lightsaml/Search/Model/SearchEngine/Interceptor.php(23): test-lightsaml\Search\Model\SearchEngine\Interceptor->___callPlugins('search', Array, Array)
#7 /var/www/share/magento/htdocs/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Search/Request/Product/Coverage/Provider.php(106): test-lightsaml\Search\Model\SearchEngine\Interceptor->search(Object(Smile\ElasticsuiteCore\Search\Request))
#8 /var/www/share/magento/htdocs/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Search/Request/Product/Coverage/Provider.php(95): Smile\ElasticsuiteCatalog\Search\Request\Product\Coverage\Provider->loadProductCounts()
#9 /var/www/share/magento/htdocs/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Search/Request/Product/Aggregation/Provider/FilterableAttributes/Modifier/Coverage.php(120): Smile\ElasticsuiteCatalog\Search\Request\Product\Coverage\Provider->getSize()
#10 /var/www/share/magento/htdocs/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Search/Request/Product/Aggregation/Provider/FilterableAttributes/Modifier/Coverage.php(59): Smile\ElasticsuiteCatalog\Search\Request\Product\Aggregation\Provider\FilterableAttributes\Modifier\Coverage->getCoverageRates(1, 'catalog_view_co...', NULL, Array, Array)
#11 /var/www/share/magento/htdocs/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Search/Request/Product/Aggregation/Provider/FilterableAttributes.php(81): Smile\ElasticsuiteCatalog\Search\Request\Product\Aggregation\Provider\FilterableAttributes\Modifier\Coverage->modifyAttributes(1, 'catalog_view_co...', Array, NULL, Array, Array)
#12 /var/www/share/magento/htdocs/vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Request/ContainerConfiguration.php(156): Smile\ElasticsuiteCatalog\Search\Request\Product\Aggregation\Provider\FilterableAttributes->getAggregations(1, NULL, Array, Array)
#13 /var/www/share/magento/htdocs/vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Request/ContainerConfiguration/Aggregation/Resolver.php(37): Smile\ElasticsuiteCore\Search\Request\ContainerConfiguration->getAggregations(NULL, Array, Array)
#14 /var/www/share/magento/htdocs/vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Request/Builder.php(205): Smile\ElasticsuiteCore\Search\Request\ContainerConfiguration\Aggregation\Resolver->getContainerAggregations(Object(Smile\ElasticsuiteCore\Search\Request\ContainerConfiguration), NULL, Array, Array)
#15 /var/www/share/magento/htdocs/vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Request/Builder.php(147): Smile\ElasticsuiteCore\Search\Request\Builder->getContainerAggregations(Object(Smile\ElasticsuiteCore\Search\Request\ContainerConfiguration), NULL, Array, Array)
#16 /var/www/share/magento/htdocs/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ResourceModel/Product/Fulltext/Collection.php(570): Smile\ElasticsuiteCore\Search\Request\Builder->create(1, 'catalog_view_co...', 0, 0, NULL, Array, Array, Array, Array)
#17 /var/www/share/magento/htdocs/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ResourceModel/Product/Fulltext/Collection.php(195): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection->loadProductCounts()
#18 /var/www/share/magento/htdocs/generated/code/Smile/ElasticsuiteCatalog/Model/ResourceModel/Product/Fulltext/Collection/Interceptor.php(23): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection->getSize()
#19 /var/www/share/magento/htdocs/vendor/test-lightsaml/module-catalog/Model/ResourceModel/Product/Collection.php(2360): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection\Interceptor->getSize()
#20 /var/www/share/magento/htdocs/generated/code/Smile/ElasticsuiteCatalog/Model/ResourceModel/Product/Fulltext/Collection/Interceptor.php(599): test-lightsaml\Catalog\Model\ResourceModel\Product\Collection->addMediaGalleryData()
#21 /var/www/share/magento/htdocs/vendor/creativestyle/magesuite-content-constructor-frontend/DataProviders/ProductCarouselDataProvider.php(180): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection\Interceptor->addMediaGalleryData()
#22 /var/www/share/magento/htdocs/vendor/creativestyle/magesuite-content-constructor-frontend/Model/Component/ProductCarousel.php(36): MageSuite\ContentConstructorFrontend\DataProviders\ProductCarouselDataProvider->getProducts(Array, true)
#23 /var/www/share/magento/htdocs/vendor/creativestyle/magesuite-content-constructor-frontend/view/frontend/templates/component/product_carousel.phtml(28): MageSuite\ContentConstructorFrontend\Model\Component\ProductCarousel->getProducts()
#24 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/TemplateEngine/Php.php(71): include('/var/www/share/...')
#25 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Element/Template.php(273): test-lightsaml\Framework\View\TemplateEngine\Php->render(Object(MageSuite\ContentConstructorFrontend\Block\Component\ProductCarousel\Interceptor), '/var/www/share/...', Array)
#26 /var/www/share/magento/htdocs/generated/code/MageSuite/ContentConstructorFrontend/Block/Component/ProductCarousel/Interceptor.php(131): test-lightsaml\Framework\View\Element\Template->fetchView('/var/www/share/...')
#27 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Element/Template.php(303): MageSuite\ContentConstructorFrontend\Block\Component\ProductCarousel\Interceptor->fetchView('/var/www/share/...')
#28 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Element/AbstractBlock.php(1111): test-lightsaml\Framework\View\Element\Template->_toHtml()
#29 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Element/AbstractBlock.php(1115): test-lightsaml\Framework\View\Element\AbstractBlock->test-lightsaml\Framework\View\Element\{closure}()
#30 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Element/AbstractBlock.php(675): test-lightsaml\Framework\View\Element\AbstractBlock->_loadCache()
#31 /var/www/share/magento/htdocs/vendor/creativestyle/magesuite-content-constructor-frontend/Block/Component/AbstractComponent.php(80): test-lightsaml\Framework\View\Element\AbstractBlock->toHtml()
#32 /var/www/share/magento/htdocs/generated/code/MageSuite/ContentConstructorFrontend/Block/Component/ProductCarousel/Interceptor.php(68): MageSuite\ContentConstructorFrontend\Block\Component\AbstractComponent->toHtml()
#33 /var/www/share/magento/htdocs/vendor/creativestyle/magesuite-content-constructor-frontend/Block/Component.php(115): MageSuite\ContentConstructorFrontend\Block\Component\ProductCarousel\Interceptor->toHtml()
#34 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Element/AbstractBlock.php(1111): MageSuite\ContentConstructorFrontend\Block\Component->_toHtml()
#35 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/Cache/LockGuardedCacheLoader.php(136): test-lightsaml\Framework\View\Element\AbstractBlock->test-lightsaml\Framework\View\Element\{closure}()
#36 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Element/AbstractBlock.php(1133): test-lightsaml\Framework\Cache\LockGuardedCacheLoader->lockedLoadData('BLOCK_component...', Object(Closure), Object(Closure), Object(Closure))
#37 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Element/AbstractBlock.php(675): test-lightsaml\Framework\View\Element\AbstractBlock->_loadCache()
#38 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(566): test-lightsaml\Framework\View\Element\AbstractBlock->toHtml()
#39 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(542): test-lightsaml\Framework\View\Layout->_renderBlock('componentb0ba')
#40 /var/www/share/magento/htdocs/generated/code/test-lightsaml/Framework/View/Layout/Interceptor.php(149): test-lightsaml\Framework\View\Layout->renderNonCachedElement('componentb0ba')
#41 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(497): test-lightsaml\Framework\View\Layout\Interceptor->renderNonCachedElement('componentb0ba')
#42 /var/www/share/magento/htdocs/generated/code/test-lightsaml/Framework/View/Layout/Interceptor.php(140): test-lightsaml\Framework\View\Layout->renderElement('componentb0ba', false)
#43 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(594): test-lightsaml\Framework\View\Layout\Interceptor->renderElement('componentb0ba', false)
#44 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(544): test-lightsaml\Framework\View\Layout->_renderContainer('content', false)
#45 /var/www/share/magento/htdocs/generated/code/test-lightsaml/Framework/View/Layout/Interceptor.php(149): test-lightsaml\Framework\View\Layout->renderNonCachedElement('content')
#46 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(497): test-lightsaml\Framework\View\Layout\Interceptor->renderNonCachedElement('content')
#47 /var/www/share/magento/htdocs/generated/code/test-lightsaml/Framework/View/Layout/Interceptor.php(140): test-lightsaml\Framework\View\Layout->renderElement('content', false)
#48 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(594): test-lightsaml\Framework\View\Layout\Interceptor->renderElement('content', false)
#49 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(544): test-lightsaml\Framework\View\Layout->_renderContainer('main', false)
#50 /var/www/share/magento/htdocs/generated/code/test-lightsaml/Framework/View/Layout/Interceptor.php(149): test-lightsaml\Framework\View\Layout->renderNonCachedElement('main')
#51 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(497): test-lightsaml\Framework\View\Layout\Interceptor->renderNonCachedElement('main')
#52 /var/www/share/magento/htdocs/generated/code/test-lightsaml/Framework/View/Layout/Interceptor.php(140): test-lightsaml\Framework\View\Layout->renderElement('main', false)
#53 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(594): test-lightsaml\Framework\View\Layout\Interceptor->renderElement('main', false)
#54 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(544): test-lightsaml\Framework\View\Layout->_renderContainer('columns', false)
#55 /var/www/share/magento/htdocs/generated/code/test-lightsaml/Framework/View/Layout/Interceptor.php(149): test-lightsaml\Framework\View\Layout->renderNonCachedElement('columns')
#56 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(497): test-lightsaml\Framework\View\Layout\Interceptor->renderNonCachedElement('columns')
#57 /var/www/share/magento/htdocs/generated/code/test-lightsaml/Framework/View/Layout/Interceptor.php(140): test-lightsaml\Framework\View\Layout->renderElement('columns', false)
#58 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(594): test-lightsaml\Framework\View\Layout\Interceptor->renderElement('columns', false)
#59 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(544): test-lightsaml\Framework\View\Layout->_renderContainer('main.content', false)
#60 /var/www/share/magento/htdocs/generated/code/test-lightsaml/Framework/View/Layout/Interceptor.php(149): test-lightsaml\Framework\View\Layout->renderNonCachedElement('main.content')
#61 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(497): test-lightsaml\Framework\View\Layout\Interceptor->renderNonCachedElement('main.content')
#62 /var/www/share/magento/htdocs/generated/code/test-lightsaml/Framework/View/Layout/Interceptor.php(140): test-lightsaml\Framework\View\Layout->renderElement('main.content', false)
#63 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(594): test-lightsaml\Framework\View\Layout\Interceptor->renderElement('main.content', false)
#64 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(544): test-lightsaml\Framework\View\Layout->_renderContainer('page.wrapper', false)
#65 /var/www/share/magento/htdocs/generated/code/test-lightsaml/Framework/View/Layout/Interceptor.php(149): test-lightsaml\Framework\View\Layout->renderNonCachedElement('page.wrapper')
#66 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(497): test-lightsaml\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper')
#67 /var/www/share/magento/htdocs/generated/code/test-lightsaml/Framework/View/Layout/Interceptor.php(140): test-lightsaml\Framework\View\Layout->renderElement('page.wrapper', false)
#68 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(594): test-lightsaml\Framework\View\Layout\Interceptor->renderElement('page.wrapper', false)
#69 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(544): test-lightsaml\Framework\View\Layout->_renderContainer('root', false)
#70 /var/www/share/magento/htdocs/generated/code/test-lightsaml/Framework/View/Layout/Interceptor.php(149): test-lightsaml\Framework\View\Layout->renderNonCachedElement('root')
#71 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(497): test-lightsaml\Framework\View\Layout\Interceptor->renderNonCachedElement('root')
#72 /var/www/share/magento/htdocs/generated/code/test-lightsaml/Framework/View/Layout/Interceptor.php(140): test-lightsaml\Framework\View\Layout->renderElement('root', true)
#73 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Layout.php(963): test-lightsaml\Framework\View\Layout\Interceptor->renderElement('root')
#74 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/Interception/Interceptor.php(58): test-lightsaml\Framework\View\Layout->getOutput()
#75 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/Interception/Interceptor.php(138): test-lightsaml\Framework\View\Layout\Interceptor->___callParent('getOutput', Array)
#76 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/Interception/Interceptor.php(153): test-lightsaml\Framework\View\Layout\Interceptor->test-lightsaml\Framework\Interception\{closure}()
#77 /var/www/share/magento/htdocs/generated/code/test-lightsaml/Framework/View/Layout/Interceptor.php(347): test-lightsaml\Framework\View\Layout\Interceptor->___callPlugins('getOutput', Array, Array)
#78 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Result/Page.php(258): test-lightsaml\Framework\View\Layout\Interceptor->getOutput()
#79 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/View/Result/Layout.php(171): test-lightsaml\Framework\View\Result\Page->render(Object(test-lightsaml\Framework\App\Response\Http\Interceptor))
#80 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/Interception/Interceptor.php(58): test-lightsaml\Framework\View\Result\Layout->renderResult(Object(test-lightsaml\Framework\App\Response\Http\Interceptor))
#81 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/Interception/Interceptor.php(138): test-lightsaml\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#82 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/Interception/Interceptor.php(153): test-lightsaml\Framework\View\Result\Page\Interceptor->test-lightsaml\Framework\Interception\{closure}(Object(test-lightsaml\Framework\App\Response\Http\Interceptor))
#83 /var/www/share/magento/htdocs/generated/code/test-lightsaml/Framework/View/Result/Page/Interceptor.php(95): test-lightsaml\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)
#84 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/App/Http.php(120): test-lightsaml\Framework\View\Result\Page\Interceptor->renderResult(Object(test-lightsaml\Framework\App\Response\Http\Interceptor))
#85 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/Interception/Interceptor.php(58): test-lightsaml\Framework\App\Http->launch()
#86 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/Interception/Interceptor.php(138): test-lightsaml\Framework\App\Http\Interceptor->___callParent('launch', Array)
#87 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/Interception/Interceptor.php(153): test-lightsaml\Framework\App\Http\Interceptor->test-lightsaml\Framework\Interception\{closure}()
#88 /var/www/share/magento/htdocs/generated/code/test-lightsaml/Framework/App/Http/Interceptor.php(23): test-lightsaml\Framework\App\Http\Interceptor->___callPlugins('launch', Array, Array)
#89 /var/www/share/magento/htdocs/vendor/test-lightsaml/framework/App/Bootstrap.php(263): test-lightsaml\Framework\App\Http\Interceptor->launch()
#90 /var/www/share/magento/htdocs/index.php(39): test-lightsaml\Framework\App\Bootstrap->run(Object(test-lightsaml\Framework\App\Http\Interceptor))
#91 {main}

Error when compile

Magento CLI 2.3.0

"doofinder/doofinder-magento2": "0.1.11-beta"

i get :

Declaration of Doofinder\Feed\Search\IndexerHandler::isAvailable() must be compatible with Magento\Framework\Indexer\SaveHandler\IndexerInterface::isAvailable($dimensions = Array) in /app/vendor/doofinder/doofinder-magento2/Search/IndexerHandler.php on line 13

ALL SITES DOWN After last update

Magento 2.3.5 p2
update doofinder-magento2 0.5.0 > 0.5.6 ( cf screen )
Capture d’écran de 2022-07-27 14-49-30

1: causes a code injection in the middle of the snippet in the call function of doofinder:
currency and language. When the tokens are populated :

var dfUrl = '//cdn.doofinder.com/media/js/doofinder-classic.7.latest.min.js';
  (function(c,o,k,e){
	**currency: 'EUR',
	language: 'fr',** var r,t,i=setInterval(function(){t+=c;r=typeof(require)==='function';
  if(t>=o||r)clearInterval(i);if(r)require([k],e)},c)})(100, 10000, dfUrl, function(doofinder){
    doofinder.classic.setLayers([{
      "queryInput": "#search",
      "hashid": 'xxxxxxxxxxxxxxxxxxxxxxxxx',
      "zone": "eu1",
      "display": {
        "lang": "fr",
        "width": "70%",
        "align": "center"
      },
      "mobile": {
    "maxWidth": 1024
  }
    }]);
  });

2 : causes the complete crash of the site if the information is not found:
Capture d’écran de 2022-07-27 14-57-39

Got error 'PHP message: PHP Fatal error: Uncaught TypeError: strpos() expects parameter 1 to be string, null given in /home/deploy-prod/www/releases/20220727120455/vendor/doofinder/doofinder-magento2/Helper/StoreConfig.php:813\nStack trace:\n#0 /home/deploy-prod/www/releases/20220727120455/vendor/doofinder/doofinder-magento2/Helper/StoreConfig.php(813): strpos(NULL, 'language:')\n#1 /home/deploy-prod/www/releases/20220727120455/vendor/doofinder/doofinder-magento2/Helper/StoreConfig.php(420): Doofinder\\Feed\\Helper\\StoreConfig->include_locale_and_currency(NULL, 'fr', 'EUR')\n#2 /home/deploy-prod/www/releases/20220727120455/vendor/doofinder/doofinder-magento2/Block/Display/Layer.php(31): Doofinder\\Feed\\Helper\\StoreConfig->getDisplayLayer()\n#3 /home/deploy-prod/www/releases/20220727120455/var/view_preprocessed/pub/static/vendor/doofinder/doofinder-magento2/view/frontend/templates/display/layer.phtml(1): Doofinder\\Feed\\Block\\Display\\Layer->getDisplayLayer()\n#4 /home/deploy-prod/www/releases/20220727120455/vendor/mag...

nb: We have 3 sites present under the same back office, 2 using doofinder, the last not using it.
except the activation of the module is done in global config.
We had to revert to version 0.5.0 after 2 hours of research, so we can't update to the latest version

can you do something ? please

[Magento] Calculate the special_price taking into account the custom price rules

Currently, we are not taking into account the custom price rules defined in Magento to calculate the special_price.
We should check if any of these rules are applicable to each product and reflect it in the special_price.

We should also keep in mind that these rules vary depending on the date and can be programmed to apply in a specific date range, even updating the discount past a date.
We have to find a solution so that the prices are updated every time the rule changes, perhaps by scheduling an index shortly after each date the rule changes

Related ticket:
https://doofinder.freshdesk.com/a/tickets/80985

Documentation:
https://experienceleague.adobe.com/docs/commerce-admin/marketing/promotions/catalog-rules/price-rules-catalog.html?lang=en

[Magento] Refactoring the way we treat website, store and storeview

Currently we use the magento website as a doofinder store and the magento storeview as an SE, which can potentially lead to collisions between SEs that have the same installation.

To avoid this it is recommended to use magento stores conceptually as doofinder stores, so that different magento storeviews can have the same language and currency without colliding (by belonging to different doofinder layer installations).

Both the possible programmatic approaches for this and the consequences for customers working with the current structure should be studied.

Magento 2 - Simple product belonging to configurable product not updating on update_on_save

When update_on_save is active, and you make changes to a simple product related with a configurable one, there is a couple of problems:

  • The product is stored in the database for indexing (as it should), but when the cron job arrives and tries to take this products, it won't; and in consequence, it won't index any information related to it.

  • When this problem gets corrected, if this simple product price is changed, it will index it's new price but it won't do it with it's parent product, leading this to a potential unstable state of it's pricing. A possible solution would be to reindex the configurable product anytime a simple product belonging to a configurable one is indexed (by adding it to the table too).

Magento2 - Bug when indexing special price

Hay un problema en la indexación de precios cuando se tienen configurado un "special price".

Tenemos en Magento los campos:

  • price (precio original)
  • special_price (precio de oferta)

En Doofinder se está indexando:

  • price -> campo special_price de Magento + IVA
  • sale_price -> campo special_price de Magento sin IVA

En ningún caso se indexa el campo price de Magento, por lo que no se puede mostrar el precio original tachado en la capa.

Tickets relacionados:
https://doofinder.freshdesk.com/a/tickets/77768
https://doofinder.freshdesk.com/a/tickets/79362
https://doofinder.freshdesk.com/a/tickets/76091

Redesign platforms configuration - Magento

  • In the case of this platform, only the token and the website_id should be moved.
  • These fields are stored in the store creation endpoint call. We would only have to indicate that the place where it is stored is Store.options.
  • There are no custom or image fields in our databases because they are stored in the client database.
  • Finally go through all the sites from which these fields are called (mainly in doofeeds) to change that they try to get it from Store. In case of not finding the options try to search in Datasource, this last one should only be done until all the data has been migrated.
  • Create a script that migrates the options from datasource.options to store.options.

Missing database table prefix

On module
Model/ProductRepository.php there is a select not using database table prefix

$categoryPaths = $connection->fetchCol(
$connection->select()
->from('catalog_category_entity', ['path'])
->where('entity_id IN (?)', array_keys($categoryIds))
);

No images in search result

It's been several months that i have this bug, but i can not find solution. Images only appears for new products. Currently, i have last version (0.1.11).

doofinder

Magento2 - Send full language code to create-store endpoint

Currently only the ISO code of the language is sent in each Search Engine when the installation request is made to the create-store endpoint. The complete language code (language-region) must be sent. E.g.: es-ES, es-MX, en-EN, en-GB...

Check if the platform supports the use of region codes in the language. If it does not, we discard the task.

View installed Magento plugin version

Objetivo: Facilitar a soporte la gestión de tickets de Magento

Crear un endpoint en el plugin de Magento que nos diga la versión actual del plugin instalada.
Este endpoint podrá ser ampliable para mostrar más información que se requiera acerca del estado de la instalación.

Problem with strings that can't be translated

On a customer feed we see the attribute availability with the label indexed in english:

{
"availability": "in stock",
"best_price": 2.99,
"categories": [
"Consumibles > Gas y CO2 > CO2",
"Restock"
],
"created_at": "2022-03-28 10:35:19",

When we search for the place where those labels are created we found these methods returning plain strings, they should probable be better returning the same strings with the translation function __('in stock')

/**
* Get product 'out of stock' label
*
* @return string
*/
private function getOutOfStockLabel(): string
{
return 'out of stock';
}
/**
* Get product 'in stock' label
*
* @return string
*/
private function getInStockLabel(): string
{
return 'in stock';
}

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.