Zen Cart Logo

Attribute Puzzle!

Locked

Views: 1,546

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
18 Sep 2007, 3:15 AM
#1
goshawk avatar

goshawk

Zen Follower

Join Date:
Aug 2006
Location:
Kihikihi, New Zealand
Posts:
220
Plugin Contributions:
2

Attribute Puzzle!

Hi,

I have taken data from a MySQL 4.0 Database, and inserted this in a new MySQL 5.0 database. Everything is going well, apart from the attributes. I have started with completely empty tables in the database for:

  • products_options
  • products_options_values
  • products_options_values_to_products_options
    Now when I create a new option name, and assign option values to this, I will not be able to insert the various options in my products.
    What happens is that for the option name, I get a list of only option value 1, that keeps repeating for all the values that I have created.
    Also if I create another option name, it repeats the value of option 1 several times.

180537 Contrast Colour 45 White + 0.0000 + 0
180538 Contrast Colour 45 White + 0.0000 + 0

And so on.

I think it has something to do with the number 180537 and ..538 etc, as it is a new database it surely should be starting with 000001 ..etc. But I have not been able to find that table, so I can reset it to 1.

So what ever I do, I can create several option names, but my customers will only ever be able to choose the first value of option 1

Any one know how to fix this?

Many thanks,

Goshawk

18 Sep 2007, 3:25 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: Attribute Puzzle!

Does this happen on a clean database too ?

You said you copied data from a v4 database to a v5 database. So, next question is ... does it happen if you follow the same process to a 2nd, new, v4 database as well ?

What version of Zen Cart are you using?
What addons/contributions are installed ?

18 Sep 2007, 3:31 AM
#3
goshawk avatar

goshawk

Zen Follower

Join Date:
Aug 2006
Location:
Kihikihi, New Zealand
Posts:
220
Plugin Contributions:
2

Re: Attribute Puzzle!

I have not inserted this info in another V4 database, I am using the latest V1.3.7 Zen Cart, with the following plugins installed:

  • Column Layout
  • Google Froogle
  • Google Sitemap
  • Maxmind Orders
  • Direct One Payment Module
    All but Maxmind orders I have used before without a problem, I have not been able to test the Maxmind module yet.

Thanks,

Goshawk

18 Sep 2007, 4:16 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: Attribute Puzzle!

... and if you do set up another MySQL 4 database and follow the same steps, what happens ? :smile:

18 Sep 2007, 4:19 AM
#5
goshawk avatar

goshawk

Zen Follower

Join Date:
Aug 2006
Location:
Kihikihi, New Zealand
Posts:
220
Plugin Contributions:
2

Re: Attribute Puzzle!

Am on to it..LOL going to try.

18 Sep 2007, 4:54 AM
#6
goshawk avatar

goshawk

Zen Follower

Join Date:
Aug 2006
Location:
Kihikihi, New Zealand
Posts:
220
Plugin Contributions:
2

Re: Attribute Puzzle!

Hi DrByte,

I have made a backup of my MySQL 5 database, and created a new MySQL 4.1 database, and inserted the backup data.

The same is happening, only value 1 of the first option name is inserted, as many times as I have values for that option name.

Goshawk

18 Sep 2007, 4:58 PM
#7
ajeh avatar

ajeh

Oba-san

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

Re: Attribute Puzzle!

Look at the table for:
products_options_values_to_products_options

Is the field:
products_options_values_to_products_options_id

set to auto_increment in the Extra column?

18 Sep 2007, 5:26 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: Attribute Puzzle!

Ajeh's got a good point there. When moving between MySQL versions sometimes the auto-increment setting can get dropped by the export process depending on the options selected when preparing to do the export. There are about 65 tables using auto-increment in Zen Cart.

19 Sep 2007, 5:26 AM
#9
goshawk avatar

goshawk

Zen Follower

Join Date:
Aug 2006
Location:
Kihikihi, New Zealand
Posts:
220
Plugin Contributions:
2

Re: Attribute Puzzle!

Hi Ajey and DrByte,

Yes that is set to auto_increment.

I have a backup copy of the SQL file attached, maybe it is something quite obvious.

Goshawk