conedevelopment / bazar

Bazar is an e-commerce package for Laravel applications.
https://root.conedevelopment.com
MIT License
422 stars 56 forks source link

Product image folders #157

Closed dcbndev closed 3 years ago

dcbndev commented 3 years ago

Hello,

wanted to ask your opinion about storing each product's images into separate folders, named as product's slug for example. The idea is to structure the images into folders for readability, otherwise, when having 100+ products for example, it will be very hard to find the right images for the needed product, especially when having few variants with different images assigned. So I guess, you can create a folder with the product's slug as name when saving the product.

Best regards

iamgergo commented 3 years ago

Hi,

Well, I think the ID/slug-based separation is not what I want to implement if it's not necessary. Also, a media item can be attached to many other models as well, so we can't have separation like that.

However I understand what you say, and I think you are right about adding an easier way to scope down media items by its "parent" model.

Let me dig into how can it be done nicely.

Thanks!

iamgergo commented 3 years ago

So, as I said we can't use the product/category/etc. ID or slug as a root folder of the media items.

This is because a medium can be attached to any model basically, not only one.

However I think in the future it would be nice to add a dynamic way to easily scope down results in the media manager. We could use a github like search syntax:

name:photo-01 product:10,23 type:image

I don't think in the near future we'll do this, but it's good it came up, so we can return here, when it will be on the table again.

Thanks!

dcbndev commented 3 years ago

Thank you for your time on this topic!

The github search syntax like is interesting.

Looking forward for a solution for this, but I do understand you should focus on releasing the stable version first.