Jump to content

 

LyyK

Member Since 29 May 2015
Offline Last Active Oct 15 2015 02:37 AM
-----

Topics I've Started

Changing Data Type Of Database Columns (?)

15 October 2015 - 12:09 AM

I'd post this in the developer section of the portal but I do not have the permission to open a topic in there yet :)

 

I'm working on some code for data collection that is run on my server, communicating directly with the database. The timestamp column in the cscart_products table is by default set up as an INT(11) data type. Currently, the default value is 0 and I was not able to change it to CURRENT_TIMESTAMP, as that value requires a timestamp data type.

 

With everything backed up, I put on my trial-and-error boots and changed the data type from INT(11) to timestamp and then made the default CURRENT_TIMESTAMP. Lo and behold, everything seems to work in order. Features such as sorting by date etc work in order.

 

Before I do further coding around this I just wanted to ask other devs with more cs-cart experience whether or not this will break when updating the firmware. Could there be any other complications? Do you know of any other features I could test for compatibility other than product sorting?

 

Many thanks :)

 

- LyyK


Add Products To Mysql Directly

07 August 2015 - 11:07 PM

I was meaning to post this in the dev area of the portal but, likely due to my low post count, I am not allowed to start a thread there.

I am currently working on some external code and would like some input on the sql side of things. Is there a list of the DB tables with the product links required in the api docs anywhere?

Currently, I am inserting into the following tables:
cscart_products
cscart_product_prices
cscart_product_descriptions
cscart_products_categories

In short, after populating these tables, the products do not show up on the site. What have I missed?

PS: I haven't written code for image collection thus far. I figured, since images are not required when adding new products within the admin panel, I shouldn't have to touch those tables. Correct me if I am wrong.

Thanks