Jump to content

FieldtypeVariations: Upcoming Pro Module for Product Variations & Attributes


kongondo
 Share

Recommended Posts

Introducing Variations, an Input- and Fieldtype for product variations and their attributes.

Product variations is a topic that has been coming up now and then, especially in the recent past.  This module seeks to fill this gap. Though it's in its early stages of development, it is already functional and can be used as is. I decided to make an early announcement (modules development forum) in order to get early feedback from potential users. 

The module is an alternative take on how variations can be built for a product. Imagine the ubiquitous T-Shirt. The product could vary by ...Size, Colour, Material, etc...These variations could in turn have internal variations, i.e. attributes....so, Size [Small, Large], Colour [Red, Blue]...etc; you get the drift.

The usual approaches to building variations have been either to use Multiple pages, Repeaters, Page Table, Table or Matrix (limited to 1x1 variations). In this module, we do it a bit differently.

First, the variations occur not at the Field level (meaning all product pages would have the same variations and attributes for each template) but at the page level. Secondly, there are no multiple pages for each variation and/or attributes; a product is a single page. The variations and their attributes are defined by site editors at the page level. Once a variations configuration has been defined, it is applied to the page and all possible combinations are generated (i.e. the Red,Small,Cotton; Red,Large,Cotton, etc) in the Inputfield. There is no limit to the number of variations and attributes that can be defined, although you will be amazed at how quickly the combinations grow! Prices are entered for each combination when editing the page. Combinations without prices are not saved to the database. Please note that prices cannot themselves vary at the page-level. Meaning, you cannot have ONE variation configuration that has different price inputs per product in the same FieldtypeVariations field.

The module ships with an API for outputting variation combinations in the frontend. Search, database and in-memory work as normal in the frontend. In the backend, DataTables provides a nice paginated, filterable table. Prices can be entered on any pages (of the table) without loss of data (meaning you can enter prices on page 1, scroll to page 10, enter more prices, filter or search the products table, enter more prices and finally save; no data will be lost).

I still have a couple of ideas and plans pending but would love to hear from you, thanks.

Below is a short video demo of the module in its current state. Things may/will change, both UI and features. Btw, the Fieldtype, although primarily targeted at commerce applications, is by no means limited to this. Other uses requiring combinations of whatever number of variables are very much within the remit of the module.

