Skip Navigation

[Resuelto] Woocommerce store base page not applying view template

This support ticket is created hace 6 años, 6 meses. 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.

Etiquetado: 

This topic contains 15 respuestas, has 4 mensajes.

Last updated by Beda hace 6 años, 6 meses.

Assigned support staff: Beda.

Autor
Mensajes
#342666

I've successfully applied an archive view to all other woocommerce pages however the base URL doesn't seem to load the view and instead displays default woocommerce layout.

Shop Base (Not loading view): hidden link
Other Page (Loading View): hidden link

How can I apply the same view template to the shop base page?

#342710

Minesh
Supporter

Languages: Inglés (English )

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

Hello. Thank you for contacting the Toolset support.

If you want to customize your shop page using WooCommerce Views, you don't need to create a specific "page" to it with the Views shortcode(and then assign a shop page in WooCommerce settings). To do this correctly, all you need is to override this WooCommerce default shop page with Views WordPress archives.

In order to achieve this , please read following tutorial:
=> https://toolset.com/home/woocommerce-views/

To read the specific part on customizing the shop page, scroll down to section:
"Load products from the database and display them"

If you are looking to render view directly using your template file using PHP, please refer to the following link that may help you:
=> https://toolset.com/documentation/user-guides/views-api/

#343183

Hi Minesh,

I've followed those instructions and assigned the content template to the product archive view. This has worked for all shop subcategories but the WooCommerce 'shop' base page is not loading the content template like the article suggests it should.

Again you can view this by comparing my Woocommerce base page to a product category page:

Shop Base (Not loading view): hidden link
Other Page (Loading View): hidden link

HTTPAUTH Login
User: bdsmshop
Pass: Development!

#343186

On further investigation I think I've found some more relevant information.

In WooCommerce I have the following option set:

Shop Page Display: Show Categories & Subcategories

If I change this to "Show Products" the views template loads only products and displays as expected.
If I change this to "Show Both" the categories display first with no views template then the products display below them with the views template

I believe there must be a bug with either Views or WooCommerce Views that is not correctly applying the views template to the categories that appear when using the above option on the store base page.

#343214

Minesh
Supporter

Languages: Inglés (English )

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

First thing is to ensure that at least its not using the woocommerce core archive template. You should use the one supported by Views which is 'WooCommerce Views plugin default product archive template'.

Could you please check now:
=> hidden link

Please let me know, still you require further help.

#343299

Hi Minesh,

"WooCommerce Views plugin default product archive template" is selected and the problem still persists.

If it wasn't selected I would expect to be seeing the issue across all product archive views and not just the shop base page.

I am fairly confident this is an issue with the Views plugin support of the "Show Categories & Subcategories" WooCommerce setting under WooCommerce -> Settings -> Products -> Display -> Shop Page Display as I mentioned in my last comment.

#343508

Minesh
Supporter

Languages: Inglés (English )

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

Our developer has confirm this issue and they have already fixed this issue but the development version still needs to go through the QA process. The fix will be made available with next release.

Thank you for your patience.

#343850

Do you have a date for the new release?

Or do you have a beta I can use in the meantime?

#344017

Minesh
Supporter

Languages: Inglés (English )

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

I've send you the development version as well as the guide to follow on your registered email ID. Please check your inbox and let me know if this fix your issue.

#347759

Hi Minesh,

I didn't get a chance to try the development version you emailed but I did notice 1.11 was released publically.

I've updated to that and the issue is still there.

#347795

Luo Yang
Supporter

Languages: Inglés (English ) Chino simplificado (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Dear grant,

Minesh is not available for now, please update this thread if you need more assistance for it. thanks

#347851

Still need assistance.

As I guessed and minesh confirmed with your developers I have an issue with the WooCommerce shop base page when it's set to display subcategories and not products (See above).

I've updated to the 1.11 release which I believe was supposed to resolve the issue but it had no effect.

To see the issue in action:

Shop Base (Not loading view): hidden link
Other Shop Page (Loading View): hidden link

HTTPAUTH Login
User: bdsmshop
Pass: Development!

#347959

Since Minesh currently has a few days off, I will replace him here in the forum.
I hope this is OK for you.

Is this related to the full custom code we provided here?
https://toolset.com/forums/topic/pagination-issue-with-woocommerce-views-handling-subcategories-2/
https://toolset.com/forums/topic/woocommerce-category-archive-doesnt-work-with-both-products-and-sub-categories/

I recall those posts and we have used customized approaches, this could be the same issue here.

the Fix Minesh mentions is as far I understand from the internal issue tracker, not in Views but in Views WooCommerce.

That is released as WooCommerce Views 2.5.5 and available in your download area.

Please don't hesitate to inform me in case the issue persists

Thank you for your patience.

#347966

Hi Beda,

My apologies for the mix up. I can confirm the dev version Minesh emailed me was for WooCommerce Views 2.5.5 which has now been released. I've got that installed and followed the instructions he provided for setting the WooCommerce Views product-archive.php to a edited version of the default without the "woocommerce_product_subcategories()" function.

This has fixed the view not loading on the shop base page but it has caused the shop base page to load products and not the master categories as I had WooCommerce configured to.

I think the woo_has_product_subcategory() conditional must be returning false for the store base page and loading products when we really want it to return true to display the categories. Any way to get around this?

#347968

Thanks for the Details

I am checking this with the DEV of Views WooCommerce.

Please expect my informations here in the forum.

Thank you for your patience.