Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1465419

    Hi
    We want to use a WooCommerce shortcode like described here:

    Products Shortcodes

    On the page described below, we used it like this
    [products columns="3" on_sale="true" paginate="true"]
    This should show all product on sale with a pagination, but there is no pagination.
    When we us it like this
    [products columns="3" limit="12" on_sale="true" paginate="true"]
    it shows only 12 products but also without pagination.
    Also the dropdown, how much products should be shown (15, 30, 45) in the header does not work.
    Our question is, if this is an Enfold problem or a WooCommerce problem?
    Thanks very much.
    Best regards
    Mike

    #1465456

    Hey Michael,

    Thank you for the inquiry.

    Please try to add this hook in the functions.php file:

    function ava_woocommerce_pagination_actions() {
        add_action( 'woocommerce_pagination', 'woocommerce_pagination', 10 );
        add_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination', 10 );
        remove_action( 'woocommerce_after_shop_loop', 'avia_woocommerce_after_shop_loop', 10 );
    }
    add_action( 'init', 'ava_woocommerce_pagination_actions' );
    

    Then use this css code to adjust the style of the pagination.

    .template-shop .products {
      overflow: auto;
    }
    
    .woocommerce-pagination ul li {
      display: inline;
    }

    Best regards,
    Ismael

    #1465490

    Hi Ismael
    This code does nothing. It only “destroys” the normal pagination we already had. We still have no pagination on the mentionned page.
    I removed the code because it “destroys” the normal pagination we already had.
    See private content for details.
    Best regards
    Mike

    #1465534

    Hi,

    Thank you for the update.

    On our end, the pagination displays correctly when we implement the modifications. We may need to access the site to check the issue properly. Please clone the site to a staging environment and provide the WP and S/FTP details in the private field.

    Best regards,
    Ismael

    #1465570

    HI Ismael
    Our customer has no staging environment, but you can check on production environment. See private content section.
    By the way, is this a bug of Enfold, for that we have to use such code to have a pagination there?
    Best regards
    Mike

    #1465773

    Hi,

    Thank you for the info.

    We modified the filter a bit and updated the css code. Please check the link in the private field.

    Best regards,
    Ismael

    #1465804

    Hi Ismael
    Thanks very much.
    There is a pagination, but it looks different that the default pagination on the shop main page or on a product category page. There we have circles with the mage numbers.
    Also the dropdown to choose if it has to show 15, 30 or 45 products on one page does not work. on the shop main mage or on a product category page this also works.
    Are this Enfod or WooCommerce problems?

    #1466017

    Hi,

    It looks different because it is using the default WooCommerce pagination. Unfortunately, we cannot apply the theme’s pagination to the product shortcode. Please try using the Product Grid element instead, or use the following css code to adjust the style of the default pagination.

    .woocommerce-pagination ul li {
        display: inline;
        float: left;
        height: 35px;
        width: 35px;
        line-height: 35px;
        text-align: center;
        padding: 0;
        border-radius: 100px;
        margin-right: 3px;
        margin-left: 0;
        box-shadow: 0px 0px 1px 0px rgba(0,0,0,0.2);
    }

    Best regards,
    Ismael

    #1466085

    Hi Ismael
    Ah okey, so with WooCommerce shortcodes, the Enfold pagination does not work? This would be a nice extension of Enfold ;-)
    Anyway, your CSS code does not change anything, it is still the other pagination.
    Another question. As also the dropdowns at the top (“Zeige 15 Produkte pro Seite”) seems to not work, how we can hide them only on this page with CSS code?
    Best regards
    Mike

    #1466113

    Hi,

    Anyway, your CSS code does not change anything,

    Have you tried toggling or temporarily disabling the Enfold > Performance > File Compression settings?

    To hide the sorting dropdown, please add this css code:

    ul.sort-param.sort-param-count {
        display: none;
    }

    Best regards,
    Ismael

    #1466614

    Hi Ismael
    Thanks für the code to hide the sorting dropdown, this works.
    The navigation style still does not work, also after disabling the Enfold > Performance > File Compression setting.
    I see that the css code is in the stylesheet but the navigation does not change.
    Best regards
    Mike

    #1466706

    Hi,

    The style is applied to the pagination, but the circles are not visible because their background color is the same as the page’s background color. To change the background color, try adding the following css code:

    .woocommerce-pagination ul li {
        background: #f9efea;
        margin-bottom: 30px;
    }

    Please check the screenshot in the private field.

    Best regards,
    Ismael

    #1466711

    Hi Ismael
    Oh, I didn’t realize, that this is the same color, sorry ;-)
    Now it works fine, thanks very much.
    You cacn close this issue.
    Best regards
    Mike

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘WooCommerce Shortcode does not work correctly’ is closed to new replies.