Using a migx tv to filter with msproducts


I am currently developing an e-commerce multi site. I need to filter out products base on its territory. To filter out products, I have created a migx tv named product_prices which has a listbox tv that contain all of the territories where the product maybe available e.g country 1==c1||country 2 ==c2||country 3 ==c3, etc. Also I have 2 date tvs, Deal start date & Deal end date (with date and time options) within this migx, so I can filter out special deal products when a territory has a promotion. I've tried using the code below but nothing happens
My migx tv

Any suggestions as to how to solve this?
Jevon Boyce
03 июня 2019, 23:22

Комментарии: 4

Василий Наумкин
04 июня 2019, 07:44
You need to understand how MIGX stores data in database before you could filter it by &where.
    Jevon Boyce
    04 июня 2019, 21:31
    It is stored in JSON format. Here is an example from the database

    [{"MIGX_id":"1","store_countries":"bb","dealstartdate":"2019-05-01 00:00:00","dealenddate":"2019-05-31 23:45:00","published":"1"}]
      Jevon Boyce
      04 июня 2019, 21:33
      Is there any docs that shows all of the possible operators for the where clause?
      Василий Наумкин
      04 июня 2019, 22:30
      I don't think that store all values in one JSON TV is good idea for filtering resource.

      Maybe it would better to split it to 3 separate TVs or miniShop2 options.
Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.