Automatic SKU

Contrib type: 
Module
Status: 
Initial upload
Latest version: 
0.4
Compatibility: 
Ubercart 1.x

Automatic SKU's using token module. Settings can be adjusted for each product class. You have the option to hide the sku field or to fill it in automatically if left empty.


PreviewAttachmentSize
0.4 uc_auto_sku.zip4.36 KB
Joined: 04/06/2008
Juice: 49

This works with classes. What if we just use products? We have no need for additional classes so we just use the product content type. Can this be used with our situation?

Something else to consider would possibly be automatic SKU generation by taxonomy category instead.

Let me know!
Zach

OFF
OFF's picture
Joined: 09/22/2007
Juice: 23

We want that module worked with attributes.

My English is bad, but I hope images can help you to understand me.

It is the remarkable module, I hope to see the decision of a problem.

AttachmentSize
111.png 13.82 KB
222.png 9 KB
Joined: 07/22/2008
Juice: 16

Check under Home › Administer › Store administration › Configuration > Product settings

OFF
OFF's picture
Joined: 09/22/2007
Juice: 23

nothing interesting there.. ((

Joined: 10/29/2008
Juice: 22

click on the "Product settings" box

if needed, click on "Automatic sku generation" to expand and find the option to turn it on

Joined: 12/30/2008
Juice: 34

Support for Ubercart 6.x.2 soon?

Joined: 12/16/2008
Juice: 11

also looking forward for 6.x support

Joined: 01/19/2009
Juice: 25

Interested in 6.x version..

Joined: 05/15/2008
Juice: 430

I need similar functionality for my current project, including defaults for attributes. It's on my todo list -- What I'm working on will be for 6.x-2.

Hopefully I'll have something done soon, as it's pretty important to my currect project, and the entire project is WAY behind schedule.
(That means I'm working extra long hours to TRY to get everything done before the unrealistic deadline, which won't happen.)

Anyway, I'll submit it as a contrib and post a link here when it's completed. FYI -- Initially it may be feature lacking as I have to focus strictly on the functionality I need for my project.

Follow me on twitter.

Joined: 11/03/2008
Juice: 25

I have ported this module to Drupal 6.x/Ubercart 2.x

The port has been tested very little, so post your results. I will be using it on a production site soon and hopefully if any bugs exist they will surface for me.

AttachmentSize
uc_auto_sku.tar.gz 3.42 KB

a.k.a TheOverclocked

Joined: 11/03/2008
Juice: 25

Eh, this still doesn't seem to work. the hook_nodeapi() needs some work yet. Anyone care to take a stab? I may still need this myself but I'm not sure, working on trying to get around by using hook_form_alter().

a.k.a TheOverclocked

Joined: 03/07/2009
Juice: 2

I installed auto-sku module for drupal 6, when I try to add item, I got

warning: Missing argument 3 for form_set_value(), called in ... sites/all/modules/ubercart/contrib/uc_auto_sku/uc_auto_sku.module on line 258 and defined in ... /includes/form.inc on line 1311.

Hope this might help to solve problem, I am a not into API-programming yet...

Joined: 03/09/2009
Juice: 9

Yup. I got the same error. Would be sweet if anyone could take a look at it Smiling

Joined: 11/03/2008
Juice: 25

There is another module out there I just found out about that will auto generate the sku.

Product "Power Tools"

I'm checking it out now...

a.k.a TheOverclocked

Joined: 11/03/2008
Juice: 25

The Product Power Tools module does the exact same thing for 6.x and works great. It supports tokens as well, give it a shot.

a.k.a TheOverclocked

Joined: 05/05/2008
Juice: 71

Not quite. Power Tools are only available for product classes, not all products AFAIK. It would be nice to port this module to 6.x or kindly ask tcindie to enable a default setting for every product.

Joined: 04/13/2009
Juice: 47

Unfortunately this doesn't work with the Paid Event module, any suggestions how I can get it to work with this.

Joined: 04/20/2009
Juice: 67

Will this module work in that situation?

Joined: 12/08/2008
Juice: 57

I'd be interested in this too for the paid event module, particularly for repeating events.

Joined: 06/03/2009
Juice: 11

I need to do the same thing that "OFF" made clear with his attached images... To auto-generate a SKU for every combination of attributes. Can this be done through the SKU pattern? I see tokens for lots of things but none to the attributes.

I've been reading the whole module and although I'm not very advanced at developing Drupal modules, I could see by my PHP experience that this function wasn't considered in the module and have to be done by applying a SKU generation pattern but I don't know enough about Drupal modules or the Ubercart module structure to generate a pattern that would include a code for every attribute selected.

Does anyone know how to make a php pattern to generate a SKU for the attributes?

Thanks a lot

EDIT: I have an idea: install the Attribute Tokens module and use the Attributes [tokens] but that module doesn't work on 6.13

Joined: 12/17/2008
Juice: 96

Hi juanlacueva, did you ever find the solution? I'm using 5.x. I would love to automate the attributes sku too.