Zen Cart Logo
Forums / Basic Configuration / Change model to manufacturer

Change model to manufacturer

Locked

Views: 8,817

Results 21 to 40 of 41
This thread is locked. New replies are disabled.
5 Aug 2006, 2:04 AM
#21
bryankollar avatar

bryankollar

Zen Follower

Join Date:
Mar 2006
Location:
Trucksville, PA
Posts:
125
Plugin Contributions:
0

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

5 Aug 2006, 2:11 AM
#22
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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 ...

5 Aug 2006, 2:18 AM
#23
bryankollar avatar

bryankollar

Zen Follower

Join Date:
Mar 2006
Location:
Trucksville, PA
Posts:
125
Plugin Contributions:
0

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?

5 Aug 2006, 2:26 AM
#24
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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

5 Aug 2006, 2:42 AM
#25
bryankollar avatar

bryankollar

Zen Follower

Join Date:
Mar 2006
Location:
Trucksville, PA
Posts:
125
Plugin Contributions:
0

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!

5 Aug 2006, 2:44 AM
#26
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Change model to manufacturer

Don't clean if using the Insert SQL Patch ... it will translate for you ...

5 Aug 2006, 2:46 AM
#27
bryankollar avatar

bryankollar

Zen Follower

Join Date:
Mar 2006
Location:
Trucksville, PA
Posts:
125
Plugin Contributions:
0

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

5 Aug 2006, 2:49 AM
#28
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Change model to manufacturer

what's in your /includes/configure.php for these settings?

// 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', '');
5 Aug 2006, 2:51 AM
#29
bryankollar avatar

bryankollar

Zen Follower

Join Date:
Mar 2006
Location:
Trucksville, PA
Posts:
125
Plugin Contributions:
0

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');

5 Aug 2006, 3:10 AM
#30
bryankollar avatar

bryankollar

Zen Follower

Join Date:
Mar 2006
Location:
Trucksville, PA
Posts:
125
Plugin Contributions:
0

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!

5 Aug 2006, 5:03 AM
#31
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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:

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.

5 Aug 2006, 5:03 AM
#32
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Change model to manufacturer

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.

6 Aug 2006, 12:38 AM
#33
bryankollar avatar

bryankollar

Zen Follower

Join Date:
Mar 2006
Location:
Trucksville, PA
Posts:
125
Plugin Contributions:
0

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.

6 Aug 2006, 12:41 AM
#34
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Change model to manufacturer

Bryan,
Can you run that most recent bit of SQL I gave you with phpMyAdmin instead?

6 Aug 2006, 12:42 AM
#35
bryankollar avatar

bryankollar

Zen Follower

Join Date:
Mar 2006
Location:
Trucksville, PA
Posts:
125
Plugin Contributions:
0

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!

6 Aug 2006, 12:43 AM
#36
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Change model to manufacturer

phpMyAdmin is "not" the same as Admin->Tools->SQL Patches ...

6 Aug 2006, 12:56 AM
#37
bryankollar avatar

bryankollar

Zen Follower

Join Date:
Mar 2006
Location:
Trucksville, PA
Posts:
125
Plugin Contributions:
0

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!

6 Aug 2006, 1:04 AM
#38
bryankollar avatar

bryankollar

Zen Follower

Join Date:
Mar 2006
Location:
Trucksville, PA
Posts:
125
Plugin Contributions:
0

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?

6 Aug 2006, 2:04 AM
#39
tinas avatar

tinas

Totally Zenned

Join Date:
Jan 2005
Location:
Lake Havasu, AZ
Posts:
1,090
Plugin Contributions:
0

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:

6 Aug 2006, 2:22 AM
#40
bryankollar avatar

bryankollar

Zen Follower

Join Date:
Mar 2006
Location:
Trucksville, PA
Posts:
125
Plugin Contributions:
0

Re: Change model to manufacturer

I do now!

Thanks Gorgeous, that did it. Now its 100%!