Skip Navigation

[Resolved] Correct Procedure for Displaying Woocommerce with Layouts & Starter Child part 5

This support ticket is created 7 years, 9 months 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 13 replies, has 3 voices.

Last updated by Beda 6 years, 11 months ago.

Assisted by: Beda.

Author
Posts
#418201

Hi guys !

We have spent a lot of time making Layouts work with Woocommerce,
and we have finalling achieved it with 3 child layouts.

We finally have the Products pages, Category/archive pages, and Shop page working.

We are doing our absolute best to NOT recode the woocommerce functionality, we don't want to REINVENT the wheel... !

However we have encountered an issue where the Search Results page stops working.

We need the Layout to display the woocommerce Search Results page correctly.

.

We created a child layout for the Shop page, which is very simple and just has the following content in a visual editor cell:

[product_categories parent="0"]

That is great, so the Shop page, which just lists the categories, now displays *close* to the native woocommerce behaviour again - finally.

We assigned that Layout, called Shop, ONLY to the Individual Page called Shop. It is NOT assigned to ANYTHING ELSE.

The shop page is here:
hidden link

.

There is another layout we created called Categories, which is assigned to:
- Custom Post Archives: Products
- Taxonomy Archives: Categories, Tags, Product Categories, Product Tags, Shipping Classes
- Main Archives: Search Results

Now in the Right Hand Column of the site, if we use the Woocommerce default search widget, the Search Results page doesn't work.

We expected the Search results page to show up with the Layout called Categories,
however it actually comes up with the Layout called Shop.

If we remove Shop from the Layout Use for the Shop page,
then the search results page appears to work again.

So for some reason the Shop Layout being assigned to the Shop Page,
is stopping the Search Results page from displaying correctly !!

.

Remember we do NOT want to RECODE all of Woocommerce's work.
That's why they have the Plugin - we don't have to rewrite the Plugin.

If you need, login details are in the first original thread which is:
https://toolset.com/forums/topic/correct-procedure-for-displaying-woocommerce-with-layouts-and-starter-child/

What needs to happen for the Search Results page to work as it should without the Shop Layout taking over it ??

thanks again,
Daniel

#418331

Can you please update the Toolset Products, before we proceed with eventual Issue Debugging?

This is a very important step.

Don't forget to make a full backup before the update.

I could not find any archive created with Toolset on that Site you mention.

But anyway, I went ahead and made some tests.

Your Layout settings are not respected.
WooCommerce does not use the native Search Archive Template.

As you can see this Query uses the correct Layout:
hidden link

I added a WordPress native Search Widget at the bottom of your Sidebar to show what I mean.

But the WooCommerce native search query is different.
It specifies a Post Type in the URL argument:
hidden link

It does not use WordPress templates.
Neither can Toolset edit them.

What you can do is either stick with the WooCommerce Search results being displayed by the Shop Layout, or, use the WordPress Search Widget but that will also query non-products.

Conclude:
It is not possible with Toolset to style the WooCommerce Search results with any other Layout but the one you assing to Shop.

This is not a BUG.
We simply can not override the WooCommerce Custom at the moment.

#418437

Hi Beda !

Thanks for your reply. Great, we have made backups
and updated all plugins to the latest versions.

We have not created any archives or anything.
We are doing our absolute best to not recode the woocommerce functionality,
we don't want to reinvent the wheel... !
We are trying to keep woocommerce as close as possible to it's native behaviour
with as little as possible interference/recoding.

All we have done is added the few lines of code into the child Layouts.

.

We don't understand what you have explained here.

We can see the Shop page is Definitely taking over the search page:
?s=1975&post_type=product

We can see that because the H1 "Categories" is appearing at the top.

.

In the Woocommerce search field, if we search "1967", then it takes us straight to that particular product, Piper.

Also in that field, if we search "1975", then although we intentionally have TWO 2 products that have "1975" in the description, it doesn't show the 2 results, but takes us to this Shop page !!

However if we DEACTIVATE both Layouts and Woocommerce Views,
then a woocommerce search correctly displays just the TWO 2 products ONLY that have "1975" in the description !

And your Search widget that you added doesn't return correctly at ALL !
If we search for either "1967" or "1975" then it just displays all the products !

.

So it appears that Layouts is messing up the Woocommerce Search behaviour.

What needs to happen to make Woocommerce Search Results work correctly again ??

thankyou !
Daniel

#419063

WooCommerce appends a Custom Query to the Search parameter.
It displays its results on the Shop Page.

Toolset can not change this.

If you happen to search with WooCommerce Search Widget the EXACT match of a product, it will directly load the product.
If more than one Products are matching your Search, it displays the Shop with the queried results.

Again, we can not change that.

WordPress native Searches do not append any Custom Query, and it uses the Search Archive to display results.
This can be styled by Layouts if Layouts is integrated in the relevant template (which Toolset Starter Theme does).

What you can do to fully control the Search results of Products you have to use a View.
That View should hold a Parametric Search for the relevant Fields and Taxonomies of your Products (if you wish to have Taxonomies included)
Then you can display the View Parametric Search with a Widget and its results on any Page you want.

