Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding Model Number via MySQL


roback

Recommended Posts

I need to add a model number to all my products in order for the Easy Populate contrib to work. The model number does not have to be specific to anything, just an arbitrary number. Is there a SQL command I could use to insert a model number into ALL products in one shot?

 

Please advise ASAP.

 

Thanks

 

Rob

Link to comment
Share on other sites

Make sure to backup your database first. If something goes wrong you can restore it.

 

Using phpmyadmin click on the sql tab and run this query

UPDATE `products` SET `products_model` = '123'

Again backup first.

Link to comment
Share on other sites

Make sure to backup your database first. If something goes wrong you can restore it.

 

Using phpmyadmin click on the sql tab and run this query

UPDATE `products` SET `products_model` = '123'

Again backup first.

 

Hmmm... okay that put 123 in the model # for all of them. Maybe I was unclear that I want that number to be unique for each, but doesn't have to correspond to any of the products per sae.

 

So please advise how I can take what you have now done - products_model = 123 for all and change to an unique value for each or I can restore the backup and do it from fresh. which ever is easiest.

 

Thanks for the help!

Link to comment
Share on other sites

Well looks like I did misunderstand you. Why can't you use easy populate? This sort of thing is what it is for.

 

Restore your original info in your db. Using 1 simple query in phpmyadmin will set all of those fields to the same value. So you don't want to do it that way.

Link to comment
Share on other sites

Well looks like I did misunderstand you. Why can't you use easy populate? This sort of thing is what it is for.

 

Restore your original info in your db. Using 1 simple query in phpmyadmin will set all of those fields to the same value. So you don't want to do it that way.

 

Okay, so how can I do it? EP requires the model number to function properly... for some reason it references that, and not the product id. Sadly I uploaded my products without and model # so EP is almost useless to me... hence why I want to insert a unique model number through a query.

 

Any ideas?

 

Rob

Link to comment
Share on other sites

That soesn't make sense to me. I don't use ep myself but it should give a place to enter your model number whether they are empty or not.

 

Try posting in the support thread. Maybe someone has had this problem before. Support Thread

Link to comment
Share on other sites

That soesn't make sense to me. I don't use ep myself but it should give a place to enter your model number whether they are empty or not.

 

Try posting in the support thread. Maybe someone has had this problem before. Support Thread

 

 

It doesn't make sense to me why EP does not export the product ID # as well, but how it works with the model number is if you export it with NO model number, add a model number and upload it, it sees that as two different models, so it adds a new (duplicate) product. I didn't create this contrib, but it certainly seems like an oversight.

 

So is there a way to populate the column product_model with unique values per item?

 

Is there a way to copy the values from another column (say the product_id) to the product_model column?

 

thanks for the help.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...