-
Change model to manufacturer
I have a store with over 600 items. I have a model # for each item, which actually is supposed to be under the manufacturer.
Instead of going through the entire store changing each one, how do I change every model #, for example, BK, to manufacturer BK
Thanks!
-
Re: Change model to manufacturer
When you put your products in are you entering the manufacturers as well ? Are you talking about the display of the products or are you wanting to mass update the actual model numbers ?
I guess your ? is a little hard to understand to me...
-
Re: Change model to manufacturer
Thanks for responding.
When I entered my products, I manually put a Model # for each item. Now, I want all those model #'s to be manufacturer names.
Can I mass update every model # to a manufacture field?
-
Re: Change model to manufacturer
You have 2 options...
If you install the EZPopulate mod you can download a complete file of your products and then change the model numbers - import it again - and let EZPopulate handle the mass update.
OR you can set up your manufacturers and use that field on the product display without using the model number by assigning all the products to their manufacturers ( the advantage to this is that if you use the manufacturers sidebox and do it this way people will be able to "browse" your products via manucturer).
Hope that helps!
-
Re: Change model to manufacturer
Do you have all of these products_model fields in the products table setup as manufacturers_name in the manufacturers table of your database?
-
Re: Change model to manufacturer
Great! Where can I get EZPopulate mod?
-
Re: Change model to manufacturer
Quote:
Originally Posted by Ajeh
Do you have all of these products_model fields in the products table setup as manufacturers_name in the manufacturers table of your database?
I am not sure what that means. All I did was add each product manually, and manually typed in each model name in the model name field when I SHOULD HAVE added it to the manufactures field instead. So now I have a whole 600+ listing with model #'s instead of manufacture numbers.
-
Re: Change model to manufacturer
So what you really need is a way to build the tables:
manufacturers
manufacturers_info
from the existing products_model values that you have entered in the products table and then update the table:
products
from the manufacturers table with the proper manufacturers_id so that the manufacturers_name will now show properly and be related correctly in your database between all the tables ...
-
Re: Change model to manufacturer
Quote:
Originally Posted by Ajeh
So what you really need is a way to build the tables:
manufacturers
manufacturers_info
from the existing products_model values that you have entered in the products table and then update the table:
products
from the manufacturers table with the proper manufacturers_id so that the manufacturers_name will now show properly and be related correctly in your database between all the tables ...
I wish I knew how to do that. I don't know a thing about editing tables. That's why I was hoping EZPopulate mod would be an easy fix. Will the EZPopulate mod suit my needs?
-
Re: Change model to manufacturer
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
-
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 ...
-
Re: Change model to manufacturer
Once again, you guys are the best!
I just downloaded it, installed it. Downloaded my database.
BUT want to be sure, it seems kinda weird. My products are over 600 right now. The downnloaded file is 528k. Can this be right?
I want to do this before I install that new script!
Thanks in advance
-
Re: Change model to manufacturer
The backup you made is a text file ... or a Zip of a text file ...
Download via FTP and view it ...
You should be able to see everything in it ...
-
Re: Change model to manufacturer
Ok, that was a stupid question. Its zipped! Duh. Its actually 3 MB.
Ok, so now I ran that script. And the message I get is "1146 Table 'bryankol_zc1.manufacturers' doesn't exist".
Why?
-
Re: Change model to manufacturer
Do your tablenames have prefixes on them ? ie: do they all start with zen_ ?
If so, add that prefix back in for each table name and then rerun.
manufacturers
manufacturers_info
products
Or just use the Admin->Tools->Install SQL Patches screen
-
Re: Change model to manufacturer
I did use the Install SQL patches feature.
And yes, I have ZEN_ in front of each table.
I changed the code to this:
truncate table zen_manufacturers;
truncate table zen_manufacturers_info;
insert into zen_manufacturers (manufacturers_name, date_added) select distinct products_model as manufacturers_name, now() from zen_products;
insert into zen_manufacturers_info (manufacturers_id, languages_id) select manufacturers_id, 1 from zen_manufacturers;
update products p, manufacturers m set p.manufacturers_id = m.manufacturers_id where p.products_model = m.manufacturers_name;
and it still reads:
1146 Table 'bryankol_zc1.manufacturers' doesn't exist
Thanks!
-
Re: Change model to manufacturer
Don't clean if using the Insert SQL Patch ... it will translate for you ...
-
Re: Change model to manufacturer
Well that's what I did originally. Here's what I did. I went to TOOLS, and INSTALL SQL Patches.
Then I pasted:
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;
into the box and hit send.
And that's when it came back with the error.
I also tried it by browsing the PHP file on my desktop, and hitting upload. Same thing
-
Re: Change model to manufacturer
what's in your /includes/configure.php for these settings?
Code:
// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', ''); // prefix for database table names
define('DB_SERVER', ''); // eg, localhost - should not be empty
define('DB_DATABASE', '');
-
Re: Change model to manufacturer
define('DB_TYPE', 'mysql');
define('DB_PREFIX', 'zen_');
define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty
define('DB_DATABASE', 'bryankol_zc1');
-
Re: Change model to manufacturer
P.s. I just donated $50.
You guys are awesome. I really can't believe its a free software, and you can certainly use it. I wish I could do more.
And the T-shirt inspired me to go for the $50. :)
I recently lost my day job, so it was a tough decision, but you guys are fabulous!
-
Re: Change model to manufacturer
Since your prefix is zen_
try this via phpMyAdmin ... after choosing your "bryankol_zc1" or "_zc1" database from the phpMyAdmin pulldown menu ... and then clicking on the "SQL" tab in top center of screen:
Code:
truncate table zen_manufacturers;
truncate table zen_manufacturers_info;
insert into zen_manufacturers (manufacturers_name, date_added) select distinct products_model as manufacturers_name, now() from zen_products;
insert into zen_manufacturers_info (manufacturers_id, languages_id) select manufacturers_id, 1 from zen_manufacturers;
update zen_products p, zen_manufacturers m set p.manufacturers_id = m.manufacturers_id where p.products_model = m.manufacturers_name;
I think it's just the last one that failed in your last attempt ... but it's safe to do the whole thing again.
-
Re: Change model to manufacturer
Quote:
Originally Posted by BryanKollar
P.s. I just donated $50.
You guys are awesome. I really can't believe its a free software, and you can certainly use it. I wish I could do more.
Many thanks. Every bit helps the project keep moving forward.
-
Re: Change model to manufacturer
Ok, here's the new error message now!
5 statements processed.
ERROR: Cannot execute because table zen_manufacturers does not exist. CHECK PREFIXES!
ERROR: Cannot execute because table zen_manufacturers_info does not exist. CHECK PREFIXES!
ERROR: Cannot execute because table zen_products does not exist. CHECK PREFIXES!
Note: 3 statements ignored. See "upgrade_exceptions" table for additional details.
What can I do now please?
AND - the $50 is well spent. You guys helped me with several problems before, so its definately worth the money.
-
Re: Change model to manufacturer
Bryan,
Can you run that most recent bit of SQL I gave you with phpMyAdmin instead?
-
Re: Change model to manufacturer
Yeah, the one you just posted? I did that... That's the error message.
You know, instead of going back and forth in a message, we can do a live one on one chat through my customer support "Live Online Help" from my website! May be easier!
-
Re: Change model to manufacturer
phpMyAdmin is "not" the same as Admin->Tools->SQL Patches ...
-
Re: Change model to manufacturer
Beautiful! The new code worked in Myphp admin!!! All the names for the "model" is now under "Manufacturer".
Saves literally hours and hours of work.
THANK YOU!
-
Re: Change model to manufacturer
SHOOT!
Ya know what?
After all that, what I wanted to do won't work, unless there is another way of doing it.
The reason I originally put "model #" as TF, for example, is because I wanted to list ALL products with the model "TF". BUT - when searching in the searchbox "TF", if I had a product that had "TFALL", it would pick that up and display it because the product name is "TFall" with T & F in front.
Then I noticed I could search "Manufacturer". So I thought "Great, I could just use this drop down list and choose manufacturer "TF" and have it display ALL the TF products. BUT - it seems I have to enter something in that search box. Some kind of letters.
So my last question is - can I search and display EVERY product with the manufacturer TF? Without entering in any letters in the search criteria box?
-
Re: Change model to manufacturer
Do you have the manufacturers side box on ?
It does exactly that. Look here : http://beautyinglass.com and click on a manufacturer. In this case they are glass blowers / artists but the concept is the same :yes:
-
Re: Change model to manufacturer
I do now!
Thanks Gorgeous, that did it. Now its 100%!
-
Re: Change model to manufacturer
Always glad to help :thumbsup: