Skip Navigation

[Resolved] Woocommerce Product Page Search

This support ticket is created 6 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 9 replies, has 3 voices.

Last updated by Beda 6 years, 1 month ago.

Assisted by: Beda.

Author
Posts
#1134605

It was not my intention to display a conventional Shop page for this site but I do need a search result display.

Toolset has articles for both:

https://toolset.com/documentation/recommended-themes/toolset-divi-integration/list-posts-with-custom-searches-and-maps/

https://toolset.com/documentation/recommended-themes/toolset-divi-integration/creating-a-custom-shop-page-for-products-using-divi-builder-and-toolset/

For my site do I need one or both?

I need for visitors to be able to display thumbnail grid results from a search query.

What path do I follow for this display?

Thank you.

#1134947

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Chuck

WooCommerce uses two special templates, the template for the product archive (the shop page), and templates for individual products. Each of these feature special UI elements, e.g. Add to cart buttons, product galleries etc.

The integration with Toolset using the WooCommerce Views plugin works on two levels.

One is to let you wrest control away from WooCommerce for the two templates mentioned above so that you can design custom versions with Toolset.

The second is to add shortcodes that you can use to recreate the special UI elements in your custom templates (listed here: https://toolset.com/documentation/user-guides/views-shortcodes/).

If you do not need custom templates for the shop page or individual products then you may not need the integration plugin at all.

You can create a normal custom search View which happens to be for the product post type and add it to a page to display results much like you would for any other post type.

The question is whether you want to include any of the WC UI elements like add-to-cart buttons while listing the product results. If yes, then you would still need to use the WooCommerce Views plugin to make those shortcodes available, but you wouldn't need to create custom templates for the shop page or individual products.

#1135006

Hi and thank you for the reply.

My problem stems from the clients belief that the site does not offer convention retail products. To clarify things for me, I created two custom templates. 1. for the Home Page (which maybe I didn't need to create a template for this and could have used a regular page) and 2. for the Product page (which in this case will offer single item works of art).

One objective is to enable search results to display in a grid on a page. Can search results be considered the "Shop" page for this particular site?

#1135015

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I think it is largely a matter of preference.

You can create a View for the search which outputs its results in a grid and insert that on a static page. Voilá, you have search results shown on a grid on a page with a URL of your choice.

Or you can create a custom archive for products with search, output in just the same way as the View option, and this will appear at the shop page (and you can customise the URL of the shop page in the WC settings).

The result would be very similar.

If your client doesn't need a "shop" page as such, I would be inclined to go with adding a View to a static page.

Because of its special role, you can find various plugins competing to modify the shop page and introducing possible side-effects or complications. You wouldn't risk the same with a View on a static page.

#1135120

Nigel - Thank you for this information.

I would like to avoid any third-party plugin conflicts if possible. I see potential in static page solution.

If I understand correctly, the visitor can fill out a form and search, for example, paintings with a certain color, size, title or the year that it was dated such as 2018, etc and the results would display on a page in the grid layout I created with Divi Builder?

If the custom search places the search field form at the top of the page, where would the form be for the static page search?
If possible, I would prefer to place it on a Divi screen overlay anchored to a theme button link.

Is this a close understanding and possible?

#1136676

To create and insert Views, you can follow these steps:
https://toolset.com/documentation/user-guides/front-page-filters/#4-1-adding-the-custom-search-form-to-a-page-or-widget

You will be able to place the View Search and results on the same page or separately on the same page or even on 2 different pages (search and results page)

Most of its styling is done in the View itself and then that what is styled there, is added as ShortCode in your page.
The Theme will then render the page and usually, your content will show below the page's title as rendered by the Theme.
That's where you'd then also see your View.

#1136706

Beda,

Does it matter if I am using Divi Builder with Toolset? Is the tutorial for creating a search form the same?

#1136738

You will not use the DIVI (or any other) builder for the Search form.
Builders (DIVI's and others) can be used to style Content Templates.
Those can be applied to single posts and/or style the Loop Output (hence the results) of the Search.

The Search itself is styled with the Toolset GUI and manual HTML.
DIVI + Toolset requires special attention:
https://toolset.com/documentation/recommended-themes/toolset-divi-integration/matching-divi-styling-using-toolset/

The rest is explained here and pretty much the same as with other Builders or "just Toolset":
https://toolset.com/documentation/recommended-themes/toolset-divi-integration/

#1136840

Beda,

I'm about to follow the tutorial: https://toolset.com/documentation/user-guides/front-page-filters/#4-1-adding-the-custom-search-form-to-a-page-or-widget

and I like to know if I will be able to achieve the same form styling by default, as shown in the tutorial, or will I need additional custom CSS to get the same or similar styling?

#1137439

That Tutorial does not show how to style the forms or even suggest them to be styled in a certain way.
It is simply about inserting Views anywhere on any Theme you want to use.

If you refer to its screenshots, they are taken from a Site made with Toolset and some Custom CSS etc, styling required in every View to make it look good.
You can run thru the entire site, or use it for your own projects, using the Framework Installer Plugin.
https://toolset.com/account/downloads/#application-frameworks
The Screenshots where taken from the Real estate site.

You will need to apply custom CSS and HTML in most cases, and you will definitely need custom CSS and HTML when you use DIVI because of the reason I mentioned previously (bootstrap conflicts).

We cannot help with that kind of custom code as it's required knowledge to use Toolset.
However we can help with any aspect of Usage of Toolset or technical issues, please open one ticket each issue so we can help directly and effectively.

Thanks!