Question:
I have developed a dynamic page titled “Product”. The purpose of this page is to showcase products from various categories, with the selection being dynamically determined based on the title of the current page. This title can be retrieved using the getCurrentItem()
function. For the layout of the product display, I am utilizing the grid gallery template from Wix Stores.
My requirement is to dynamically alter the category of the grid gallery each time the page loads. This way, only products from a specific category will be displayed in the grid gallery. While there is an option to manually select a category in the grid gallery settings, I am seeking a solution that allows this selection to be dynamic.
Product:
Wix-Stores, Wix-velo, Grid-Gallery, Dynamic Product Page
What are you trying to achieve:
As depicted in the aforementioned screenshot, there is an option within the grid gallery settings labeled “Which category to display?”. While it’s possible to manually adjust this setting, I require a dynamic solution due to the nature of the page. Specifically, I need the category to change dynamically based on the name provided in the Velo code. Upon page load, is there a way to accomplish this using Velo code?
What have you already tried:
I have attempted to utilize repeaters to populate the products, following the guide available at this resource: Resource . However, I found that repeaters do not offer all the functionalities that are essential for a product page, especially when compared to Wix Stores. Therefore, using repeaters seems to be irrelevant and not beneficial for my needs.
Kindly help me with this, if you have any way to achieve this or something similar to achieve what i want. Thanks