csonnek on "[Plugin: Jetpack by WordPress.com] Infinite Scroll won't work with WooCommerce product archive"

ساخت وبلاگ

Allyson Souza
Member
Posted 4 weeks ago #

Hi, I'm trying to use Infinite Scroll with WooCommerce to show products, but if I don't use infinite_scroll_query_args to set an offset, they repeat the first set of products. If I use infinite_scroll_query_args like that:

function jetpack_infinite_scroll_query_args( $args ) { $args['post_type'] = 'product'; $args['offset'] = 12; retu $args;
}
add_filter( 'infinite_scroll_query_args', 'jetpack_infinite_scroll_query_args' );

Defining an offset, they repeat always the same products in Infinte Scroll. How could I solve this?

Link: http://www.bethtokitaka.com.br/loja

Thanks!

https://wordpress.org/plugins/jetpack/

Could you let me know how the products are inserted on the page? Do you use a shortcode to add the products to the page?

Could you also let me know if the same thing happens when loading the Post Type's archive page, and when using one of the default themes, like Twenty Fifteen?

Thanks!

Allyson Souza
Member
Posted 4 weeks ago #

Hi Jeremy,

It's using the default WooCommerce loop for archive-products. I'll check the other points and then I give more information.

Allyson Souza
Member
Posted 4 weeks ago #

Updating the link where the error occurs: http://www.hastedesign.com.br/clientes/bethsandbox/loja/

Allyson Souza
Member
Posted 4 weeks ago #

I activated the twentyfifteen theme, acessed the WooCommerce shop page, and the problem persists (It displays a set repeated with the product already shown).

Maybe it's a problem of how WooCommerce create your loops?

Or a problem related to these issues offset parameter? https://codex.wordpress.org/Making_Custom_Queries_using_Offset_and_Pagination

I can't seem to be able to reproduce the issue with the Twenty Fifteen theme.

Could you try to deactivate all other plugins, one at a time, and let me know if you find a conflicting plugin?

Thanks!

Allyson Souza
Member
Posted 3 weeks ago #

I deactivated all plugins, switched to Twenty Fifteen and still having problems. If I just let Jetpack work by default, they repeat the displayed set of products in the first load.

If I post my code to set the offset in functions.php

function jetpack_infinite_scroll_query_args( $args ) { $args['offset'] = 12; retu $args;
}
add_filter( 'infinite_scroll_query_args', 'jetpack_infinite_scroll_query_args' );

It displays the same products ever, jumping 12 from the beginning.

Your Woocommerce settings must be different from mine. Could you go to Woocommerce > Settings > Products > Display in your dashboard, and let me know what your settings are?

Here are my settings:
http://i.wpne.ws/fzYX

Thank you.

Allyson Souza
Member
Posted 3 weeks ago #

Hi Jeremy,

I checked my settings in Display and there's no difference.
http://pt.sc/ayb0mm

Allyson Souza
Member
Posted 3 weeks ago #

I'll try to use a fresh install, with just WooCommerce and Jetpack and see what happens here.

Allyson Souza
Member
Posted 3 weeks ago #

Hi Jeremy,

I've instaled WooCommerce and Jetpack in a fresh WordPress install, used dummy content from WooThemes, and I still having problems, the same problem.

Sorry for the late reply, I missed your replies on that thread for some reason.

I still can't reproduce the issue I'm afraid. Could you contact us via this form, so we can run some more tests on your site with you?

Thanks!

Allyson Souza
Member
Posted 1 day ago #

Hi Jeremy,

Sorry too for the late reply. It's a project in finishing phase, and I cannot wait to find a solution, so I choose to use normal pagination. Sorry but I think it's not possible to test it in the production website, but I have reproduced the problem in a clean fresh install of WordPress + WooCommerce + Twenty Sixteen.

Have you contacted us via our contact form? As we're unable to reproduce, we may need to get more detailed information about your setup and other information that shouldn't be posted to a public forum.

If so, great - we'll be in touch soon. If not, please contact us and include a link to this thread so we can keep all your information together.

Let me know if you have any questions.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 239 تاريخ : پنجشنبه 6 خرداد 1395 ساعت: 23:04