Home Forums Themes Support Myha Product attributes

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2765

    Hello,
    I’m contacting you again because I’m having a hard time setting up the display of product attributes on the single product page.
    First of all, I would like the option selected to be different from the others (for example the others, either fuzzy or more transparent).
    First of all, I would like the option selected to be different from the others (for example the others, either fuzzy or more transparent).
    And finally, I think there is a slight bug when setting the image attributes, when we want to insert the image the button does not open the media tab to select an image. I had to juggle another plugin to insert them (Plugin that conflicts with the theme or one of the theme plugins (WooCommerce Variation Swatches))
    If the above changes are not possible, would it be possible to fix the incompatibility with the plugin mentioned above so that I can better customize the products?

    I notice that on the theme demo everything works fine so I do not quite understand why I’m having problems: /

    #2768

    Hello,
    I want to add more information to my problem. By removing the plugin that helped me configure the images, it turns out that no attribute option works by choice. Labels, images and colors do not work at all …

    #2769

    Hi,
    Thanks for your feedback!
    We’re checking this issue.
    This issue happen when WooCommerce update.
    Please patient. We’ll update it asap!

    *****
    Best regards,
    HaruTheme

    #2770

    Ok thank you !
    I can configure the product sheets anyway and all will be in order with the update where it is better that I wait?
    Do you have an idea of ​​the date of the update so that I get organized? Several days / weeks / months?
    Thank you

    #2780

    Hi,
    We have just updated on your site to fix this issue when Woocommerce update.
    Here is test product: https://retrochicboutique.fr/creation-fait-main/test-product/
    We’ll update it in next version.
    The fix detail is:
    Step 1: go to wp-content/themes/myha/framework/includes/ then open file woocommerce-hooks.php
    Step 2: Go to line 98 and change the code of function haru_admin_style_attributes_values to:

    function haru_admin_style_attributes_values( $attribute_taxonomy, $i ) {
    
                    global $post, $thepostid, $product_object;
    
                    if ( in_array( $attribute_taxonomy->attribute_type, array( 'color', 'image', 'label' ) ) ) {
                        $taxonomy = wc_attribute_taxonomy_name( $attribute_taxonomy->attribute_name );
                        $product_id = $thepostid;
                    
                        if ( is_null( $thepostid ) && isset( $_POST[ 'post_id' ] ) ) {
                            $product_id = absint( $_POST[ 'post_id' ] );
                        }
                        
                        $args = array(
                            'orderby'    => 'name',
                            'hide_empty' => 0,
                        );
                        ?>
                        <select multiple="multiple" data-placeholder="<?php echo esc_attr__( 'Select terms', 'myha' ); ?>"
                                class="multiselect attribute_values wc-enhanced-select"
                                name="attribute_values[<?php echo esc_attr($i); ?>][]">
                            <?php
                                $all_terms = get_terms( $taxonomy, apply_filters( 'woocommerce_product_attribute_terms', $args ) );
                                if ( $all_terms ) {
                                    foreach ( $all_terms as $term ) {
                                        echo '<option value="' . esc_attr( $term->term_id ) . '" ' . selected( has_term( absint( $term->term_id ), $taxonomy, $product_id ), true, false ) . '>' . esc_attr( apply_filters( 'woocommerce_product_attribute_term_name', $term->name, $term ) ) . '</option>';
                                    }
                                }
                            ?>
                        </select>
                        <button class="button plus select_all_attributes"><?php echo esc_html__( 'Select all', 'myha' ); ?></button>
                        <button class="button minus select_no_attributes"><?php echo esc_html__( 'Select none', 'myha' ); ?></button>
                        <button class="button fr plus add_new_attribute"><?php echo esc_html__( 'Add new', 'myha' ); ?></button>
                        <?php
                    }
                }

    Hope this help!

    *****
    Regards,
    HaruTheme

    #2781

    Hello,
    Everything works perfectly thanks to your changes!
    Many thanks you are really great!

    #2782

    Thanks so much for your feedback!

    #2786

    Hello, sorry to still bother you ….
    I still have a problem with the product attributes. On the attribute settings page the change of images does not work. (when clicking on the ‘upload’ button the media page does not open)
    And also is it possible to have a change when selecting the option chosen for the images? (for colors, a black circle appears around, but nothing for images …)
    I still have a problem with the product attributes. On the attribute settings page the change of images does not work. (when clicking on the ‘upload’ button the media page does not open)
    And also is it possible to have a chamgement when selecting the option chosen for the images? (for colors a black circle appears around, but nothing for the images …)

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

    Sorry about this. We’ll research to update this or will use Color Variation Swatches plugin in our theme.
    Please patient!

    *******
    Best regards,
    HaruTheme

    #2790

    Hi,
    Thanks for your patient!
    Now you can fix it by following steps: (We’ll update it in next version)
    Step 1: Go to wp-content/plugins/haru-myha-core/includes/term-meta/include/ then open file term-meta-generator-class.php
    Step 2: Go to line 43 and add the code like this:

    wp_enqueue_media();
    wp_enqueue_style( 'wp-color-picker' );
    wp_enqueue_script( 'wp-color-picker' );

    (added wp_enqueue_media();)
    Hope this help!

    *****
    Best regards,
    HaruTheme

    #2791

    Hello,
    It’s good thanks to the manipulation I could change the pictures thank you!

    #2792

    Thanks for your feedback!

    ****
    Regards,
    HaruTheme

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

You must be logged in to reply to this topic.