You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can I create custom page for 'specific product' (auto select the product) so I don't need to choose product every time I create new image?
For example, I have 2 model from "Product" and "Image":
products:
Shirt (id = 1)
Dress (id = 2)
images:
Image A (for Shirt)
Image B (for Shirt)
Image C (for Dress)
Normally, I would create new image from "../public/admin/image" page
--> then create new image in "../public/admin/image/create"
--> choose the product
--> browse image
--> save
But I want to create new image directly from "../public/admin/product" page
--> choose product (dress)
--> then click a link like "add new image" and go to "../public/admin/image/create?productId=2"
--> browse image
--> save
Is there a way for me to make the product be auto-selected or cannot-be-changed when I used parameter create?productId=1 or do you have alternative way?
The text was updated successfully, but these errors were encountered:
If I understand correctly, shirts have 2 images, dresses only has one image. You want to show the right inputs depending on the product type (2 inputs for shirts, 1 for dress). If so, you can do that using a custom field type. You can create a new field type only for your project (let's say product_images.blade.php) that has some javascript in it. Depending on the product type (selected above) it would show the right inputs.
Can I create custom page for 'specific product' (auto select the product) so I don't need to choose product every time I create new image?
For example, I have 2 model from "Product" and "Image":
products:
images:
Normally, I would create new image from "../public/admin/image" page
--> then create new image in "../public/admin/image/create"
--> choose the product
--> browse image
--> save
But I want to create new image directly from "../public/admin/product" page
--> choose product (dress)
--> then click a link like "add new image" and go to "../public/admin/image/create?productId=2"
--> browse image
--> save
Is there a way for me to make the product be auto-selected or cannot-be-changed when I used parameter create?productId=1 or do you have alternative way?
The text was updated successfully, but these errors were encountered: