Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Connection with third party media application

    General Discussion
    2
    4
    220
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      k3rnel last edited by

      Currently we have media application in our website builder project where we keep our media file (images, videos, docs, etc. ...) we want to integrate that part with e-commerce platform. After the integration we want to be able to choose images from the media app and connect those images with products and categories, etc. How we can implement that part with bagisto? For example to store the media ids somewhere inside products or categories

      1 Reply Last reply Reply Quote 0
      • devansh-webkul
        devansh-webkul last edited by

        Hi @k3rnel,

        For this, first of all, you need a centralized table which holds all the values otherwise you need to loop all the model which associated with the images.

        For e.g. Product images and videos are inside the product_images and product_videos table. You need to start with making one common table for all assets. So that your looping can be easy and all assets will be at centralized.

        1 Reply Last reply Reply Quote 0
        • K
          k3rnel last edited by

          Hi @devansh-webkul ,

          Since we will be working with several entities, I propose this solution: we can create the media_references table. In which there will be columns: id | entity_id | entity_type | media_id | media_type (media_type is (video, image, docs, etc.)). This way we can connect media and entities by polymorphic relationships. What do you think about it?

          1 Reply Last reply Reply Quote 0
          • devansh-webkul
            devansh-webkul last edited by

            Hi @k3rnel,

            Yeah, exactly the main focus should be centralized everything. Because this will also help you to build a media module in your app as well like managing all media from a central place.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post