Jump to content



Latest News: (loading..)

- - - - -

Autogenerate Model in admin?


  • Please log in to reply
6 replies to this topic

#1   mumme1

mumme1
  • Members
  • 24 posts
  • Real Name:magnus andersson

Posted 21 August 2012 - 11:40 AM

Hi,

I would like to autogenerate the model field in admin ->categories when i save a product. Eg: manufacture_productname_1234.
Any idea how I can make a simple solution for that?

#2   burt

burt

    Code Monkey

  • Community Team
  • 7,745 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 21 August 2012 - 01:17 PM

That should be possible with a little javascript magic.  I'm not sure it has been done before, but should not be a large job if someone wanted to do it.

Maybe try commercial support, if it is important enough to you.


.
Dummies guide to designing osCommerce 2.3 Click Me

Or maybe a ready made theme for your shop ??

Warning: My posts may contain Horsemeat.

#3 ONLINE   multimixer

multimixer

    Lemons or Melons ?

  • Partner
  • 4,389 posts
  • Real Name:George Zarkadas
  • Gender:Male
  • Location:Greece

Posted 21 August 2012 - 01:36 PM

What is "1234" in this context? Something you type into the model field?

#4   mumme1

mumme1
  • Members
  • 24 posts
  • Real Name:magnus andersson

Posted 21 August 2012 - 11:03 PM

View Postmultimixer, on 21 August 2012 - 01:36 PM, said:

What is "1234" in this context? Something you type into the model field?

Sometimes two products may have the same name, so the numbers is also autogenerated to make sure every products gets a unique model number.

#5 ONLINE   multimixer

multimixer

    Lemons or Melons ?

  • Partner
  • 4,389 posts
  • Real Name:George Zarkadas
  • Gender:Male
  • Location:Greece

Posted 22 August 2012 - 03:52 AM

So you want the model name to be manufacturer + product name + 5 digit random number ?

What's the purpose, why not just the random number? How do you plan to use this model number?

If you are looking just for a unique product identifier, you could use the products id, this is a unique number, generated automatically

You could populate the model field with this number

#6   mumme1

mumme1
  • Members
  • 24 posts
  • Real Name:magnus andersson

Posted 22 August 2012 - 09:46 AM

View Postmultimixer, on 22 August 2012 - 03:52 AM, said:

So you want the model name to be manufacturer + product name + 5 digit random number ?

What's the purpose, why not just the random number? How do you plan to use this model number?

If you are looking just for a unique product identifier, you could use the products id, this is a unique number, generated automatically

You could populate the model field with this number

I have a store with a lot of products, and are using the "master product contribution" and easypopulate.
The master product is more of a placeholder for a lot of slave products.

The slave products always have a modelnumber, the master product is not a "real" product on dont have a modelnumber.
So I want to autogenerate the modelnumber for the master product, (the master product is splited in two parts in categories.php, so I can easily make the autogenerate on just the master product, if i know how to solve it).
and have normal modelnumbers for the slave products.

When adding a new product to the store I often only add the master products with oscommerce admin -> categories.
The many slave products (up to 30 per master product) is added with easy populate.

#7   jestep

jestep
  • Members
  • 46 posts
  • Real Name:Joseph E Stephenson
  • Location:Dallas Texas USA

Posted 25 August 2012 - 07:55 PM

For years I have created a unique number for each product in the following manner on an Easy Populate spreadsheet. Column "AA" for example contains all "ACM-" which is a three character code to identify the distributor, supplier or vendor. Column "AB" has the first number (in field $ABA2) 10001010. In Column AB on the next line I enter =$AB@+10. If you copy this down the page for each product line you get a nice unique 12 character identification for each product.

Again for years I was concatenating columns AA and AB anputting the new unique number in v_products_model which was always column A. Well, to my surprise, on a recent upload of my googlefeeder output, which was sent to Google/base,  find that "Unrecognized attribute: model (8287)" must mean that model is no longer accepted by Google. It appears they want "id" instead. Now if you checkout our current EP download on the fly there is no "id" field.

It is critical to be uploaded to Google so that Google shoppers can find us. I added my 5 new fields this past year including the Google Category Code. Now I am creating an Adwords campaign to to satisfy their latest requirement that will be fully implemented "this fall".

My BIG question is what to use as my unique identifier: Model which works with Easy Populate or Id which seems to be what Google/Base requires.
Joseph E. "Joe" Stephenson
www.AlphaNautical.com
www.NorthTexasCopier.com
jestep@alphanautical.com