Planned/Hoped for features

  1. Import/Export product variations and attributes (Excel, etc)
  2. Full integration with Padloper (I will have to  discuss with @apeisa)
  3. SKU fields for each product variation
  4. Add/Remove extra subfields, e.g. multi-currency prices (currently there is only 1 input for each product variations' price)
  5. Product variation images?
  6. Etc...

Please not this module is not related to this other planned module (but it may eventually).

Sneak Peek Demo

 

 

Edited by kongondo
  • Like 9
Link to comment
Share on other sites

Sounds very interesting!

47 minutes ago, kongondo said:

Combinations without prices are not saved to the database.

47 minutes ago, kongondo said:

Btw, the Fieldtype, although primarily targeted at commerce applications, is by no means limited to this.

Does this mean the "Price" field is only an example, and in non-commerce situations you could add some other type of field to store data related to the variation? Will you be able to add multiple data fields to the variations?

  • Like 1
Link to comment
Share on other sites

27 minutes ago, Robin S said:

Does this mean the "Price" field is only an example, and in non-commerce situations you could add some other type of field to store data related to the variation?

Yes, e commerce being the most likely use for this module.

Just to be clear for the sake of others, technically, these are subfields. E.g., price is a subfield (meaning a database column in a FieldtypeVariations field [technically a database Table] which you access as $variationsfield.price, similar to $page->image.description).

Back to your question, this is a planned feature (although code is already in place). Please note that, in respect of these subfields, there are no plans to include anything as near exhaustive as what Table does. Meaning, these will likely be limited to TEXT, INT, FLOAT, etc fields, but not complicated Fieldtypes such as Page fields, Repeaters, etc. 

 

27 minutes ago, Robin S said:

Will you be able to add multiple data fields to the variations?

Yes, as many or as little as you want, pre or post-field use. For instance, start with price (default but in future versions one will be able to remove the subfield), then later or at field configuration add an SKU subfield, a discount subfield, some text subfield, etc. 

Edited by kongondo
  • Like 3
Link to comment
Share on other sites

I am thinking of changing the way variations +  attributes are created and applied. Currently, these have to be typed whenever one needs them. For different products that share an attribute (e.g. 'Red') but not necessarily a variation configuration, all that typing is repetitive. For instance, the colour Red means the same thing irrespective of whether it is a Car or a T-Shirt or a Phone. If you have all these products for sale, you should be able to just select colour from some list you previously typed and be presented with all colours from which you can select which apply to your product. Meaning, at the product/page configuration level, you will first have to select the variations you want, e.g. Size, Colour, Material, etc....then select the respective values/attributes, e.g. Yellow, etc. Small, etc.

  • Like 1
Link to comment
Share on other sites

This looks really nice! I agree having the page as context is a smart move! Hadn't thought of the problems of having that represented at field level. I also REALLY like the idea of variations existing on its own as presets somewhere else. 

Something that I see solved nicely and horrible at the same time, is Shopify's very own variation editor is batch edition of prices and variation names.

Eg. Select a variation by one of its properties and change the price in a batch table mode. This was done pretty nicely in an Excel like fashion, or multi checkbox select and command in menu.

What I did suffered was making a soccer uniform shop with 10+ sizes and sometimes 20+ variations in color. An error in creating the names would imply to REDO all the variations, or go through a menu to edit EACH variations name. Always almost easier to recreate the whole thing. It seemed as if after creating the list of variations per property in a nice interface, they all lost the relationship amongst them. So if you had written Brgundy / Dark Blue, get ready to edit +50 fields in modals or just delete the whole thing. There goes your day!

And the variations problem reveals a  flaw in Shopify's service, no more than 100 product variations. Why I might guess won't be a problem for PW.

I think variations images would also be quite the deal!

Nothing more to add, just personal experiences of suffering from product variations. Hope to see this released!

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

Hi all,

Quick update. I finished the first release of this module nearly two weeks ago. However, I have not yet had the time to finish the documentation and clean it up a bit nor produce a demo. I'll see if I can squeeze something in this week, but doubtful.  Current features are:

  • Fully integrated with Padloper! This was easier than expected. Thanks to Hooks, I didn't have to lift a finger. Please note that you will have to write the Hooks code yourself. We'll give you examples (very similar to this in Padloper docs).
  • Dynamically add or remove subfields. Price is no longer the default; there is no default. When creating the a Variations field, you create the subfields/columns you want (e.g. Price, SKU, Remarks, Price 2, Discount Codes, whatever...!
  • Attributes are created separately from the variations. For instance, you can create the attribute Colour and add as many colours to it as we you want. Colour will then be selectable (add one or all, remove one or all) when creating a variation configuration. Once you select colour, all the colours in it are auto-populated in a dropdown, ready for selection. This means that you can choose some colours for one product and choose different set of colours for another.

The above will be clearer in the demo. Just wanted to let you know that this is ready...:).

Edited by kongondo
More info
Link to comment
Share on other sites

1 hour ago, Zeka said:

I have started a project with Padloper, and I'm thinking to wait for your module, but want to know about price and the maximum term of release date.

I'm hoping maximum 2 weeks, 3 at the most before an official release. It will be priced similar to my other modules (but could be subject to change).

Thanks for your interest.

Link to comment
Share on other sites

  • 1 month later...
28 minutes ago, Zeka said:

Is there any news about your module? 

Working on it as we speak. Other stuff got into the way and had to shelve it for a while. Like I said though, the module is ready, just working on the documentation and some final checks.  I am hoping for a release next week. 

  • Like 4
Link to comment
Share on other sites

  • 3 weeks later...
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...