Skip Navigation

[Resolved] Woocommerce views template not applied to shop page

This thread is resolved. Here is a description of the problem and solution.

Problem:

Use Woocommerce views to display data on shop page, but I got: A blank page.

Solution:

The problem is in theme "astra child theme", you can copy theme file "archive.php" of parent theme "Astra", save it into your child theme folder, and test again.

Relevant Documentation:

This support ticket is created 3 years, 10 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 20 replies, has 2 voices.

Last updated by ralphG 3 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#1621455
PrtScr capture_2.jpg
PrtScr capture.jpg

I am trying to: Use Woocommerce views to display data on shop page

Link to a page where the issue can be seen: hidden link

I expected to see: The woocommerce views applied

Instead, I got: A blank page.
Each time I have to go to shop page and save it with block editor (without changing anything), to get the woocommerce views working again, and showing products.
The woocommerce views is set to be applied on shop page and product category page, and this bug does not occur on product category page.

#1622315
boutique.JPG

Hello,

I have tried the URL you mentioned above, I can see it works fine, here is the screenshot boutique.JPG.

And the problem you mentioned above is abnormal: Each time I have to go to shop page and save it with block editor (without changing anything) ...

Please check these:
1) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2020, and test again

2) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

3) If the problem still persists, please provide database dump file(ZIP file) of your website, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1626047

Also another question that on the subject,
since the woocommerce views allows only to customize the product loop,
how to do if I want to customize the shop page template ?

Like adding a background image to the header of the page and informations specific to the shop page, so not totally related to the product loop.

#1628475

Thanks for the details, I am downloading the files, will update here if there is any found

#1628533
boutique.JPG

I can install your database dump file in my localhost with a fresh WordPress installation + The latest version of Toolset plugins + WPML plugins.

Please try this:
Dashboard-> Toolset-> WooCommerce Views, in section "Product Archive Template File", choose option "WooCommerce Views plugin default product archive template", save and test again.

It works fine in my localhost, see screenshot boutique.JPG

#1628937

Hi, I tried but nothing has changed.

#1629681

There might be other compatibility issues in your website, see my above screenshot, it works fine in my localhost.

If you need assistance to locate the problem, please provide a test site with the same problem, fill below private message with test site credentials and FTP access, thanks

#1631317

The problem is in your theme "astra child theme", I have tried to switch to parent theme "Astra", it works fine, can you confirm it?

#1632413

It works indeed, but we did not made any significative changes to woocommerce in the child theme,
it's mainly for styles change.

We have deactivated some hooks in the functions.php and reactivated child theme to see if the error recurs.

#1632677

Since it is a compatibility problem with your theme files, in order to debug such kind of compatibility problem, please provide full copy of your website:
https://toolset.com/faq/provide-supporters-copy-site/

You can put the package file in your own google drive disk, share the link in below private message box.

#1638243

I am downloading the files, will update here if find anything

#1638277

Please try this:
Copy theme file "archive.php" of parent theme "Astra", save it into your child theme folder, and test again.

This works fine in my localhost.

#1639001
PrtScr capture_6.jpg

Ok done, I'll check tomorrow if it worked and if the shop page is displaying correctly.

Another thing, I tested on my end and kept activated the parent theme astra, but the next day the bug occurred again. (See screenshot).

#1639289
shop2.JPG

I have checked it in your test site:
hidden link

It works fine in my Chrome browser, see screenshot shop2.JPG

Is there any missing steps?
Please provide detail steps to duplicate the same problem

#1639973
PrtScr capture_8.jpg

Hi, indeed the shop page and categories archives seems to display again. But now inline styles are not loaded (styles defined in the toolset archive loop).

For the missing steps, the only changes we've done on the shop page are :
- adding a title and a short description to the shop page via default editor
- reactivating the default sorting of woocommerce, because the sorting in the loop provided by toolset plugin was not working as expected
To deactivate woocommerce default sorting we used this :
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );
remove_action( 'woocommerce_before_shop_loop' , 'woocommerce_result_count', 20 );

New threads created by Luo Yang and linked to this one are listed below:

https://toolset.com/forums/topic/but-now-inline-styles-are-not-loaded/

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