Jump to content

Archived

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

roback

Adding Model Number via MySQL

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

Share this post


Link to post
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.


Remember to backup database, files and pictures.

 

I have a problem for your solution

I reject your reality and substitute my own

My mind not only wanders, it sometimes leaves completely

The problem with the gene pool is that there is no lifeguard

Everyone’s entitled to my opinion

 

Links

Security

SSL Help

Basics for design V2.3+

Share this post


Link to post
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!

Share this post


Link to post
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.


Remember to backup database, files and pictures.

 

I have a problem for your solution

I reject your reality and substitute my own

My mind not only wanders, it sometimes leaves completely

The problem with the gene pool is that there is no lifeguard

Everyone’s entitled to my opinion

 

Links

Security

SSL Help

Basics for design V2.3+

Share this post


Link to post
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

Share this post


Link to post
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


Remember to backup database, files and pictures.

 

I have a problem for your solution

I reject your reality and substitute my own

My mind not only wanders, it sometimes leaves completely

The problem with the gene pool is that there is no lifeguard

Everyone’s entitled to my opinion

 

Links

Security

SSL Help

Basics for design V2.3+

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

×