Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Automated stock update


cyberfruits

Recommended Posts

Hi

I used to run a shop till 2010 and this was based on the 2,2 version of os. i now runnig the latest 2.3 version. my 2.2 version had custom php scripts writen in php 1.1... i belive and my server now runs php 5... so i can not use my scripts to stock or update my stock in my shop, because the simply do not work. is there any ad ons out there which can stock or update my stock and quantaty? my supplier provides xml/asp files required for updates and all products avaible. also live stock feeds in various formats

the problem is i can not afford very much if it is a paid product/programm

 

thanks

Link to comment
Share on other sites

Another possibility would be to have someone knock off an XML-to-CSV converter for your supplier data files, and use that with the Easy Populate add-on to osC. Don't forget that updating your custom scripts would involve not only bringing them up to date on PHP, but also making any adjustments for changes to osC's internal data structures.

 

I doubt your scripts are for PHP 1.1 -- that would be so ancient that they probably wouldn't work with osC 2.2. Even something written for osC 1.1 would likely not work. Most likely that's just the version number of the custom script. 

Link to comment
Share on other sites

Hi

I will be looking at easy populate. i have done work on my old php scripts, but trying work oround the 30 "scripts runtime restrictions" is giving me problems, because there over a thosand products.

they are mostly working so, but one more keeps giving me this propblem "MySQL server version for the right syntax to use near '` values ('303',1,'Product Name','materials','',0)' at line 1". i hane no clue about mysql, which i think where the problem lies and can not see the reference in my script

 

any help or tips would be welcome

 

thanks

Link to comment
Share on other sites

I have no idea what a "scripts runtime restriction" is. It may not be PHP or MySQL related, but something else at the server (Apache) level.

 

You're only giving part of the MySQL error message, so it's hard to help. It says something about what it doesn't like, and "Check your MySQL server version...". It should also give the complete SQL query, which would give a clue as to what happened. The error is likely just before the first character ` in that part of the message. See if you have unmatched `, or ` around a field name list, or what.

Link to comment
Share on other sites

"I have no idea what a "scripts runtime restriction" is"

Is

The following php.ini settings are considered to be "default" by most hosts. Adjust higher as needed.

  • max_execution_time = 30 ;(in seconds)
    Change this to allow for more time that PHP can process your import file.

I tried my best to explain that, but i can not change that setting, so i would have to split the files

looking into easy populate for now and then, if i can not use it , look for sombody to help to bring my scrips up to date

the error message is all i got and on line one is only wriiten <?php and that is why i can not whats wrong, so could supply that  script to sombody, but is only one of several.

thanks

Link to comment
Share on other sites

OK, so you're timing out trying to run scripts, particularly database SQL updates. If you can't get permission from your host to run for longer periods, all you can do is break up the operations into smaller pieces. Say, one table at a time or even part of a table at a time. I'm assuming that the chief problem is MySQL update scripts, not PHP scripts, but the same general principle would apply there (break up the job into smaller pieces that will fit... I'm assuming that you aren't actually in an infinite loop somewhere).

 

There are special scripts designed to back up and restore databases that get around time limits by internally breaking up the job into smaller pieces. They can do a backup or restore without a timeout. I don't know if they'll work with arbitrary database update scripts, but they might be worth looking into.

Link to comment
Share on other sites

 

MySQL server version for the right syntax to use near '` values ('303',1,'Product Name','materials','',0)' at line 1"

that is a syntax error, it looks like you have a single quote too much it seems

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

I don't see any extra quotes. MySQL adds ' before and after the section of SQL statement it presents in the error message. There is a backtick ` at about the point where the error was detected, but unless it is unmatched (missing another ` before the table name), that's not a problem. That's why I asked for the full SQL statement.

Link to comment
Share on other sites

Hi

Thanks for your help, there are so many different problems that i now have decided to use easy populate. my supplier has both .csv and xml formats. with regard to the sql message that is all what i got myself, which is not a lot.

 

thanks for your input :) and help

Link to comment
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...