Replies: 3 comments 10 replies
-
Can you see them in the admin hub? How did you create the products, via the admin hub or via code? |
Beta Was this translation helpful? Give feedback.
10 replies
-
I've opened an issue for this #50 |
Beta Was this translation helpful? Give feedback.
0 replies
-
There is a PR which should address the issue discussed here #56 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I love this project specially the v2. I am using the 2.0-beta6 version.
I have a problem though, I've made 2 products just to try things out and when I get all products to my frontend with the the call below:
Route::get('/products', function (Request $request) { return \GetCandy\Models\Product::where('status', 'published')->with('productType', 'variants', 'associations')->get(); });
The response is this one:
[
{
"id": 1,
"product_type_id": 1,
"status": "published",
"attribute_data": {
"name": {},
"description": {}
},
"brand": "The freaky store",
"created_at": "2021-12-25T16:07:28.000000Z",
"updated_at": "2022-01-10T17:28:10.000000Z",
"deleted_at": null,
"product_type": {
"id": 1,
"name": "Stock",
"created_at": "2021-12-25T16:00:59.000000Z",
"updated_at": "2021-12-25T16:00:59.000000Z"
},
"variants": [
{
"id": 1,
"product_id": 1,
"tax_class_id": 1,
"tax_ref": null,
"unit_quantity": 10,
"sku": "900800700",
"gtin": "900800700",
"mpn": "900800700",
"ean": "900800700",
"length_value": null,
"length_unit": null,
"width_value": null,
"width_unit": null,
"height_value": null,
"height_unit": null,
"weight_value": null,
"weight_unit": null,
"volume_value": null,
"volume_unit": null,
"shippable": 1,
"stock": 2,
"backorder": 0,
"purchasable": "in_stock",
"created_at": "2021-12-25T16:07:28.000000Z",
"updated_at": "2022-01-10T16:34:55.000000Z",
"deleted_at": null
}
],
"associations": []
},
{
"id": 2,
"product_type_id": 1,
"status": "published",
"attribute_data": {
"name": {},
"description": {}
},
"brand": "The freaky store",
"created_at": "2022-01-10T17:46:58.000000Z",
"updated_at": "2022-01-10T17:46:58.000000Z",
"deleted_at": null,
"product_type": {
"id": 1,
"name": "Stock",
"created_at": "2021-12-25T16:00:59.000000Z",
"updated_at": "2021-12-25T16:00:59.000000Z"
},
"variants": [
{
"id": 2,
"product_id": 2,
"tax_class_id": 1,
"tax_ref": null,
"unit_quantity": 1,
"sku": "34455668",
"gtin": "34455668",
"mpn": "34455668",
"ean": "34455668",
"length_value": null,
"length_unit": null,
"width_value": null,
"width_unit": null,
"height_value": null,
"height_unit": null,
"weight_value": null,
"weight_unit": null,
"volume_value": null,
"volume_unit": null,
"shippable": 1,
"stock": 3,
"backorder": 0,
"purchasable": "in_stock",
"created_at": "2022-01-10T17:46:58.000000Z",
"updated_at": "2022-01-10T17:46:58.000000Z",
"deleted_at": null
}
],
"associations": []
}
]
So in "attribute_data" there are no product names or description in any languages. I've set up two languages.
Please help me.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions