Products with a negative value of product_id

Hello everyone,



Does anybody know, what I must to do to work with negative values of product_id?

I know about the problem with javascript functions, which are generated (sign ‘-’ is denied in function name).

How can I fix it? or are any more problems with negative values of id?

(I am using 3.x Ultimate version)



Regards,

Rav

Hello Rav,



Thank you for your message.



Unfortunately, the information provided is not enough for me to tell what causes your issue. Could you clarify your problem in detail? Namely, please let us know where exactly you experience it. Also, I suggest that you should contact us via Customer Help Desk and provide temporary access to your server by clicking on the Add record link on the Access information page of your Help Desk account so that we could examine the issue directly on your server.



Thank you.





Pavel Zyukin

CS-Cart Support team

Hi,

What is the purpose of this, if i may ask?



Regards,





Valentin

The DB defines the product_id field(s) as unsigned. Why would you want a signed product_id?

Our main application which manage the products have own base (and there values of some id's are negative), and I must connect the main application with the shop. I imported the data to cscart shop (in db I unset unsigned attr in the product_id field). I can't change the values to possitive.

After import nn the product page I have got the error in function name:

```php



```



There are sing '-', and I don't know how (and where in the code) to fix it…



I have a problem when I put products to the cart. Cscart request that the functions fn_ceil_to_step and fn_floor_to_step doesn't exist. I checked the files and didn't find this kind of functions.



Regards,

Rav

csc_error.PNG

Bad Idea to have negative product_ids and change cs-cart default functionality. Use some workaround to translate those negative values to positive

Rav,



Does it really use negative numbers for product_ids in your other system? That seems very odd. It could be that the product_ids are simply bigger than the 8 character value used in the table definition. If so, just make the field bigger (like 12).



But it is a bad idea to change these to being signed values. Your store shouldn't deal with product_ids from a foreign source. You should either use that as the product_code or create a Product Feature to store the foreign system's reference.