Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
UPDATE: one more solution to this issue and to the related issue
Is it possible to add a feature that allows the Admin to filter the product attribute by type and also by value
Ex. Filter by Type w/ values
1. Filter by Attribute Type w/ values
a. Choose Attribute Type : T-Shirt Color
b. Choose Attribute to Filter : Red
Screen now shows variations of Small, Medium, Large, etc. T-Shirt in Red ONLY.
Comment | File | Size | Author |
---|---|---|---|
#2 | king-plus-anisha.png | 241.6 KB | drugan |
#2 | king-only.png | 238.05 KB | drugan |
#2 | contains-anisha.png | 300.09 KB | drugan |
#2 | filter-exposed-contains.png | 348.96 KB | drugan |
#2 | edit-view.png | 292.52 KB | drugan |
Comments
Comment #2
drugan CreditAttribution: drugan as a volunteer commentedIt's easy. Because the Variations tab is a regular view you can modify it whatever way for your needs. See the Title filter at the left and the contextual link to edit view at the right:
Now add an exposed Variation title filter:
See the variations filtered:
It is pretty useful to Adjust price for variations having particular attribute(s) value. Given that you can easily mock the attribute pricing feature which is not available now. Just create a variation type with the base required attribute(s) (Bed - King, Qeen) and a bunch of optional attributes (Pillow - peep-pillow, Blanket - Cotton Blanket, GF - Anisha). Then manually create the very first and the very cheapest variation (Qeen : $100). Then execute Duplicate variation action to create all possible variations. Then select King -> Adjust price -> Add 100 fixed value. Then filter variations by the peep-pillow, select them all and Adjust price -> Add 10 fixed value. Repeat with all the rest attributes and get this:
The feature above requires additionally Commerce Correct Attributes the submodule of the https://www.drupal.org/project/commerce_xattributes
Comment #3
jayarex07 CreditAttribution: jayarex07 commentedYes! I didn't realize that Commerce Bulk was created with a view.
This helps me so much and makes this plugin worthy enough to be included in Commerce out-of-the-box.
This literally just saved me hoursss of imputing various prices and attributes for the same product but different sku's.
Problem Solved.
I can't thank you enough for this plugin.
Happy Coding .. (<-- is that even a thing people say? i'm sorry I'm still a noob.)
Comment #4
drugan CreditAttribution: drugan as a volunteer commented@jayarex07
Thank you for kind words! I really appreciate it.
I'll leave this issue opened just because if someone has a similar question then they can easily find this page.
Now I am looking for inspiration either paid or just by mood to create an attribute pricing module.
I'll post a comment here when it become ready so you could be one of the first testers...
Comment #5
drugan CreditAttribution: drugan as a volunteer commented@jayarex07
What you think if this solution will be available for your project:
https://github.com/drugan/commerce_oiaddon