I am working on a website that sell sim cards with phone plans of every country in the world in additions to renting phones and wifi hotpost for people that travels.
I have created a custom post types "Destinations" and made it have a relation with Woocommerce products. In this custom post type, the template would contain the following content:
- Country Name as the title
- Description
- Woocommerce variable products that are in relation with the post (about 3 products) with options display with images and not dropdown
- tabs with extra information.
1. How do I display the variable products on the custom post type template and display the variations with images and not a dropdown select?
2. For the tabs, I would like to create a repeatable group field called "Extra Info" and have it display/generate automatically a tab on the front-end. Is this possible to create? The repeatable group would 2 fields: one for the title of the tab and one for the content of the tab
I would appreciate any guidance on this projects.
Thanks
Hello,
Q1) How do I display the variable products on the custom post type template and display the variations with images and not a dropdown select?
There isn't such kind of built-in feature within Toolset Woocomerce Blocks plugin, see our document:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-154336
[wpv-woo-buy-or-select]
...
For variable products the Select options button will be displayed.
Q2) For the tabs...
There isn't such kind of built-in feature too, it needs to output the view's loop as Tabs, you might consider custom JS/CSS codes, for example:
Jquery UI Tabs
hidden link
Thank you for your answer.
1. I will check the link you send for the products display.
2. So I need to create a new custom post type "Extra info" (instead of repeatable group field) and make it have a relation to the custom post type "destinations" therefore I could use Views to generate Tabs. Am I understanding this correctly?
I think there are some misunderstandings:
1) Toolset repeatable field groups is based on one-to-many relationship, so you can get the same result with repeatable field groups or child post types.
2) The problem is Toolset Blocks/Views plugins can not output the results in "Tabs" layout mode by default, in order to achieve the "Tabs" feature, it needs custom JS/CSS codes, see the example I mentioned above:
hidden link
I found a solution on my own for the first question. For the second question, I will try your suggestions for the tabs and will come back with a new ticket if I need more help.
Thank you for your help.