Skip Navigation

[Gelöst] woocomerce views plugin breaks the theme shop page

This support ticket is created vor 6 Jahren, 6 Monaten. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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)

Dieses Thema enthält 16 Antworten, hat 3 Stimmen.

Zuletzt aktualisiert von abdullahA-6 vor 6 Jahren, 5 Monaten.

Assistiert von: Luo Yang.

Author
Artikel
#852486
Capture.JPG

Hi,

activating the woocomerce view plugin breaks my shop page archive, or any product taxonomy archive for example : /brand/gopro if gopro was a product taxonomy and allowed to be archived.

the shop page would keep showing thousands of the same item please find attached image. and might say fatal error execution time exceeded. unless I deactivate.

I have found other threads on here addressing the same issue :
like :

https://toolset.com/forums/topic/activating-views-breaks-woocommerce-shop-page/

https://toolset.com/forums/topic/the-plugin-toolset-woocommerce-views-breaks-my-shop-page-when-activated/

and I am using a premium theme from themeforset too,

and my theme display the shop page and single page in very advanced nice looking that I want to really keep my theme archive,

but at the same time I need to use woocommerce views plugin for building sliders and a page that includes a filtering system using views and woocommerce views plugins together.

#855146

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - could you please share your shop page URL and few screenshots will illustrates what should be your expected output and what should be the current situation.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#881965
Woocommerce views issue -1.JPG

Hi, Menish,

sent you the credentials,

and this happens when the woocomerce views option are set to the default theme options :

thanks

#883185

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

the shop page would keep showing thousands of the same item please find attached image. and might say fatal error execution time exceeded. unless I deactivate.
==> Well - I'm not able to see thousands of images loading but I see normal shop page is loaded but I see the issue that footer is not loading.

I need to check this further - could you please send me copy of your site.
=> https://toolset.com/faq/provide-supporters-copy-site/

I have set the next reply to private which means only you and I have access to it.

#901134

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

I could not able to reach here but i will take a loot at this issue on Monday.

#902183

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

Thanks for sharing duplicator package.

I see that the issue happens with only your current theme. If I switch the theme to default 2016 or Storefront or GeneratePress this issue is not happening.

In order to minimize the cause of the issue and to ensure that the your theme is the issue:
Could you please try to resolve your issue by deactivating all third-party plugins and check the issue still persist with your theme.

Once you confirm this, I will report this to our next level support for further debug and if conflict with your theme and Toolset plugin confirmed we will send this to our compatibility department.

#903212

Hi Minesh,

Yes I did deactivate all the other plugins except for the woocommerce and all the toolset plugins, and the issue still persists

thanks

#903572

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

Well - could you please confirm that its not happening with the themes I mentioned. If I switch the theme to default 2016 or Storefront or GeneratePress this issue is not happening.

#903872

Hi Menish,

yes please confirm that, I deactivated all the plugins excepet for (toolset plugins, woocomerece) and changed the theme to different themes like (2016, astra, generatepress, storefront), and always set the woocomerece views plugin settings to the default theme templates, and the issue exists only when activating the theme I am using.

thanks

#903948

My theme archive-product.php

<?php
/**
 * The Template for displaying product archives, including the main shop page which is a post type archive
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/archive-product.php.
 *
 * HOWEVER, on occasion WooCommerce will need to update template files and you
 * (the theme developer) will need to copy the new files to your theme to
 * maintain compatibility. We try to do this as little as possible, but it does
 * happen. When this occurs the version of the template file will be bumped and
 * the readme will list any important changes.
 *
 * @see https://docs.woocommerce.com/document/template-structure/
 * @package WooCommerce/Templates
 * @version 3.4.0
 */

defined( 'ABSPATH' ) || exit;

get_header( 'shop' );

/**
 * Hook: woocommerce_before_main_content.
 *
 * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
 * @hooked woocommerce_breadcrumb - 20
 * @hooked WC_Structured_Data::generate_website_data() - 30
 */
do_action( 'woocommerce_before_main_content' );

