HomePage Forums Themeforest Organey – Organic Food WooCommerce WordPress Theme HTML changes to some of the elements

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #6728
    AvatarMatija
    Support Expired

    Hello,

    would you be so kind and tell us how to change the HTML of some of the elements, for example the HTML of mini-cart?

    We’ve tried changing the following files (with no success):

    – wp-content/plugins/woocommerce/templates/cart/mini-cart.php
    – wp-content/themes/organey/woocommerce/cart/mini-cart.php
    – wp-content/themes/organey-child/woocommerce/cart/mini-cart.php

    How could we add some wrappers to the HTML?

    Thank you and kind regards.

    Matija

    #6730

    Hi,

    Please override the following function in the child-theme, then add the wrappers or html you want:

    function organey_header_cart_side() {
            if (organey_is_woocommerce_activated()) {
                ?>
                <div class="site-header-cart-side side-wrap">
                    <a href="#" class="close-cart-side close-side"></a>
                    <div class="cart-side-heading side-heading">
                        <span class="cart-side-title side-title"><?php echo esc_html__('Shopping cart', 'organey'); ?></span>
                    </div>
                    <?php the_widget('WC_Widget_Cart', 'title='); ?>
                </div>
                <div class="cart-side-overlay side-overlay"></div>
                <?php
            }
        }

    For the content cart part, you need to override the mini-cart file in the child-theme and edit the html markup as you did above.

    #6773
    AvatarMatija
    Support Expired

    Thank you for your answer!

    Matija

    #6789

    Ok, let me know if you need to help.

    #7351
    AvatarMatija
    Support Expired

    Hello,

    thank you for your instructions once again.

    We’ve tried this approach but it doesn’t work for us. The generated HTML stays unchanged.

    Could you please specify exactly which files need to be modified? If it would be easier, I can also let you know cPanel/FTP access details.

    Thank you,

    Matija

    #7354

    Ok, please send the Admin web account for me, I will check and try to help you.

    #7371
    AvatarMatija
    Support Expired
    This reply has been marked as private.
    #7381

    Hi,

    #1/ Ok, I’ve overridden it in the child-theme for you, and you can change it to a div tag.
    However this may break the layout, lose the previous css customizations of the theme, or the cart related js may not work.
    We won’t help you fix this problem if you still want to change the html markup

    #2/ I have also included the min-cart file title in the child-theme so that you can easily edit it. However, this editing will affect the previous css and js customizations of the theme.

    #7385
    AvatarMatija
    Support Expired

    Thank you, we really appreciate your effort.

    #7392

    Ok, let me know if you need to help.

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

You must be logged in to reply to this topic.