Coupons sometimes show and sometimes not

  • Bodav
    Participant
    # 2 months, 1 week ago

    Hi, coupons in wp admin sometimes do show and sometimes the results is empty with zero results. This is the query I get when it does not work.
    I tried resync all data
    WPSOLR Log query =>
    Url: “/wp-admin/edit.php?post_type=shop_coupon&all_posts=1”
    Index: “freshuk_index1”
    Nb results shown: 100
    Total nb results: 10000
    Speed: 437 ms
    Query: {
    “from”: 0,
    “size”: 100,
    “sort”: [
    {
    “total_sales_f”: {
    “order”: “desc”
    }
    }
    ],
    “_source”: [
    “id”,
    “PID”,
    “type”,
    “meta_type_s”,
    “title”,
    “numcomments”,
    “comments”,
    “displaydate”,
    “displaymodified”,
    “*categories_str”,
    “author”,
    “*post_thumbnail_href_str”,
    “*post_href_str”,
    “snippet_s”
    ],

    Last seen: 2021-09-29 20:27:41 Asia/Jerusalem
    Total events: 1
    thats the query.
    why does it sort by sales? thats the sort i want on the front end. maybe because of that?
    it returns 0 results

    wpsolr
    Keymaster
    # 2 months, 1 week ago

    What happens if you remove ‘total_sales_f’ from your default search sort settings in screen 2.5 ?

    Bodav
    Participant
    # 2 months, 1 week ago

    Removed it. Working for now but should check few times because it sometimes worked before also.
    I really need it on front end though… Can it some how be devided front and back?

    wpsolr
    Keymaster
    # 2 months, 1 week ago

    I recommend to remove it for now.

    ‘total_sales_f’ can only apply on product archives: it will fail you queries on front-end or back-end for other archives.

    Bodav
    Participant
    # 2 months, 1 week ago

    So how can I show the products on front end in different default sort than new to old? Because now on shop page on top I have new products that never sold.. And it takes the most important space on the website.. People add to cart products on top, not on bottom

    wpsolr
    Keymaster
    # 2 months, 1 week ago

    You can add the sort to the shop/category links: ?wpsolr_sort=total_sales_str_desc

    wpsolr
    Keymaster
    # 2 months, 1 week ago

    It’s far from perfect, as the sort is deactivated when a filter is selected.
    But I have no better solution for now.

    Bodav
    Participant
    # 2 months, 1 week ago

    How do i add a sort just to shop/cat?

    Bodav
    Participant
    # 2 months, 1 week ago

    Can we add a solution to our custom work trello? Its much more important than the previous task actually… I will revert it for now so front end will be fine and we will pull the Coupons from zoho for now and not from backend

    wpsolr
    Keymaster
    # 2 months, 1 week ago

    This is a new requirement indeed.

    • This reply was modified 2 months, 1 week ago by wpsolr.
    Bodav
    Participant
    # 2 months, 1 week ago

    Yeah I know its new, I mean to add it as custom work number 2

    wpsolr
    Keymaster
    # 2 months, 1 week ago

    Please add the card in your custom work Trello dashboard.

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.