Skip to content

مشکل در ترتیب نمایش گروه ها ویژگی یک محصول: #81

Description

@Hamed3045

دسته بندی خودرو با شناسه 10 هست:
با این ترتیب گروه ها رو چک کنید:
/api/Category/get-attribute_groups-by-category/{categoryId}

{

  "succeeded": true,
  "message": "گروه‌های ویژگی برای دسته‌بندی با شناسه 10 با موفقیت دریافت شدند.",
  "resultData": [
    {
      "name": "رم و حافظه ذخیره‌سازی",
      "description": "رم و حافظه ذخیره‌سازی",
      "displayOrder": 1,
      "attributes": [
        {
          "name": "ظرفیت حافظه رم (RAM)",
          "type": 2,
          "isRequired": true,
          "isGroupBased": true,
          "displayOrder": 0,
          "isHighlight": true,
          "isVariantCreator": false,
          "attributeValues": [],
          "attributeGroupIds": [],
          "productIds": [],
          "id": 2084,
          "dateCreated": "2025-12-09T06:19:27.0641124",
          "lastModifiedDate": "2026-07-10T14:10:05.30959"
        },
        {
          "name": "ظرفیت حافظه داخلی",
          "type": 2,
          "isRequired": true,
          "isGroupBased": true,
          "displayOrder": 0,
          "isHighlight": false,
          "isVariantCreator": true,
          "attributeValues": [],
          "attributeGroupIds": [],
          "productIds": [],
          "id": 2088,
          "dateCreated": "2025-12-09T06:19:50.0903254",
          "lastModifiedDate": "2026-07-10T14:10:05.3095949"
        },
        {
          "name": "نوع حافظه رم (RAM)",
          "type": 2,
          "isRequired": true,
          "isGroupBased": true,
          "displayOrder": 2,
          "isHighlight": true,
          "isVariantCreator": false,
          "attributeValues": [],
          "attributeGroupIds": [],
          "productIds": [],
          "id": 2085,
          "dateCreated": "2025-12-09T06:19:32.7663364",
          "lastModifiedDate": "2026-07-10T14:10:05.3095915"
        },
        {
          "name": "فرکانس حافظه رم (RAM)",
          "type": 2,
          "isRequired": true,
          "isGroupBased": true,
          "displayOrder": 3,
          "isHighlight": false,
          "isVariantCreator": false,
          "attributeValues": [],
          "attributeGroupIds": [],
          "productIds": [],
          "id": 2086,
          "dateCreated": "2025-12-09T06:19:38.230186",
          "lastModifiedDate": "2026-07-10T14:10:05.3095925"
        },
        {
          "name": "سایر توضیحات حافظه رم (RAM)",
          "type": 3,
          "isRequired": true,
          "isGroupBased": true,
          "displayOrder": 4,
          "isHighlight": false,
          "isVariantCreator": false,
          "attributeValues": [],
          "attributeGroupIds": [],
          "productIds": [],
          "id": 2087,
          "dateCreated": "2025-12-09T06:19:44.4555372",
          "lastModifiedDate": "2026-07-10T14:10:05.3095941"
        },
        {
          "name": "نوع حافظه داخلی",
          "type": 3,
          "isRequired": true,
          "isGroupBased": true,
          "displayOrder": 5,
          "isHighlight": false,
          "isVariantCreator": false,
          "attributeValues": [],
          "attributeGroupIds": [],
          "productIds": [],
          "id": 2089,
          "dateCreated": "2025-12-09T06:19:55.0703668",
          "lastModifiedDate": "2026-07-10T14:10:05.3095964"
        },
        {
          "name": "مشخصات حافظه داخلی",
          "type": 3,
          "isRequired": true,
          "isGroupBased": true,
          "displayOrder": 6,
          "isHighlight": false,
          "isVariantCreator": false,
          "attributeValues": [],
          "attributeGroupIds": [],
          "productIds": [],
          "id": 2090,
          "dateCreated": "2025-12-09T06:20:00.4301594",
          "lastModifiedDate": "2026-07-10T14:10:05.3095972"
        }
      ],
      "attributeIds": [],
      "id": 1024,
      "dateCreated": "0001-01-01T00:00:00",
      "lastModifiedDate": "2026-07-10T14:14:40.3151286Z"
    },
    {
      "name": "ویژگی تست",
      "description": "گروه تست",
      "displayOrder": 2,
      "attributes": [
        {
          "name": "متن تست",
          "type": 0,
          "isRequired": true,
          "isGroupBased": true,
          "displayOrder": 1,
          "isHighlight": false,
          "isVariantCreator": false,
          "attributeValues": [],
          "attributeGroupIds": [],
          "productIds": [],
          "id": 2142,
          "dateCreated": "2026-07-09T18:47:14.9497401",
          "lastModifiedDate": "2026-07-10T14:10:05.3095888"
        },
        {
          "name": "عدد",
          "type": 1,
          "isRequired": true,
          "isGroupBased": true,
          "displayOrder": 2,
          "isHighlight": false,
          "isVariantCreator": false,
          "attributeValues": [],
          "attributeGroupIds": [],
          "productIds": [],
          "id": 2145,
          "dateCreated": "2026-07-09T18:47:35.3846302",
          "lastModifiedDate": "2026-07-10T14:10:05.309589"
        },
        {
          "name": "چک باکس دارد / ندارد",
          "type": 4,
          "isRequired": true,
          "isGroupBased": true,
          "displayOrder": 3,
          "isHighlight": false,
          "isVariantCreator": false,
          "attributeValues": [],
          "attributeGroupIds": [],
          "productIds": [],
          "id": 2146,
          "dateCreated": "2026-07-09T18:47:59.6905881",
          "lastModifiedDate": "2026-07-10T14:10:05.3095894"
        }
      ],
      "attributeIds": [],
      "id": 1013,
      "dateCreated": "0001-01-01T00:00:00",
      "lastModifiedDate": "2026-07-10T14:14:40.3151447Z"
    }
  ],
  "errors": [],
  "warnings": []
}

در بالا ترتیب گروه به شکل زیر هست:
اول رم و حافظه ذخیره‌سازی با displayOrder : 1
بعد
دوم ویژگی تست با displayOrder : 2

ولی با api زیر ترتیب گروه محصول میگیریم فرق داره:
/api/Product/get-attribute_groups-by-product/{productId}

{

  "succeeded": true,
  "message": "تعداد 2 گروه ویژگی برای محصول 1033 واکشی شد.",
  "resultData": [
    {
      "id": 1024,
      "name": "رم و حافظه ذخیره‌سازی",
      "description": "رم و حافظه ذخیره‌سازی",
      "displayOrder": 7
    },
    {
      "id": 1013,
      "name": "ویژگی تست",
      "description": "گروه تست",
      "displayOrder": 0
    }
  ],
  "errors": [],
  "warnings": []
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions