Click on a product swatch on archive pages if out of stock

This topic has 10 replies, 3 voices, and was last updated 2 months, 4 weeks ago ago by Andrew Mitchell

  • Avatar: ziga32
    ziga32
    Participant
    February 14, 2024 at 14:32

    Can I click on a product swatch on archive pages, to see the color, even if the color is unavailable?
    https://i.imgur.com/b9gi7Vi.png
    https://dev.ergo-vision.eu/pisarniski-stoli/#ergonomski-pisarniski

    9 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    February 15, 2024 at 05:48

    Hello @ziga32

    Thank you for reaching out to us with your query. We understand that you would like to know if it is possible to click on a product swatch on archive pages to preview the color, even when the color option is currently unavailable.

    We would like to inform you that our theme is designed to show the available color swatches for quick reference. However, if a color is not available, it typically cannot be selected or previewed. This is to ensure a clear and accurate shopping experience for our customers, helping to avoid any confusion regarding the availability of products.

    If you want to hide the out-of-stock product swatches, please navigate to WooCommerce > Settings > Products > Inventory > check on Hide out of stock items from the catalog:

    https://prnt.sc/p8wDaougRT83

    If you have any further questions or if there is anything else we can assist you with, please do not hesitate to contact us. We are here to help!

    Best Regards,
    8Theme’s Team

    Avatar: ziga32
    ziga32
    Participant
    February 15, 2024 at 11:42

    I would just luke to be able to click on this color which is out of stock
    https://i.imgur.com/dilYlpj.png
    Same as I can click here
    https://i.imgur.com/zmrdgi8.png

    But to my understanding nowt, this is impossible?

    Avatar: Justin
    Luca Rossi
    Support staff
    February 15, 2024 at 16:28

    Dear @ziga32,

    We would like to suggest that you insert the following snippet of code into the functions.php file located within your child theme:

    
    function n2t_custom_js() {
        ?>
        <script>
            jQuery(document).ready(function($){
                $('.st-swatch-preview li').removeClass('sten-li-disabled');
                $('.st-swatch-preview li span').removeClass('sten-disabled');
                $(document).on('click', '.st-swatch-preview li', function(){
                    $('.st-swatch-preview li').removeClass('sten-li-disabled');
                    $('.st-swatch-preview li span').removeClass('sten-disabled');
                })
            });
        </script>
        <?php
    }
    add_action( 'wp_footer', 'n2t_custom_js', 999 );
    

    We trust that this code will be beneficial for your needs. Should you require any further assistance, please do not hesitate to reach out.

    Best Regards,
    The 8Theme Team

    Avatar: ziga32
    ziga32
    Participant
    February 16, 2024 at 01:20
    Avatar: Justin
    Luca Rossi
    Support staff
    February 16, 2024 at 04:37

    Hi @ziga32,

    We tried to login with this admin account but it didn’t work anymore.

    Can you please double check?

    Thank you!

    Please contact administrator
    for this information.
    Avatar: ziga32
    ziga32
    Participant
    February 16, 2024 at 11:22

    i just reseted the pw

    Please contact administrator
    for this information.
    Avatar: Justin
    Luca Rossi
    Support staff
    February 16, 2024 at 14:01

    Dear @ziga32,

    We are pleased to inform you that we have made some updates to the custom codes, resulting in the functionality of the swatch colors being restored.

    Kindly take a moment to review the changes at your earliest convenience.

    Warm regards,
    The 8Theme Team

    Avatar: ziga32
    ziga32
    Participant
    February 16, 2024 at 14:25

    Works beautifuly, thank you very much!

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    February 16, 2024 at 14:26

    Dear ziga32,

    In the spirit of gratitude, we want to express our appreciation for your trust in our products. As a valued customer, your experience matters greatly. Would you consider sharing it by giving our theme a deserving 5-star rating on ThemeForest?

    Click here to share your thoughts: https://themeforest.net/downloads

    Being part of our community means a lot, and your feedback contributes immensely.

    Best Regards,
    The 8Theme Team

  • Viewing 10 results - 1 through 10 (of 10 total)

The issue related to '‘Click on a product swatch on archive pages if out of stock’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.