Bagisto Forum

    Bagisto

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

    How could store products and Category url same for PWA and web

    Knowledge Base
    2
    5
    795
    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.
    • Z
      Zakir last edited by

      Hi,
      I was trying to implement PWA as alternative of native mobile app .. but can see one problematic with URL are different for PWA and web !!
      due to its different it having difficulties redirection of url conversion , say I want to refer one product /category link to somewhere say in facebook store and wanted to redirect same product page in PWA for mobile user !! So How could achieve store products and Category url same for PWA and web !!

      Example: for PWA it appears like 'categories/7' and for web its '/electronics'
      https://demo.bagisto.com/pwa-103-54-150-148/mobile/categories/7
      https://demo.bagisto.com/marketplace-103-54-150-148/electronics

      also for product url:
      for PWA 'products/5' and for web '/black-headphones'

      https://demo.bagisto.com/pwa-103-54-150-148/mobile/products/5
      https://demo.bagisto.com/marketplace-103-54-150-148/black-headphones

      1 Reply Last reply Reply Quote 1
      • shubhwebkul
        shubhwebkul last edited by

        Hello there,

        We have not implemented the functionality you are referring in PWA.

        You have to create a new route in vue.js, and hit the newly created api with response the details which will contain the type (product / category) and further details of that.

        On the basis of response you can call the template.

        Let me know if you have any further query.

        Regards,
        Shubham Mehrotra

        Z 1 Reply Last reply Reply Quote 0
        • Z
          Zakir @shubhwebkul last edited by

          @shubhwebkul
          Hi,
          Still not clear how to achieve that , can you please give code example .

          1 Reply Last reply Reply Quote 1
          • shubhwebkul
            shubhwebkul last edited by shubhwebkul

            add a route here with path (path: '/:slug',) for redirection on the click of product and category, and create a component as well.

            after that hit the api (create a new one to fetch details) and render details based on the data fetched from the API.

            1 Reply Last reply Reply Quote 0
            • Z
              Zakir last edited by Zakir

              Hi,
              I am still finding a way how to route / redirect web store page to pwa store page..
              say with same storepage from web front store it will be redirect to pwa ..
              above use case is for mobile user .

              say for ..
              https://www.pickrocks.com/f9-3-in-1-tws-earphone-speaker-2-in-1-audifonos-hi-fi-stereo-sound-2000mah-large-capacity-charging-case
              to
              https://www.pickrocks.com/mobile/...
              can you please share development way with code example?

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