?>
<header class="woocommerce-products-header">
	<?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>
		<h1 class="woocommerce-products-header__title page-title"><?php woocommerce_page_title(); ?></h1>
	<?php endif; ?>

	<?php
	/**
	 * Hook: woocommerce_archive_description.
	 *
	 * @hooked woocommerce_taxonomy_archive_description - 10
	 * @hooked woocommerce_product_archive_description - 10
	 */
	do_action( 'woocommerce_archive_description' );
	?>
</header>
<?php
if ( woocommerce_product_loop() ) {

	/**
	 * Hook: woocommerce_before_shop_loop.
	 *
	 * @hooked wc_print_notices - 10
	 * @hooked woocommerce_result_count - 20
	 * @hooked woocommerce_catalog_ordering - 30
	 */
	do_action( 'woocommerce_before_shop_loop' );

	woocommerce_product_loop_start();

	if ( wc_get_loop_prop( 'total' ) ) {
		while ( have_posts() ) {
			the_post();

			/**
			 * Hook: woocommerce_shop_loop.
			 *
			 * @hooked WC_Structured_Data::generate_product_data() - 10
			 */
			do_action( 'woocommerce_shop_loop' );

			wc_get_template_part( 'content', 'product' );
		}
	}

	woocommerce_product_loop_end();

	/**
	 * Hook: woocommerce_after_shop_loop.
	 *
	 * @hooked woocommerce_pagination - 10
	 */
	do_action( 'woocommerce_after_shop_loop' );
} else {
	/**
	 * Hook: woocommerce_no_products_found.
	 *
	 * @hooked wc_no_products_found - 10
	 */
	do_action( 'woocommerce_no_products_found' );
}

/**
 * Hook: woocommerce_after_main_content.
 *
 * @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
 */
do_action( 'woocommerce_after_main_content' );

/**
 * Hook: woocommerce_sidebar.
 *
 * @hooked woocommerce_get_sidebar - 10
 */
do_action( 'woocommerce_sidebar' );

get_footer( 'shop' );
#903960

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

So finally - I escalated this theme compatibility issue to our next level support for further debug, I will get in touch with you as soon as I know more.

#904917

Hello,

Minesh isn't available, I will take care of this thread, here is the feedback from our 2nd tier supporters:
Please provide below detailed information:
1) what exactly you plans to do with Toolset WooCommerce Views plugin.
2) The Toolset WooCommerce Views can help you customize the Woocommerce shop page and single product page, if you need customize it with your theme file, you can try this:
Dashboard-> Toolset->WooCommerce Views
You can theme files from your theme folder, for example:
select “Techmarket Theme Custom Product Archive Template” for his shop, in the WooCommerce settings, it seems that is what the Theme wants to output and it provides a template for it.
3) The duplicator package file you provided is too big to download, in order to duplicate the same problem, you just need to provide two files:
a) "Techmarket" Theme file
b) Your database dump file
You can put them into your google drive disk(or dropbox), then share the links in below private message box. thanks

#905964

Thanks for the details, I am downloading the files, will feedback if there is anything found

#906061

There is some compatibility problem with your theme file, in your case, you can force shop page to load template file from your theme folder, for example, add below codes into your theme/functions.php:

 
 
add_filter( 'template_include','wc_views_archivetemplate_loader', 999);
function wc_views_archivetemplate_loader($template){
  	
  	global $woocommerce;
  	
  	if (is_object($woocommerce)) {
  			
  		if ((is_shop()) ||
  			(is_product_category()) ||
  			(is_product_tag()) ||
  			(is_product_taxonomy())) {
				// use template file from parent theme folder
				$template = get_template_directory() . '/woocommerce/archive-product.php';
		}		    				
  	}

  	return $template;
}

More help:
Filters the path of the current template before including it.
https://developer.wordpress.org/reference/hooks/template_include/

#906139

Thanks a lot Luo!

That worked like a charm, this is what I have been looking for, works fine with archiving the product categories, sub-categories or any product taxonomy like brands, labels. and the shop page. the only drawback is the shop page now loads slower.
but that good for now

thanks again