Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product attributes


vimes

Recommended Posts

Am using this fine software for the first time, but am struggling with product attributes.

 

I am using OSC v2.2 rc1, and am trying to add products, with attributes, to my store.

 

I can add a new product, but the attribute doobrie has me baffled.

 

I have worked out how to add a product option, and how to add an option value to the list, but applying them to the product is where it all falls down.

 

Using the input area at the bottom of the screen, I use the drop down box to select the product, then the drop down boxes to select the option name and option value, add "0" as the option price and leave "+" in the prefix box.

 

When I then hit insert I get the following error;

 

 

1264 - Out of range value adjusted for column 'products_attributes_id' at row 1

 

insert into products_attributes values ('', '8', '4', '3', '0.00', '+')

 

[TEP STOP]

 

 

Any ideas on what I am doing wrong?

 

Thanks.

Link to comment
Share on other sites

I've played around with a vanilla using mysql5 and I don't understand why you're getting your error. If it's only when you add 0 and + then I suggest trying to leave both these fields blank. Let us know if this makes any difference.

Link to comment
Share on other sites

Sadly, it is not just when I am adding 0 and + - that was just a listing of the example I used. Whatever I put into those boxes doesn't work.

 

Having dl'd the database, and compared it against the error message, I find this;

 

The table product_attributes is created with the following sql statement;

 

create table products_attributes (

products_attributes_id int(11) not null auto_increment,

products_id int(11) not null ,

options_id int(11) not null ,

options_values_id int(11) not null ,

options_values_price decimal(15,4) not null ,

price_prefix char(1) not null ,

PRIMARY KEY (products_attributes_id)

);

 

checking the error message (which moans about an out of range value for products_attributes_id) the data string passed to the database is;

 

insert into products_attributes values ('', '8', '4', '3', '0.00', '+')

 

which seems to be sending a null value to the products_attributes_id field.

 

However, this field is set to not null, but is also set to autoincrement - surely the sending of null should force the autoincrement and the addition of a valid value in that field? But the error message says an invalid, or out of range, value is being passed.

 

What is going wrong?

 

The only other thing I notice is that in the create table statement, the products_attributes_id field is defined with no space between the last character and the comma, whereas all the other lines have a space between the end of the line and the comma. Picky, I know, but could this be somehow stopping the autoincrement from being initiated?

 

The only other thing I can think of is that my server host, yetihost, uses windows servers - could this be causing a problem?

Link to comment
Share on other sites

Googled

 

oscommerce 1264 - Out of range value adjusted for column 'products_attributes_id' at row 1

 

gave

 

http://fighteritza.spaces.live.com/blog/cn...0!127.entry

 

Worth investigating?

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Aha!

 

Looks like just the job!

 

So, mysql v5 seems to be the culprit!

 

My host allows mysql V4 and V5 databases; would it simply be easier to use a mysql v4 database? Am I missing anything by not using a V5 database?

 

 

Thanks for the help!

Link to comment
Share on other sites

Sorry you will have to go to the mysql web site for an in depth explanation of the changes between 4 and 5.

 

Loads of posts for the upgrade, so you should be OK.

 

The patch for various osc releases includes mysql5 fixes

 

osCommerce 2.2 Milestone 2 Update 051113

Update Package 13th November 2005

 

------------------------------------------------------------------------------

Table of Contents

------------------------------------------------------------------------------

 

## Update 051113

 

customer_country_id in addressbook

 

## Update 051112

 

Cannot re-assign $this

limit -20, 20

Database Input Enhancement

Adding Non-Existing Products To Cart

Session ID XSS Issue

Validate Session ID

File Manager Problem

HTTP Header Injection

E-Mail Header Injection

Contact Us Form XSS Issue

Open Redirector

Extra Slashes In New Products

Order Status Filtering

MySQL 5.0 Compatibility.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

I am using OSC v2.2 rc1 - the (apparent) latest download from the osc website.

 

Are you saying this is not the latest release, but has to be patched as you describe????

Link to comment
Share on other sites

Check the contents of the OSC v2.2 rc1 download and look for a file updatesnnnnnn.txt.

 

If there is one there could be some useful patches

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Yep, you nailed it; in the extras directory

 

osCommerce 2.2 Milestone 2 Update 060817

Update Package 17th August 2006

 

 

Includes a number of patches to improve compatability with mysql5. I quote;

 

"MySQL 5.0 introduces Server SQL modes as part of its SQL 2003 standards support, and uses a more stricter approach to executing SQL queries. This is performed by default with setting STRICT_TRANS_TABLES as a Server SQL mode.

 

Due to this new setting, MySQL fails on certain SQL queries and produces error messages on the screen."

 

It then goes on to detail a whole host of required patches and edits. Hmm. Me not that brave yet. I think I will try a vanilla install with a mysql v4 db and see if that improves the situation - whilst waiting, in a cowardly way, for some kind soul who knows what they are doing to include the patches in the source code! :rolleyes:

 

Will try that and report back. Thanks for your help!

Link to comment
Share on other sites

Wuss

 

Trouble is you need to apply all the other patches anyway on servers using mysql v 4.x, do those to get your confidence up and then do these.

 

Enjoy

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...