Setono / SyliusFeedPlugin

Create feeds in your Sylius shop
MIT License
23 stars 45 forks source link

Add possibility to filter products on feed #84

Open lruozzi9 opened 1 year ago

lruozzi9 commented 1 year ago

We have the need to filter the products to insert into the feed. We have for example a feed with all the products, but we also have one more feed that contains a few products (existing in the first one) used to make more aggressive campaigns. Currently, the only way to achieve this need is by creating another channel with the limited collections of products enabled for that channel, but this solution is very difficult to maintain because, at every price change, for example, the store manager should change the price in both channels. If this is not done an error on the Google Ads checking is generated due to the inconsistent price between feed and website. Another solution could be the use of a custom label, but it seems that the new Google Ads campaign type has removed the custom labels in favor of the feed_label. But it looks like they have a different purpose than the current one we need to achieve. So, the only possible way is to create a collection of FeedFilter on the Feed entity (in the same way Sylius do with promotion rules and actions) so that can be customized by users with the addition of any custom filter. We already have reached this purpose, but applying this filter is very difficult on the plugin because of the orm-batcher and other things, for example, in our case, the filter works based on product variant codes and not on products.

So, what do you think of this? If you agree I will start to work on a PR, but so many changes and BC will be introduced I suppose and much effort should be implemented. Instead, if you don't want to introduce this kind of feature we will work on a different solution without wasting time in two. 😉

lruozzi9 commented 1 year ago

Hi @loevgaard, can you give us feedback on this? 😄