Hey Yana,
The above code won’t work in your case, As their site says:
Ecwid stores the product data in a secure cloud storage. The product pages are displayed on the fly when a customer browses your store. Basically, the products are not stored on the website, that’s why the website search can not find product pages while searching through the site pages and blog posts.
So you need to enable the local storage mode for products, to do this go to WordPress Dashboard > Ecwid Store > Advanced and check the corresponding option.
For further assistance please see https://support.ecwid.com/hc/en-us/articles/360000633445-FAQ-about-Ecwid-stores-on-Wordpress#sitesearch or you can check this thread as well https://www.ecwid.com/forums/showthread.php?t=16449
Please note that we cannot provide support for third party plugins or scripts as our support policy states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X will need to be directed to the original developer.
Thank you for your understanding.