Home › Forums › WoodMart support forum › variant color images of products swatches (not color names or color swatches)
variant color images of products swatches (not color names or color swatches)
- This topic has 18 replies, 3 voices, and was last updated 5 years, 2 months ago by Artem Temos.
-
AuthorPosts
-
February 11, 2019 at 5:39 pm #106984
stuart.investParticipantI’m looking to just use the product variation images as the swatches on the my site? How can I achieve this?
February 11, 2019 at 6:23 pm #106987
stuart.investParticipantPlease see private content
Attachments:
You must be logged in to view attached files.February 11, 2019 at 8:11 pm #107003
Elise NoromitMemberHello,
Please navigate to Dashboard -> Products -> Attributes -> Color -> Configure iterms, enable swatch as shown http://prntscr.com/jskm29 for all the items
Navigate to Theme Settings > Shop > Attribute swatches > choose pa_color (your color attribute) and enable “Use images from product variations” if you want variation images to be applied instead of colors
Make sure each variation in a variable product has an image: http://prntscr.com/kk870w
Best Regards
February 14, 2019 at 4:08 pm #107530
stuart.investParticipantPlease see additional private content
Attachments:
You must be logged in to view attached files.February 14, 2019 at 5:56 pm #107557
Elise NoromitMemberHello,
Have a look at the screen Edit-Color-‹-MVP-APPAREL-LEGACY-EMBROIDERY-SCREEN-PRINT-—-WordPress.png
You need to set the color even though you are going to show the featured images on swatches.Best Regards
February 15, 2019 at 5:40 am #107598
stuart.investParticipantSetting the color made no difference. They are still showing the attribute words and not the images swatches.Is there something that I’m missing?
February 15, 2019 at 8:15 am #107620
Elise NoromitMemberHello,
Please deactivate all the plugins not related to the theme and provide your site admin access to the private area.
Best Regards
February 15, 2019 at 1:04 pm #107687
stuart.investParticipantI believe I’ve deactivated all the plugin unrelated to the theme. Login information is below
February 15, 2019 at 1:45 pm #107707
Elise NoromitMemberHello,
Enter each item and set the color https://gyazo.com/43d690ea938d9a3d536fd8a6b913d7e9
Products > Attribtes > Color > Configure Items > enter each item.
Best Regards
February 18, 2019 at 3:03 am #108044
stuart.investParticipantAdded color swatch to all 450 color attributes. Still having issues with image swatches coming up on some products and color swatches on others. Examples attached. Am I missing a setting somewhere else? All products have attribute color images as well.
Attachments:
You must be logged in to view attached files.February 18, 2019 at 8:08 am #108087
Elise NoromitMemberHello,
Please provide me URL of these two products
Best Regards
February 18, 2019 at 3:17 pm #108187
stuart.investParticipanthttps://mvplegacy.com/product/augusta-youth-zest-hoodie/ – loading correctly link
https://mvplegacy.com/product/cycle-dri-gear-2-button-faux-jersey/ – loading incorrectly link
Can I also turn off the grid on the shop pages? There are items with too many options that overtake the image and it is taking forever to load as well because of that too.
https://mvplegacy.com/product-category/apparel/t-shirts/mens-t-shirts/ (Screen share of the issue below)February 18, 2019 at 6:17 pm #108240
Elise NoromitMemberHello,
WooCommerce system doesn’t provide frontend with all variations if their number is bigger than 40. And because of that images for some variations are not available in the template file. You can fix it by adding the following line to the file
woodmart/woocommerce/single-products/add-to-cart/variable.php
before #28$available_variations = $product->get_available_variations();
Best Regards
February 19, 2019 at 2:48 am #108272
stuart.investParticipantGetting an error when using this code.
Attachments:
You must be logged in to view attached files.February 19, 2019 at 7:07 am #108291
Artem TemosKeymasterSeems that you paste a wrong code. Please, send us a screenshot from the file.
February 19, 2019 at 1:52 pm #108379
stuart.investParticipantHere is screen shot with line 28 highlighted. Does your code go like:
$attribute_keys = array_keys( $attributes );
$available_variations = $product->get_available_variations();
do_action( ‘woocommerce_before_add_to_cart_form’ ); ?>
or
$attribute_keys = array_keys( $attributes );
$available_variations = $product->get_available_variations();do_action( ‘woocommerce_before_add_to_cart_form’ ); ?>
Attachments:
You must be logged in to view attached files.February 19, 2019 at 1:53 pm #108381
Artem TemosKeymasterTry to put the line between these two https://gyazo.com/136fa6b4756f2e841e2e53bb22bf120c
February 19, 2019 at 3:31 pm #108408
stuart.investParticipantThat’s where it was before and I got the same error message. Please see link below for error message.
https://mvplegacy.com/product/gildan-softstyle-junior-fit-tank-top/
Parse error: syntax error, unexpected ‘&’ in /home1/stuartin/public_html/mvplegacy/wp-content/themes/woodmart/woocommerce/single-product/add-to-cart/variable.php on line 28
Attachments:
You must be logged in to view attached files.February 19, 2019 at 8:27 pm #108480
Artem TemosKeymasterYour screenshot clearly shows that you didn’t paste the code we gave. You paste some wrong code with the error.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register