• Hi:

    I want to use the Upsells block in a site I’m building because I can style it and move it where I want it on the WooCommerce Single Product Template.

    But the default Upsells section, holdover from Classic, shows up too, even though I’m using the Upsells block. My understanding is the theme (Twenty Twenty-Four should be checking if the block is being used, and if so, not load the default Upsells block.

    I had a thread going in WooCommerce and eventually they said this is a problem coming from the Twenty Twenty-Four theme.

    I was working on a staging version of an existing site, which is built with a classic theme. Both Upsells were showing up.

    I put up a virtually empty site using Twenty Twenty-Four as the theme and installing a new WooCommerce. I turned off all additional plugins. The only activated plugin is WooCommerce.

    The WooCommerce Single Product Template had the Related Products block in it when I went to the Editor, with “Related by Products & Categories” both selected. I left them selected. I added the Upsells block. I had gone in and added three Upsell selections to the Product LInks for each of the 6 products WooCommerce loads for you to play with.

    When I go out front I still get the automated “You May Also Like” in the Product Details in addition to “Related Products” from the block and “Upsells” from the block.

    This isn’t a child theme. See: https://thdesigninc.com/dev/shop/
    Click on any of the products.

    Thanks.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi
    This is a bit difficult to explain but there is no way for this theme to conditionally check if a block is used (No matter if that block comes from a third-party plugin or not).
    The theme uses HTML and PHP files that places blocks, and nothing but blocks.
    There are no built in if / else conditions that displays one block instead of another, or disables a block.
    A check and condition like that would need to be part of the custom blocks.

    I understand that you already asked in the plugin support forum. And perhaps someone else has the answer, but I did not understand what you meant when you wrote that
    “the default Upsells section, holdover from Classic, shows up too”
    There is no such thing as a “default upsell section” built in this theme. I did not understand this part.
    Perhaps you had a plugin installed and then switched from a classic theme to a block theme and now the plugin settings are not showing up because the plugin does not work with block themes. I really can’t tell from this description:

    Thread Starter vytaulla51

    (@vytaulla51)

    Hi Caroline:

    Thanks for replying.

    If you use a classic wordpress theme with WooCommerce, and you make selections through admin > WooCommerce Products > Linked Products to be UPSELLS – they will appear on your single product pages. Styling them – moving them – there’s bunches of articles about having to work with actions and templates and CSS to move or style them but they are default – they show up at the bottom of single-product pages automatically.

    If you use WooCommerce with a block theme, you can place those Upsells in the Single Product Template where you want to using the Upsells block, and can do some styling through the editor as well.

    I’ve been working on a site, using Twenty Twenty-Four and Woocommerce and the default Upsells displays at the bottom of the single-product pages even though I ALSO am using the Upsells Block. I posted at the WooCommerce forum and after several rounds was told it’s the fault of the theme, not WooCommerce. Initially I was confused about what was happening and didn’t realize there WAS an Upsells block. See here: https://wordpress.org/support/topic/upsells-cross-sells-related-products-block-only-for-related/ If you read through it should make more sense. WooCommerce says the default Upsells shouldn’t happen on block themes, but it’s happening. They suggested posting on the Twenty Twenty-four Theme forum.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.