Re: Change model to manufacturer
Quote:
Originally Posted by TinaS
EZPopulate is only a simple fix it really is better to do it the way that Linda says because that is how zen is set to work...
If you want to go the ezpopulate way and just change the model numbers the support thread with a link to that download is at :
http://www.zen-cart.com/forum/showth...ght=ezpopulate
Yeah, but if you don't know what your doing, I may screw it up even more. So it narrows down to EZPopulate mod, or redoing my whole thing by hand.
Well, thanks gorgeous. Anything else you can assist with as far as how to do it Linda's way, i'd like to see what's involved and try it.
Re: Change model to manufacturer
I am NOT a coder - sorry - I bet you one of the coders here would be able to give you a script or something to do this - but that being said what the proper steps would be is to enter your manufacturers in your admin area under Catalog/Manufacturers.
This would cause the manufacturers field on your site to be populated with the list you have entered - then you would be able to assign your products to a manufacturer.
One thing I just thought of is if you use EzPopulate to change model numbers you will end up with duplicate products because that is what Ezpopulate compares in order to determine new vs. updated products.
Also - EZPopulate has the manufacturers column so you could actually use that column - leave your model numbers the way they are and then let EZPopulate update your items with just the manufacturers info added.
Hope that helps.
Re: Change model to manufacturer
Is it okay to delete existing manufacturers from your site in order to build the list from the products?
Re: Change model to manufacturer
Tina's right ... with Easy Populate you could basically just copy or rename the products_model column to manufacturers_name ... or something like that ... and reload the file.
Re: Change model to manufacturer
Or ... with DrByte and I banging a few hammers around ...
BACKUP YOUR DATABASE
And run the follow:
Admin ... Tool ... Install SQL Patch ...
PHP Code:
truncate table manufacturers;
truncate table manufacturers_info;
insert into manufacturers (manufacturers_name, date_added) select distinct products_model as manufacturers_name, now() from products;
insert into manufacturers_info (manufacturers_id, languages_id) select manufacturers_id, 1 from manufacturers;
update products p, manufacturers m set p.manufacturers_id = m.manufacturers_id where p.products_model = m.manufacturers_name;
Be sure to BACKUP ...
Did you BACKUP first?!
Re: Change model to manufacturer
Thanks Devs for suplying that code - I am gonna hang onto it just in case I have need in the future as well :)
I knew that my solutions weren't the perfect way of doing it ;)
Re: Change model to manufacturer
Ain't that the sweetest little peice of code ... :smartass:
Heck ... it might even work ... :eek:
Re: Change model to manufacturer
I tell ya, you guys & gals are great!
Its kinda late to try this today (gotta get up at 4am!), but I will be certain to try it tomorrow.
Thank you ever so much!
Re: Change model to manufacturer
Ok, i'm embarassed.
I never backed up my database before (shame, shame, I know). Its about time I do, and now is the time before I install this nice peice of code.
So - can someone walk me through on how to back up the database.
I've logged into my control panel through my hosting company, and went to PHP My Admin. Now what?
I also see the database ZenCart. I clicked on it, and this is where I left off.
Anyone?
Re: Change model to manufacturer
You can do this with the Export link in phpMyAdmin when you click on your database name ...
Or, you can download the Backup MySQL from the Downloads and install that on your site ... you will find the new Backup choice in your Admin ... Tools ...