Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Long product ids


Guest

Recommended Posts

Hi,

 

How can you handle long product ids in OScommerce?

 

Some of the products in my store have standard 13 digit bar codes, so the product id is 13 numbers long.

 

I've edited the database fields for product_id wherever I can find it in the database to be a BigInt (32) instead of Int (11). This allowed me to upload my product file, and view them in the category screen.

 

However, when you click on a product to buy it, an error is returned saying the product cannot be found.

 

Any suggestions would be really appreciated,

 

Geoff

Link to comment
Share on other sites

Is the problem due to this statement: p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] in product_info.php , namely that it is an integer (int)?

 

Am I on the right tracks, or completely wrong??!

 

Geoff

Link to comment
Share on other sites

Why don't you try changing products_id in int(13) I guess then you know and it probably works too

Forum search

Contributions search

Documentation search (note: docs being adapted for MS3, may be different for MS2)

3 tips for better forum searching

 

Want to post? Read this first:

osCommerce for dummies

Topic name etiquette

 

Basics:

Basics for design

Right syntax to use near '-20, 20'

Cannot re-assign $this

Parse error

Link to comment
Share on other sites

As far as I know the int(11) doesn't refer to number of digits. I think it is to do with the binary number.

 

I did try changing the database fields to int(13) but it wouldn't let me upload the product file.

 

Any other thoughts? Other people must use standard bar codes?

 

Geoff

Link to comment
Share on other sites

As far as I know the int(11) doesn't refer to number of digits. I think it is to do with the binary number.

 

Yes probably. I guess I use a strange program to do stuff in my db

^_^ When I change the length it shows as int(13)

 

my mistake

Forum search

Contributions search

Documentation search (note: docs being adapted for MS3, may be different for MS2)

3 tips for better forum searching

 

Want to post? Read this first:

osCommerce for dummies

Topic name etiquette

 

Basics:

Basics for design

Right syntax to use near '-20, 20'

Cannot re-assign $this

Parse error

Link to comment
Share on other sites

How do you upload your products? I thought products_id is automated, you can only specify products_model

Forum search

Contributions search

Documentation search (note: docs being adapted for MS3, may be different for MS2)

3 tips for better forum searching

 

Want to post? Read this first:

osCommerce for dummies

Topic name etiquette

 

Basics:

Basics for design

Right syntax to use near '-20, 20'

Cannot re-assign $this

Parse error

Link to comment
Share on other sites

I save my product table as a csv file, and then use the sql server interface on my hosting site to 'enter data from a text file' .

 

I notice the model number has a different field setting - which might allow longer numbers or be more easily changed, however, it shows up on the site, and my customers don't need or want to see the product code.

 

Geoff

Link to comment
Share on other sites

Ok, fixed the problem. I increased the model field from varchar(12) to varchar(13), and used that for my unique codes, including standard 13 digit bar codes.

 

I've then switched the breadcrumb to product name rather than model, and turned off the display of model in product_info.php, both using contributions in the forums.

 

Thanks for pointing me to model field!

 

Geoff

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...