Jump to content
cyberfruits

Automated stock update

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

Share this post


Link to post
Share on other sites

Update your existing scripts would seem to be the best course of action.  Go back to whoever wrote them originally or post at http://forums.oscommerce.com/forum/79-commercial-support-enquiries/ to get a quote, assuming you don't have the technical knowledge to update them yourself.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
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. 

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×