Jump to content

ODBC to cubecart


Recommended Posts

Hello,

I'm using an ODBC MySQL connector to get data from cubecart to a front end Access Database.

I added 2 custom fields in the order_summary table, i noticed that when i try to edit them I get a write conflict error.  The research I did on this error concludes I need to add a timestamp field in order_summary for Access to work correctly.

Would adding a timestamp field on that table affect any of the shopping cart functionality?

Thank you!

Link to post
Share on other sites

yes, it says I'm trying to save a record that is been saved by another user, copy to clipboard or drop changes.

i just copied the order_summary table to another server with the same mysql version and same MySQL  NO_ENGINE_SUBSTITUTION, and tried editing a record, it did allow me.  So i believe it's a setting on the live server, just can't figure out what.  Also noticed that when i link the table to Access, it doesn't ask me for primary key...

the error i get is pretty generic of Access DBs, most people say the error will go away if i add a timestamp to the table, which was the original question, but i don't know if that will break any functionality of the shopping cart?

Link to post
Share on other sites

I'm just realizing that it's not giving me errors on all records, only on specific ones.  so i starting by sorting the table to try to figure out where is it that i get the errors.

I'm not sure I'm correct, but seems like I have no issues editing records where the field "discount_type" is null, if the record has an "f" in discount_type i cannot edit

What is that field used for?

Thank you!

 

Link to post
Share on other sites

No. CubeCart will ignore it. However, the column must not be NOT NULL as otherwise this will require either a default value in the column definition or CubeCart failing an INSERT as not having provided a value for that column.

The 'discount_type' can hold any two characters, but CubeCart uses 'f', 'p', and maybe 'pp', for "Fixed (per-product sale price)", "(global) Percent", and maybe some form of other Percent that I have no experience with. Empty or Null is that this order had no discounts applied.

NO_ENGINE_SUBSTITUTION, if you haven't found out yet, is a setting for the database server that prevents a table from being created or altered if the table is to be created using a specified engine that is not enabled or allowed. See: https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sqlmode_no_engine_substitution  For example, if InnoDB is not allowed, but MyISAM is, the table will not be created if the CREATE statement says to use InnoDB. With this setting disabled, the table will be created but will use MyISAM (the server default) instead.

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...