Forum Replies Created

Viewing 15 replies - 31 through 45 (of 55 total)
  • Thread Starter hellpunch

    (@hellpunch)

    Type 4 cart icon bugs

    View post on imgur.com

    • This reply was modified 5 years, 3 months ago by hellpunch.
    Thread Starter hellpunch

    (@hellpunch)

    Awesome, thanks. I didn’t know you could change like this. less stupid codes, faster the pages 😀

    • This reply was modified 5 years, 3 months ago by hellpunch.
    Thread Starter hellpunch

    (@hellpunch)

    So i got a small code (probably not the prettiest) working but tell me if there is a ‘in theme’ solution

    function remove_sidebar() {
    	if (is_cart() || is_checkout() || is_account_page() || is_shop())
    	{
    		?>
    		<script>
    			jQuery( "aside" ).remove();
    		</script>
    		<style>
    		@media (min-width: 768px) {
       				[data-sidebar] {
        				--sidebarWidth: 0%;
       				}
    			}
    		</style>
    		<?php
    		return false;
    	}
    	return true;
    }
    
    add_filter( 'is_active_sidebar', 'remove_sidebar', 10, 2 );
    • This reply was modified 5 years, 3 months ago by hellpunch.
    Thread Starter hellpunch

    (@hellpunch)

    Not really. Wanted to know a way to disable sidebars altogether from those pages without disabling it from normal pages.

    To answer your question, it is less intuitive though that normal pages sidebar would flow into the woocommerce pages. But i can see the reasoning as you wouldn’t want, for example, a filter widget sidebar of woocommerce archive to get into the my account page, but you may also not want any sidebars from those pages.

    Also it is a bit bugged, here are some more screen from the cart page:

    View post on imgur.com

    Thread Starter hellpunch

    (@hellpunch)

    So, checked a bit more and the empty div shows when you put just the widget ‘cart’ on the sidebar in the cart page and payment page, in my account page it shows the cart on the sidebar. In any other case, it shows the whole widgets (search, comments, etc). Still don’t know if the sidebar of normal pages is a wanted feature for woocommerce cart/account/payment pages.

    • This reply was modified 5 years, 3 months ago by hellpunch.
    Thread Starter hellpunch

    (@hellpunch)

    I don’t know if it is wanted but here is a screen:

    View post on imgur.com

    So, in the previous reply, i was wrong, it does show whatever widget you put on the sidebar, even in cart page.

    • This reply was modified 5 years, 3 months ago by hellpunch.
    Thread Starter hellpunch

    (@hellpunch)

    any news?

    Thread Starter hellpunch

    (@hellpunch)

    Much appreciated, thanks x1000

    Thread Starter hellpunch

    (@hellpunch)

    Damn, how did i forget about that option, thanks again dude.

    Thread Starter hellpunch

    (@hellpunch)

    @creativethemeshq Hey, Thanks! It already works on archive pages, it was just for shortcodes.

    • This reply was modified 5 years, 3 months ago by hellpunch.
    Thread Starter hellpunch

    (@hellpunch)

    @creativethemeshq You are right in this regard, i didn’t notice. The default woocommerce ajax works even with shortcodes (only default shortcodes). So, we agree, it isn’t theme related but that wasn’t the case of this thread.

    The case was that, with this small piece of code ;

    remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' );
    add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_single_add_to_cart', 30 );

    In shop archive pages, YOUR ajax works even when woocommerce default ajax is DISabled. But is buggy when using shortcodes, even though i do get the quantity field of the single product page.

    I think i understand now that shortcodes are handled differently and need another type of implementation of ajax perhaps? and your single product ajax only works for single product pages and shop archive pages.

    Well in this case, if you want to help me further else but, the ajax issue is kinda solved. I’ll try to figure out how to add both the quantity input and make shortcode work with ajax. Thanks! (Don’t limit your ajax to only single product pages, leave as it is now so it can work on archive pages too, thanks!)

    • This reply was modified 5 years, 3 months ago by hellpunch.
    • This reply was modified 5 years, 3 months ago by hellpunch.
    • This reply was modified 5 years, 3 months ago by hellpunch.
    • This reply was modified 5 years, 3 months ago by hellpunch.
    • This reply was modified 5 years, 3 months ago by hellpunch.
    • This reply was modified 5 years, 3 months ago by hellpunch.
    • This reply was modified 5 years, 3 months ago by hellpunch.
    • This reply was modified 5 years, 3 months ago by hellpunch.
    • This reply was modified 5 years, 3 months ago by hellpunch.
    • This reply was modified 5 years, 3 months ago by hellpunch.
    • This reply was modified 5 years, 3 months ago by hellpunch.
    • This reply was modified 5 years, 3 months ago by hellpunch.
    Thread Starter hellpunch

    (@hellpunch)

    Hey, thanks for the patience.

    1) How did you list those products? I mean, using what? The ajax button on woocommerce gutenberg editor works, true, if i activate the default woocommerce ajax; that of the archive pages, but i don’t know how to add a quantity field so the problem isn’t solved, just moved (and it isn’t theme related so not a concern to you)

    2) yes, as i wrote, i was using shortcodes ( not woocommerce gutenberg ) to display specific categories, but, on a custom page, the ajax doesn’t work (is quite bugged actually, redirects you to the product page when you click add to cart) but the same ajax works on archive page, even disabling the default wooommerce archive pages ajax, with this small code (*).

    This was all done not using any page builder. Then I tried using britzy template to make woocommerce ‘pages’, but even there, it doesn’t work (probably uses woocommerce shortodes)

    Basically what i have is this; i change the ‘add to cart’ from any template loop (archive and any other) with the single product ‘add to cart’, where there is the quantity field, with this code:

    (*) remove_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’ ); // remove from archive page and any product cards

    add_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_single_add_to_cart’, 30 ); // add just the quantity one

    This makes it possible to use your single product ajax even on archive pages without enabling the woocommerce one but the same ajax doesn’t works on other pages. What is that i am missing?

    Thread Starter hellpunch

    (@hellpunch)

    Isn’t the ajax code already there? My case is that i am overwriting the overall add to cart button (woocommerce_template_loop_add_to_cart) to get quantity fields but, in any other page than the two mentioned, ajax is disabled.

    Thread Starter hellpunch

    (@hellpunch)

    The fact that it only works on two pages isn’t a limitation wrote by you?

    Thread Starter hellpunch

    (@hellpunch)

    Hello!

    Yes but i don’t have any specific page. Can’t i just call it to make it work on x page?

    My specific case was that it didn’t work on woocommerce shortcuts of specific categories that were put on other pages than the archive and single product pages.

    • This reply was modified 5 years, 3 months ago by hellpunch.
    • This reply was modified 5 years, 3 months ago by hellpunch.
Viewing 15 replies - 31 through 45 (of 55 total)