Home Forums WoodMart support forum issues updating Woodmart (Version: 8.3.9) to Update 8.4.0 or Update 8.4.1

issues updating Woodmart (Version: 8.3.9) to Update 8.4.0 or Update 8.4.1

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #713825

    marinigerardi
    Participant

    I’m having issues updating Woodmart (Version: 8.3.9). I can’t install newer versions because the “select options” feature for products in category grids is not working correctly. The button shrinks, and when hovering over it, the cart appears instead.

    I have set up an updated version of the site (8.4.1) on a test environment under the subdomain “test.marinigerardi.it”, so you can handle the situation without concerns. If you make any changes, please send me the details so I can replicate them on the main site.

    Please let me know.

    Kind regards,
    Antonio Gerardi
    Italy

    #713898

    Serg Sokhatskyi
    Keymaster
    Xtemos team

    Hi,

    We have checked your website and noticed that your child theme contains code (https://monosnap.ai/file/4ajHE4SGJK21FaNIPsMEn7LDGiv2Jf) that overrides the “Add to Cart” button structure, which was changed in the 8.4 update. Because of this, you will need to update your custom code to match the new structure .

    Kind Regards

    #713991

    marinigerardi
    Participant

    Hello, I had already cleaned up all the inserted code, but the problem still persists. I had already noticed this change in your structure, but I think the cause of the issue is something else. Please check again and verify it personally. You can clean up all the code, but nothing happens. I kindly ask you to review the site more carefully and let me know.

    Kind regards,
    Antonio

    #714023

    Serg Sokhatskyi
    Keymaster
    Xtemos team

    The button issue is caused by two factors:

    1. The fact that you have custom code that overwrites the button structure on the product loop.
    2. The fact that you are using the “Product Options and Price Calculation Formulas for WooCommerce – Uni CPO (Premium)” plugin, which also overwrites the add-to-cart button structure.

    So this issue can be resolved in two ways: The first is to remove the custom code that changes the button https://monosnap.ai/file/4ajHE4SGJK21FaNIPsMEn7LDGiv2Jf and disable the plugin that also changes the button https://monosnap.ai/file/45QIJ1wnQQNnLhl9Zg0NscvLoWJaNq, in which case the button will look normal https://monosnap.ai/file/uck4aKTgxfMMKUpuGaPsINVDOGjdhE. But if you want to continue using your plugin, the most convenient way would be to update your custom code in the child theme to the new button structure without deleting it, as was suggested in the previous message.

    You can study the new button structure by temporarily disabling the child theme and the mentioned plugin, but to summarize briefly, your add-to-cart button is missing https://monosnap.ai/file/LgCJNfZeB2hliQhdXetQnO5LBGrxaT the “add-to-cart-loop” class and a span tag around the link text inside for the styles to work properly https://monosnap.ai/file/jQiyidTEiVnvYDYnQjtSdv21JDhiHC.

    Kind Regards

    #714068

    marinigerardi
    Participant

    Hi,

    I have understood the issue regarding the “Product Options and Price Calculation Formulas for WooCommerce” (UNI CPO) plugin. This plugin is essential to my site, as I have been using it since the initial installation of your theme.

    I have already removed all the code snippets that were causing conflicts. Could you please provide a definitive solution to ensure full compatibility with UNI CPO? I plan to implement your fix directly into my Child Theme.

    Please let me know the detailed steps I need to follow.

    Kind regards, Antonio

    #714074

    Serg Sokhatskyi
    Keymaster
    Xtemos team

    Try to add the following PHP code snippet to the child theme functions.php file to do this

    add_filter( 'woocommerce_loop_add_to_cart_link', function( string $html, object $product ): string {
        if ( $product && $product->is_type( 'simple' ) && $product->is_purchasable() ) {
            /* La classe mg-detail-btn evita che WoodMart cerchi
               getComputedStyle su un elemento null (TypeError in console) */
            $html = sprintf(
                '<a href="%s" class="button product_type_simple add-to-cart-loop mg-detail-btn"><span class="wd-action-icon"><span class="wd-check-icon"></span></span><span class="wd-action-text">%s</span></a>',
                esc_url( get_permalink( $product->get_id() ) ),
                esc_html__( 'Vedi dettagli', 'woocommerce' )
            );
        }
    
        return $html;
    }, 10, 2 );

    Kind Regards

    #714139

    marinigerardi
    Participant

    Hi, The code didn’t fix the problem. Would you mind testing it yourself first before sending it over? Best, Antonio.

    #714178

    Serg Sokhatskyi
    Keymaster
    Xtemos team

    We tested this code before sending it to you, and it correctly modified the product button structure. Upon checking your website, we could not find the corresponding code in your child theme.

    As a demonstration, we have added the code to your child theme again, following the instructions from our previous message. Screenshot of the code in the child theme: https://monosnap.ai/file/LkfezHC8NrVnzOnufIBjjXs5gE7SZf

    After doing so, the button appeared correctly.
    Screenshot of the product card with the button: https://monosnap.ai/file/811qeXC1rl4stNUXLufcggpR5hDftB

    Please ensure the code is added properly to your child theme’s functions.php file as previously instructed. If the code does not work for you, please leave it in the functions.php file so we can investigate the cause and verify it was inserted without errors.

    Kind Regards

    #714200

    marinigerardi
    Participant

    Hi, sorry for the follow-up. Despite adding the code, clearing the cache, and checking in incognito mode, the problem persists on my end.

    Since this is a staging environment, feel free to make any changes or add any code needed to fix it. Just leave the changes live so I can verify the solution. Please take another look and get back to me.

    Kind regards,

    Antonio

    Attachments:
    You must be logged in to view attached files.
    #714207

    Serg Sokhatskyi
    Keymaster
    Xtemos team

    We have reviewed your website and noticed that the custom code was implemented incorrectly. Specifically, it was nested inside an some other action related to the “Thank You” page, which prevents the “buttons” code from executing on other pages of the site.

    In the following screenshot (https://monosnap.ai/file/QPeRULGzgaoFBOwEOGfXFwTnZ8lNm9), the red box highlights your add_action for the “Thank You” page, while the orange box indicates the custom “buttons” code we are currently discussing. Please pay close attention to the closing brackets at the end of the code following the orange section (https://monosnap.ai/file/TyMsG83zeE0gb55NMlNwjgQMnRucbT). Because the custom “buttons” code is placed inside another add_action, it will not function as intended.

    For the code to work correctly, both actions must be placed at the same level, one after another, without any nesting, as shown in the second screenshot (https://monosnap.ai/file/nzI7BqdgfQHXTwaAL1CEV08Add86fa).

    While we could potentially insert this code for you, we believe it is vital to explain the correct implementation method. This ensures you can successfully migrate the changes to your production site and add future code snippets without encountering similar errors.

    Kind Regards

    #714218

    marinigerardi
    Participant

    Hi, I made a huge oversight, sorry about that! I’ve now added the code to the main site and updated it—everything is running smoothly. Thanks for your help.

    All the best,
    Antonio, Italy

    #714288

    Serg Sokhatskyi
    Keymaster
    Xtemos team

    You are welcome!

    #714656

    marinigerardi
    Participant

    Hi, I noticed that after applying the fix with your code, the Blog link marked with the red arrow is no longer working. Could you please help me restore it?

    Best regards,

    Antonio

    Attachments:
    You must be logged in to view attached files.
    #714659

    Serg Sokhatskyi
    Keymaster
    Xtemos team

    Hi,

    This issue is not related to the product buttons or the custom code in your child theme. Instead, it stems directly from a bug in theme version 8.4.1, which has now been fixed via a patch. Please navigate to Tools -> Patcher and apply patch number 710625.

    Kind Regards

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