Home Forums WoodMart support forum Use image of each variation for a swatch – not working

Use image of each variation for a swatch – not working

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #504920

    didacusk
    Participant
    #505235

    Hung Pham
    Keymaster

    Hi didacusk,

    Thanks for reaching to us.

    You need to select existing attributes instead and checked visible on product https://prnt.sc/hytr8l2VO-fX

    Regards,

    #505557

    didacusk
    Participant

    Hi,

    I removed it and re-created the attribute for the product from “add existing”. After that added an image for each variation, but it still not showing the pictures.

    Images attached.

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

    Hung Pham
    Keymaster

    Hi didacusk,

    Navigate to Products -> Attributes -> chose the attribute -> Configure Items -> Edit -> Enable image swatch

    Please refer to article: https://xtemos.com/docs-topic/variable-products-and-swatches/

    Regards,

    #506232

    didacusk
    Participant

    Ok, I cleared the color from each term and now showing the image of each variation correctly.

    The problem now is that after I import the products using built-in woocommerce import tool, attribute again is shown in the way it should not be shown. Same like it is manually created and not chosen from “Add existing”. Image attached.

    Is there any solution for that?

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

    Hung Pham
    Keymaster

    Hi didacusk,

    Unfortunately, we do not have instructions on how to do that.

    Attributes are Woocommerce functionality and the Woodmart theme does not have the option to import/export the attributes.

    You will need to find a plugin or import or export the certain Database table or re-add existing attributes.

    If you have any questions please feel free to contact us.

    Regards,

    #507205

    didacusk
    Participant

    Yes, I will find a way to import the global attribute and not as local. You can close the ticket.

    #507246

    didacusk
    Participant

    Sorry, there is still issue.

    I found way to import the product using the global attributes. After I tried to enable “Grid swatch attribute to display” the product page is broken. Images attached.

    The name of attribute is in Bulgarian (cyrillic) – can this be an issue?

    Edit: Page acctually saying: fatal error. Here is the error log from the webserver.

    2023-10-25 22:26:07.154698 [NOTICE] [30549] [213.91.250.69:62046-Q:7C80EB68DD6789E1-52#promosector.bg] [STDERR] PHP Fatal error:  Uncaught TypeError: array_merge(): Argument #2 must be of type array, null given in /home/promosector.bg/public_html/wp-content/themes/woodmart/inc/integrations/woocommerce/modules/swatches.php:169
    Stack trace:
    #0 /home/promosector.bg/public_html/wp-content/themes/woodmart/inc/integrations/woocommerce/modules/swatches.php(169): array_merge()
    #1 /home/promosector.bg/public_html/wp-content/themes/woodmart/woocommerce/single-product/add-to-cart/variable.php(144): woodmart_has_swatches()
    #2 /home/promosector.bg/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include('...')
    #3 /home/promosector.bg/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php(1756): wc_get_template()
    #4 /home/promosector.bg/public_html/wp-includes/class-wp-hook.php(310): woocommerce_variable_add_to_cart()
    #5 /home/promosector.bg/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #6 /home/promosector.bg/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #7 /home/promosector.bg/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php(1702): do_action()
    #8 /home/promosector.bg/public_html/wp-includes/class-wp-hook.php(310): woocommerce_template_single_add_to_cart()
    #9 /home/promosector.bg/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #10 /home/promosector.bg/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #11 /home/promosector.bg/public_html/wp-content/themes/woodmart/woocommerce/content-single-product.php(189): do_action()
    #12 /home/promosector.bg/public_html/wp-includes/template.php(787): require('...')
    #13 /home/promosector.bg/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(284): load_template()
    #14 /home/promosector.bg/public_html/wp-content/themes/woodmart/woocommerce/single-product.php(28): wc_get_template_part()
    #15 /home/promosector.bg/public_html/wp-includes/template-loader.php(106): include('...')
    #16 /home/promosector.bg/public_html/wp-blog-head
    2023-10-25 22:26:07.154866 [NOTICE] [30549] [213.91.250.69:62046-Q:7C80EB68DD6789E1-52#promosector.bg] [STDERR] er.php(19): require_once('...')
    #17 /home/promosector.bg/public_html/index.php(17): require('...')
    #18 {main}
      thrown in /home/promosector.bg/public_html/wp-content/themes/woodmart/inc/integrations/woocommerce/modules/swatches.php on line 169
    
    • This reply was modified 6 months, 2 weeks ago by didacusk.
    Attachments:
    You must be logged in to view attached files.
    #507407

    Hung Pham
    Keymaster

    Hi didacusk,

    Could you please tell me how did you import product attributes before the problems occured.

    Regards,

    #507453

    radchuk2012
    Participant

    Greetings!
    According to your topic https://xtemos.com/forums/topic/hover-image-image-shaking-while-zooming-them/ I have a similar problem, but I have identified a different solution to the problem at the moment (does not break the zoom when hovering in differences from editing CSS) – https://xtemos.com/forums/topic/image-jitter-on-the-ajax-product-tabs-widget-in-chrome-on-windows/ .
    Perhaps it will be useful.

    #507711

    Hung Pham
    Keymaster

    Hi radchuk2012,

    Thanks for reaching to us.

    Please submit your own topic, it’s easy for me follow it.

    Regards,

    #510025

    didacusk
    Participant

    I imported product attributes with WP All import plugin

    #510140

    Hung Pham
    Keymaster

    Hi didacusk,

    Please send me temporary wp-admin info (wp-admin URL, username, password) to Private Content area, I will take a look.

    Regards,

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