How could store products and Category url same for PWA and web
-
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/electronicsalso 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 -
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 -
@shubhwebkul
Hi,
Still not clear how to achieve that , can you please give code example . -
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.
-
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?