Hi max,
You first have to create THE variations in the product and save! Then they will show up. Until then no options will appear… This is explained in the install…
On your product assign the product attributes and save
Please tell me how it goes…
Thanks
Thread Starter
max_Q
(@max_q)
Hi David,
All the products are variable products with three variations (colors) and all the attributes (black, brown, white) have been created and assigned.
All the variations have default images, and they show up when you choose a particular attribute (and it’s enabled in your plugin’s settings). Each product has a gallery with maybe twenty images and right now none of the gallery images are showing up because I haven’t been able to find the variation slug dropdown.
Curious, huh?
Indeed Curious…
[ redacted ]
I will give it a look most probably monday morning Lisbon time.
Thanks,
David
Thread Starter
max_Q
(@max_q)
Sorry, I can’t. It’s a client site with some proprietary info in the back end.
I like the functionality of your plugin enough to spend some time seeing if I can suss out what’s going on. I’ll let you know what I find. Thanks for your interest.
Regards
Thread Starter
max_Q
(@max_q)
Okay, David, here’s what I think is going on:
I have two attributes for my products, Finish (pa_finish) and Color (pa_color). The particular product I’m using for testing only has Color as an applicable attribute, not Finish.
On line 311 of smart-variations-images.php you assign the variable $variations the value of ‘true’. You then loop through each attribute and use the terms used by the post to create the select control. During the loop, if this particular post doesn’t use any of the terms of the current attribute (as is the case with my test product when looping through the ‘Finish’ attribute) you change the value of $variations to ‘false’. When you do the test ‘if ($variations)’ on line 329 the result is false, and your addition of the Variation Slug dropdown to the form is never created.
The bottom line is, if the product didn’t use at least one term of all of the attributes, no matter that it used some of the attributes, you’ll never see the Variation Slug control.
I propose starting out by assigning the $variations variable the value of ‘false’. Then, during the loop ‘if (!empty($fabric_values))’ on line 318 changing the value of $variations to ‘true’. You would only reach that point if the current post has at least one term of at least one of the attributes. But that’s all it takes, right? Get rid of the ‘else’ section on line 322, as it’s no longer needed. This allows me to see the Variation Slug control.
I’m going to do more testing now.
Regards
Hey! good point…
I will commit a version update by tomorrow with a new approach then.
Thanks! please tell me how it goes..