Forum Replies Created

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter jonthi

    (@jonthi)

    Hi again,

    That worked just perfect, many thanks!!

    Case closed. πŸ™‚

    Have a nice sunday.

    Best regards,

    Thread Starter jonthi

    (@jonthi)

    Hi again,

    I found this code to be the issue, at least in Storefront theme, and the “new” Product Collection blocks. πŸ™‚ All other widgets seems to be centered, the old one for Woocommerce, but not the Product Collection blocks, no matter which settings I chose in the backend:

    <ul data-block-name="woocommerce/product-template" class="wc-block-product-template__responsive columns-5 wc-block-product-template wp-block-woocommerce-product-template is-layout-flow wp-block-product-template-is-layout-flow" data-wp-on--scroll="actions.watchScroll" data-wp-init="callbacks.initResizeObserver"><li class="wc-block-product post-801 product type-product status-publish has-post-thumbnail...
    ...
    </li></ul>


    ul, ol {
    margin: 0 0 1.41575em 3em;
    padding: 0;
    }

    The margin for “right” and “left” is causing it.

    Do you know why it might affect Storefront and some other themes? I have only tried with a few.

    Best regards

    Thread Starter jonthi

    (@jonthi)

    Thanks!! That worked like a charm I must say! πŸ™‚

    Left a review, it is impossible not to rank the plugin and support other than 5/5 of course.

    Have a great weekend.

    Thread Starter jonthi

    (@jonthi)

    Many thanks for the info, I am actually surprised by how great the support is here, every question has been answered or resolved, at least for me. πŸ™‚

    Thread Starter jonthi

    (@jonthi)

    Many thanks! πŸ™‚ Left a review, best support ever! 5/5

    Thread Starter jonthi

    (@jonthi)

    Hi again,

    Thanks for your reply and info.

    I am using the Storefront theme and have no other enhancing features regarding the design. πŸ™‚

    I have tried both with “full width” layout and “default” layout. I have also tried the product collection blocks for different standard pages, one set as the homepage, and others which are “standard”.

    The product collection blocks are not nested in other blocks, they are by “themself”. πŸ™‚

    It is only the “Product Collection” blocks that are misaligned, the archive pages and older “product blocks” for Woocommerce displays the products and categories in “center”.

    I have tried “Bestsellers”, “New products” and all the other blocks, the products are more to the right side, which is especially noticeable on mobile devices.

    Same goes with other themes, I have only tried a few though.

    Many thanks.

    Best regards,

    Thread Starter jonthi

    (@jonthi)

    Many thanks for your reply! πŸ™‚

    I tried the custom CSS snippet, but unfortunately it does not work. πŸ™

    I am currently using this CSS code to achieve two columns for products and categories, for the archive pages in Woocommerce. The code will also achieve two columns for classic Woocommerce blocks, like shortcodes for “Product categories” on the homepage:

    /* Two columns with products and categories on mobile - for Woo archive pages etc */

    @media screen and (max-width:767px){
    ul.products li.product {
    width: 47% !important;
    display: inline-block;
    vertical-align: top;
    margin-right: 10px;
    }
    ul.products li.product:nth-child(2n+2){
    margin-right:0px !important;
    }
    }

    The above code does not alter the new Product Collections block in any way, which is what I would like to have in two columns as well, for mobile devices. I tried your code:

    /* Two columns for product collection block on mobile */

    @media screen and (max-width: 767px) {
    .wc-block-grid.has-4-columns .wc-block-grid__products,
    .wc-block-grid.has-3-columns .wc-block-grid__products {
    grid-template-columns: repeat(2, 1fr) !important;
    }

    I cleared the cache and visited the page in private mode in the browser, no change unfortunately.

    Is there any other way this can be accomplished for the product collection blocks? As of now, they display the products in a row, on mobile devices, filling the screen and allowing for much scrolling. πŸ™

    Many thanks in advance.

    Best regards,

    Thread Starter jonthi

    (@jonthi)

    Thanks for the clarification, I will continue to use the shortcode aka. classic version, for standard pages / homepage.

    Best regards,

    Thread Starter jonthi

    (@jonthi)

    Hi,

    Many thanks for your reply!

    I have set a “standard page” as the homepage, and it is not working, which you also encountered.

    It is, however, working for a new standard page I created, which is not set as the homepage, exactly as you described. πŸ™‚

    Do you know how this can be resolved?

    Thanks again.

    Best regards,

    Thread Starter jonthi

    (@jonthi)

    Hi,

    This is not working, I have tried everything. πŸ™

    I also read here: Product Filters block Documentation – WooCommerce

    There are two primary ways to use the Product Filters block:

    1. OnΒ Archive TemplatesΒ (e.g., Product Catalog, Product Taxonomy templates):
      • You can add the Product Filters block anywhere on the templates page.
      • It will automatically apply filters to the products shown in the archive.
    2. On Standard Pages or Posts:
      • The Product Filters block must be added inside aΒ Product Collection blockΒ on Standard Pages or Posts
      • This ensures the filters apply only to the specific product collection displayed, maintaining accuracy and performance.

    As stated above, this means the filters block must be nested inside the product collection block, but it does not work. The filter block although works on Woocommerce archive pages, product lists.

    I am using Storefront and Woocommerce of the latest version, also WordPress latest version.

    Does anyone know how to resolve this?

    Many thanks,

    Best regards,

    Thread Starter jonthi

    (@jonthi)

    Hi,

    Many thanks for your reply.

    Unfortunately, the filter function does not appear at all in the frontend, when placing the block “above” the product collection block. πŸ™

    Here is how it looks like in the code, with the filter block above the product collection block (they are not nested now):

    <!-- wp:woocommerce/product-filters -->
    <div class="wp-block-woocommerce-product-filters wc-block-product-filters" style="--wc-product-filters-text-color:#111;--wc-product-filters-background-color:#fff"><!-- wp:woocommerce/product-filter-attribute {"displayStyle":"woocommerce/product-filter-chips"} -->
    <div class="wp-block-woocommerce-product-filter-attribute"><!-- wp:heading {"level":3,"style":{"spacing":{"margin":{"bottom":"0.625rem","top":"0"}}}} -->
    <h3 class="wp-block-heading" style="margin-top:0;margin-bottom:0.625rem">LENGTH</h3>
    <!-- /wp:heading -->

    <!-- wp:woocommerce/product-filter-chips -->
    <div class="wp-block-woocommerce-product-filter-chips wc-block-product-filter-chips"></div>
    <!-- /wp:woocommerce/product-filter-chips --></div>
    <!-- /wp:woocommerce/product-filter-attribute --></div>
    <!-- /wp:woocommerce/product-filters -->

    <!-- wp:woocommerce/product-collection {"queryId":4,"query":{"perPage":9,"pages":0,"offset":0,"postType":"product","order":"asc","orderBy":"title","search":"","exclude":[],"inherit":false,"taxQuery":{},"isProductCollectionBlock":true,"featured":false,"woocommerceOnSale":false,"woocommerceStockStatus":["instock","outofstock","onbackorder"],"woocommerceAttributes":[],"woocommerceHandPickedProducts":[],"filterable":true,"relatedBy":{"categories":true,"tags":true}},"tagName":"div","displayLayout":{"type":"flex","columns":3,"shrinkColumns":true},"dimensions":{"widthType":"fill"},"queryContextIncludes":["collection"],"__privatePreviewState":{"isPreview":false,"previewMessage":"Faktiska produkter kommer att variera beroende pΓ₯ vilken sida som visas."}} -->
    <div class="wp-block-woocommerce-product-collection"><!-- wp:woocommerce/product-template -->
    <!-- wp:woocommerce/product-image {"showSaleBadge":false,"imageSizing":"thumbnail","isDescendentOfQueryLoop":true} -->
    <!-- wp:woocommerce/product-sale-badge {"align":"right"} /-->
    <!-- /wp:woocommerce/product-image -->

    <!-- wp:post-title {"textAlign":"center","isLink":true,"style":{"spacing":{"margin":{"bottom":"0.75rem","top":"0"}},"typography":{"lineHeight":"1.4"}},"fontSize":"medium","__woocommerceNamespace":"woocommerce/product-collection/product-title"} /-->

    <!-- wp:woocommerce/product-price {"isDescendentOfQueryLoop":true,"textAlign":"center","fontSize":"small"} /-->

    <!-- wp:woocommerce/product-button {"textAlign":"center","isDescendentOfQueryLoop":true,"fontSize":"small"} /-->
    <!-- /wp:woocommerce/product-template -->

    <!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"center"}} -->
    <!-- wp:query-pagination-previous /-->

    <!-- wp:query-pagination-numbers /-->

    <!-- wp:query-pagination-next /-->
    <!-- /wp:query-pagination -->

    <!-- wp:woocommerce/product-collection-no-results -->
    <!-- wp:group {"layout":{"type":"flex","orientation":"vertical","justifyContent":"center","flexWrap":"wrap"}} -->
    <div class="wp-block-group"><!-- wp:paragraph {"fontSize":"medium"} -->
    <p class="has-medium-font-size"><strong>Inga resultat hittades</strong></p>
    <!-- /wp:paragraph -->

    <!-- wp:paragraph -->
    <p>Du kan prova <a class="wc-link-clear-any-filters" href="#">rensa alla filter</a> eller gΓ₯ till vΓ₯r <a class="wc-link-stores-home" href="#">butikens hem</a></p>
    <!-- /wp:paragraph --></div>
    <!-- /wp:group -->
    <!-- /wp:woocommerce/product-collection-no-results --></div>
    <!-- /wp:woocommerce/product-collection -->
    Thread Starter jonthi

    (@jonthi)

    Hi,

    I am so very sorry for the late reply. πŸ™

    A huge shoutout for superb support! Your suggestions worked like a charm.

    First I tried clearing the tables, downgrading to PHP 8.1, and checking everything again, with my hosting.

    Unfortunately that did not work.

    Then I upgraded to MariaDB 11.4, which was the latest, and only, version my hosting offered for new databases. I duplicated the database when creating the 11.4 version, and “poff”, it started to work again, the Action Scheduler. πŸ™‚

    I noticed the duplicated database had a file size of around 17 mb, while the 10.5 version was a 27 mb. Do you know if this is because compression/better handling in the MariaDB 11.4? I duplicated it with the exact same spec, only thing changed was the version 10.5 > 11.4.

    Everything seems to be working great.

    Best regards and thanks yet again.

    Thread Starter jonthi

    (@jonthi)

    Some of the hooks are:

    woocommerce_cancel_unpaid_orders

    wc_admin_daily_wrapper

    woocommerce_cleanup_personal_data

    woocommerce_scheduled_sales

    etc…

    Many thanks.

    Best regards,

    Thread Starter jonthi

    (@jonthi)

    Do anyone know if I may have broken my Woocommerce installation by doing this? Just replacing the Woocommerce folder in the plugin directory?

    Best regards,
    Jonathan

Viewing 14 replies - 1 through 14 (of 14 total)