This is described here:
https://toolset.com/learn/create-an-ecommerce-wordpress-site/search-filter-and-results/
https://toolset.com/learn/create-an-ecommerce-wordpress-site/
https://toolset.com/documentation/user-guides/front-page-filters/

#419101

Hi Beda !

Great, thanks for your reply.

Can you please confirm the following:

1)
For the WOOCOMMERCE Search Widget:

a. The Shop page has the URL of "/shop", and
b. The Search Results has the URL of "/?s=floyd&post_type=product"

So are you saying that although they have Completely Different URLS,
that the Search Results URL "/?s=floyd&post_type=product"
will actually display the contents of the SHOP page ??
Can you please confirm that is CORRECT or INCORRECT ?

.

2)
For the WORDPRESS native Search Widget that you added:

When searching for text that appears in ONLY 1 of the PRODUCTS in the site,
if I search for the word "Piper", which is ONLY in that 1 product,
then the Search Results URL "/?s=piper" actually displays EVERY product in the site !

When searching for text that appears in NORMAL text PAGES in the site,
if I search for the word "About", which definitely is in the About Us page,
then the Search Results URL "/?s=about" shows the search results area Empty !

So are you saying that if we use Layouts, then the NATIVE WordPress search
STOPS WORKING ALTOGETHER for both PRODUCTS and TEXT PAGES,
unless we Manually build a whole view search as you describe above ?
Can you please confirm that is CORRECT or INCORRECT ?

.

3)
Since turning on Layouts, and giving the first Child Layout the contents of just:
[wpv-post-title]
[wpv-post-body view_template='None']
Many pages have broken in the site, and then need
HAND CODING of their own INDIVIDUAL LAYOUT
otherwise the pages display EMPTY or INCORRECTLY !

A month or two ago, when we commenced down the path
of using Layouts to build our Page Structures,
we thought that ALL Pages / Products / Categories / Archives / Search Results / Plugins
would just display NORMALLY, without
WITHOUT NEEDING TO CREATE AN INDIVIDUAL LAYOUT FOR EACH ONE !

Therefore we are quite concerned that we might encounter elements in the future that may not display correctly.
This is Quite a Concern for us, because we are planning to use Layouts to run Every page from Top to Bottom
of EVERY SITE that we build in the long term future.

So far, pages that do not work without hand coding the contents in a new layout include:
- Shop
- Categories
- Products
- Woocommerce search results
- WordPress standard search results.

If we follow the simple process of turning on Layouts,
and giving the Child Layout the contents of just:
[wpv-post-title]
[wpv-post-body view_template='None']
Can you please give us a list of ALL pages that do NOT display correctly.

Can you please include ALL KNOWN standard WordPress
PAGES / ARCHIVES / SEARCH RESULTS,
and also ALL KNOWN PLUGINS
that do NOT display correctly with Layouts and [wpv-post-body],
and therefore will need us to build a complex INDIVIDUAL LAYOUT
just to display what they Should Natively display ?

Can you please just give us the LIST of these.
Please ensure you include all KNOWN PLUGINS in the LIST,
including: Woocommerce, WordPress Search Results, etc.

Because this is such a structurally significant thing,
you might want to consult the Developers of Toolset
to give us this LIST of things that stop working.

.

Thanks again.
We do appreciate toolset.
We just have serious concerns about Layouts.

thanks !
Daniel

#419232

I am consutlting with the Developers if it is possible to adjust Layouts to work as you expect it.

Please let me and the developers some time to analize this.

For the moment being I can not offer any other solutions, as this is how it works.
The Layout assigned to the Shop will display your WooCommerce Search results.

I can not provide any list of Plugins that are doing Custom Actions - it is a process for us as well, finding out which plugin does what.

Please await my reply here in the forum.

#419869

This is an update to inform you that the Developers are looking into possible solutions.

If we will release an update including a change, I can not yet tell.

I will update you here as soon I know more.

#421332

Hi guys !

Thanks for your confirmation that the Developers are looking at the solution.

Just touching base to see if you know approx how long ?

Our development has been at a standstill for 2 Months now due to these issues with Layouts,
and we can't go any further until this is resolved.

thanks again !
Daniel

#421399

When exactly our developers will release an Update including the required Fix is not up to us Supporters to determine.

Each issue reported in, whether a bug or a new feature request, is taken seriously into consideration.

It is given a high or low priority based on a number of factors.
Factors which those with the overview of all things related are in the best position to determine.

I do apologise any inconvenience this may cause.

Right now the only solution is to use the Layout assigned to the Shop, as this requires a bigger change in code.

#426599

This issue will not be addressed in the next release I fear.

I am awaiting more infos from the DEV Team

#426659

I just confirmation, that this will be addressed in Layouts 1.9, which is the next release AFTER the upcoming one.

I apologize any delay here.

I will now put this ticket to "Fixed in next release" status, which means it will be fixed in the over-next release.

#511537

I wanted to let oyu know that this is not fixed yet.
The Developers are working on it.

#524217

Hi Daniel,

I'm posting here to notify you that this issue os already fixed in the next Layouts release.

Please wait and we will notify you again once this release gets published.

Thanks.

#529122

This is fixed now.

Please report us other issues, in case there are any, in new tickets.

Thank you.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.