Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

easy populate error


asim0s

Recommended Posts

Thanks Ian,

 

we have cut it out but it stil is not working :?

how can we find out where to look we don't real know php

we have

Temporary filename: /tmp/phpguE8C5

User filename: EP2003Aug08-1402.txt

Size: 19222

| CN-003 | cn-003.jpg | 19,95 | 500 | | 4-8-2003 1 | 100 | Sitecom | USB produc | USB produc | | BTW | Active Updated

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '31")' at line 4

 

UPDATE products SET products_price="19,95" ,products_image="cn-003.jpg", products_weight="500", products_tax_class_id="1", products_date_available= CURRENT_TIMESTAMP, products_date_added= "4-8-2003 16:52", products_last_modified=CURRENT_TIMESTAMP , products_quantity="100 , products_status=1 WHERE (products_id = "31")

 

[TEP STOP]

 

any idee :?:

 

(its not my site or my pc this some where in

my countrie and his english is "bad", we talk with msn)

 

Thx

 

Lighthouse

yes i know my english is bad, but you understand wath i mean;) if not ask

Link to comment
Share on other sites

  • Replies 113
  • Created
  • Last Reply

Top Posters In This Topic

all I can say is that the update is not functioning.

 

Delete all data and load by adding. Adding works. Exact same data for an update will cause this error.

 

I used .txt files uploaded to the temp directory aswell.

 

Good luck,

Ian

Link to comment
Share on other sites

Thanks Ian,

 

but now we have one problemen

we have 3000 pieces in stok how do we change the prices,

maybe 300 in one time

we don't want to do it by hand!!

 

hopefully not ? but how ?

 

Help plz

 

Thanks

 

Lighthouse

yes i know my english is bad, but you understand wath i mean;) if not ask

Link to comment
Share on other sites

There is an option to download only the sections for price updates.

 

Also there is a separate contribution for updating prices.

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

On the assumption that someone always runs into someone elses problem I thought I would post my work around for my previously posted problem in this discussion.

 

Problem was it wouldn't let me upload using the separate pricing contribution. I kept dying with the message "ERROR - v_customer_group_id and v_customer_price must occur in pairs". The problem was I couldn't find an error in the code:

 

if (isset($v_customer_price_1)){

if ($v_customer_group_id_1 == ''){

echo "<font color=red>ERROR - v_customer_group_id and v_customer_price must occur in pairs</font>";

die();

}

 

or the data: completely cleared every field.

 

So I replaced the isset function (which seems to be saying I have data in the $v_customer_price_1 field ) with the following inequality:

 

if ($v_customer_price_1 !=''){

which gives me an error message when it's suppose to. Unfortunately this only checks for the first set of pricing (you can have up to 4) but it really doesn't make too much difference since the upload process is still killed with a sql error if you don't have data in pairs.

 

May not be clean, but it works for me right now until I can see a fix, have more time to permanently fix, and/or a later update works clean on my system.

 

With any luck, I'm the only one that will encounter this error!

Michael Gilliam

Link to comment
Share on other sites

I'll bring this to the attention of the separate pricing contrib person, he is looking at Easy Populate to make sure it works with the ms2 version of his program!

 

Thanks for posting the work around!

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

When I try to load the example ep file I get the following:

 

File uploaded. 

Temporary filename: /tmp/phptfDMkN

User filename: example-ep-flie.txt

Size: 33546

| TEES-PICS- | coolcats/a | T-Shirts c | The most c | | 23.99 | 0.2 | 1/20/2001 | 1/20/2001 | 1000 | Art You We | Fabrics - | T-Shirts | coolcats | abyssinian | | | | --none-- | Active !New Product!

| --none-- | Active | | | | | | | | | | | | | | | | | | !New Product!

| --none-- | Active | | | | | | | | | | | | | | | | | | Updated

1064 - You have an error in your SQL syntax near '41")' at line 4



UPDATE products SET products_price="" ,products_image="Active", products_weight="", products_tax_class_id="", products_date_available= CURRENT_TIMESTAMP, products_date_added= CURRENT_TIMESTAMP, products_last_modified=CURRENT_TIMESTAMP , products_quantity="1 , products_status=1 WHERE (products_id = "41")



[TEP STOP]

 

What do I do now?!

EP 2.61 w/ OSC2.2 MS1

Link to comment
Share on other sites

Loxly

 

it looks like something is wrong with the UPDATE. If a new product is added, this will cause a new record to be added to the db. If that very same product is data loaded again, causing an update, error 1064 happens.

 

This seems to be occuring on a few of the posts here.

 

To put it another way. When I run the dataload, after clearing the database, it causes new records to be ADDED and it runs fine and all records populate. If I run the data load again, causing an UPDATE, error 1064 occurs.

 

If the data has not changed and no changes made to the .txt file, what could be causing this?

 

Thanks

Ian

Link to comment
Share on other sites

Lighthouse,

 

Thanks Ian,

 

but now we have one problemen

we have 3000 pieces in stok how do we change the prices,

maybe 300 in one time

we don't want to do it by hand!!

 

hopefully not ? but how ?

 

Help plz

 

Thanks

 

Lighthouse

 

There seems to be an issue with the update. Without knowing to much about your data its not easy to comment. You could download and manipulate in Excel (if there is a common variable). Maybe even some SQL?

 

However, I would start with the post about a pricing contribution. Perhaps that might be what you are looking for. I went to contributions and searched on "price". This brought up a few alternatives but this one could be your answer:

http://www.oscommerce.com/community/contributions,122

Quick price updates.

 

Hope it helps,

Ian

Link to comment
Share on other sites

I didn't write EP, someone else did, so if there are errors in the code, I need someone else to fix them. I did the search and replace on the tep_merge_arrray, but was not aware of any other code changes that needed to be made.

 

A couple of people have repeatedly posted they have tweaked EP to work and no one has offered up any code or emailed me files or posted the fixes in the contribs section.

 

It would be helpful if someone with a full working version would add it to the contributions or email me to so I can add further instructions to the readme.

 

I also asked if someone with documention experience might be willing to take a look at the manual and update it.

 

This is volunteer work and volunteers need to work together to create better packages :)

 

My email is [email protected]

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

When I downloaded my database and uploaded it... I got this:

 

Easy Populate 2.61 - Default Language : English(1) 



File uploaded. 

Temporary filename: /tmp/php6NbsTA

User filename: EP2003Aug09-0101.txt

Size: 40266

| GIFT 25 | gift_certs | $25 Gift C | Send a $10 | | $25.00 Gif | gift certi | gift certi | 25 | 0.00 | | 2003-04-16 | 299 | | Gifts | Gift Certi | | Taxable Go | Inactive Updated

1064 - You have an error in your SQL syntax near '29")' at line 4



UPDATE products SET products_price="25" ,products_image="gift_certs/giftcert-25-sm.gif", products_weight="0.00", products_tax_class_id="1", products_date_available= CURRENT_TIMESTAMP, products_date_added= "2003-04-16 10:56:44", products_last_modified=CURRENT_TIMESTAMP , products_quantity="299 , products_status=0 WHERE (products_id = "29")



[TEP STOP]

Link to comment
Share on other sites

At the risk of pointing out the obvious and looking dumb, I think I may have spotted the problem! Theres a quote missing! Its so obvious that we're all simply looking for something more complex. In other words... any UPDATE will fail!

 

See where it says:

products_quantity="299 , products_status=0 WHERE

 

 

The products_quantity value should be enclosed in quotes. So it should read:

products_quantity="299", products_status=0 WHERE

 

I'll try to find where this code is written and get back with a fix. If someone else has it... please give a shout.

 

Thanks

Ian

Link to comment
Share on other sites

I put the quote in and it worked first time.

 

 

To fix:

1. open easypopulate.php

2. search for the following line. Should be line 1683 or close ther? abouts.

' , products_status=' . $v_db_status . '

 

3. replace this line with:

'" , products_status=' . $v_db_status . '

 

 

Try updating again and you should have no problem.

 

Best

Ian

Link to comment
Share on other sites

Hi,

 

i have 2 problems:

*Wen i update the products go all to inactive but it should be active where is the problem?

*I have dutch as default but need english to but i cant give a catagorie_name for english whate do i need to change

 

I use ep v2.61.1-ms2

 

thanks

 

 

Lighthouse

yes i know my english is bad, but you understand wath i mean;) if not ask

Link to comment
Share on other sites

Hi,

 

i have 2 problems:

*Wen i update the products go all to inactive but it should be active where is the problem?

*I have dutch as default but need english to but i cant give a catagorie_name for english whate do i need to change

 

I use ep v2.61.1-ms2  

 

thanks  

 

 

Lighthouse

 

As per the documentation...

If you set the quantity of an item to zero, EP will automatically make the item Inactive in the database. To change the behaviour, see the Configuration Variables section.

...

To turn off the "zero qty products are made inactive automatically":

Change the setting of the $zero_qty_inactive from true to false.

...

'v_status'

The status you want to set for this item. Defaults to Active. To make the product inactive, put the word Inactive in the field. Note: If you set a product with zero quantity active, and the $zero_qty_inactive flag in the configuration variables section is set to true, it will be inactive in the database. If you want to use different words for Active/Inactive, you can change the configuration variables $active and $inactive in the configuration variables section of easypopulate.php

...

 

As for the categories, Im not sure what to suggest. If your products are not in English either, then why bother. If they are, you could temporarily use the dutch ones but you will not get many English readers. Best advise... get them translated.

 

Best,

Ian

Link to comment
Share on other sites

w3it... YOU ARE THE GREATEST!!!! I REPLACED THAT LINE AND IT WORKS PERFECTLY!!!!! YOU DONT KNOW HOW HAPPY I AM RIGHT NOW! LOL. THANKS ALOT!

 

Shucks, you're making me blush :oops:

 

No problem. Credit where its due though. A nice contribution and worth praise indeed!

 

Thanks

Ian

Link to comment
Share on other sites

Hi,

 

my problem is the following. When i try to load up my files, i have to do it manually to my temp directory. Then when i try to import them i get this:

 

Filename: prijslijst_jbpc_atc_online_shop.txt

 

That's about all I get, and nothing happens, not one single product gets to the dbase, anyone who knows how to solve this problem

Joost Billiet

Zaakvoerder JBPC

Link to comment
Share on other sites

check the file security. It should be 777, if its not change it as this may be preventing your file from being read.

 

The directory "temp" should be set to 777. I noticed that this does not guarantee that files you place there will reflect the same setting. So its worth a check.

 

Best,

Ian

Link to comment
Share on other sites

Anyone know what this one is:

 

Easy Populate 2.41beta7 - Default Language : English(1)

 

Warning: move_uploaded_file(home/consumab/public_html/shop/temp/folex.txt): failed to open stream: No such file or directory in /home/consumab/public_html/shop/admin/includes/functions/general.php on line 789

 

Warning: move_uploaded_file(): Unable to move '/tmp/phpZfY6Wc' to 'home/consumab/public_html/shop/temp/folex.txt' in /home/consumab/public_html/shop/admin/includes/functions/general.php on line 789

 

 

File uploaded.

Temporary filename: /tmp/phpZfY6Wc

User filename: folex.txt

Size: 65050

 

Warning: file(home/consumab/public_html/shop/temp/folex.txt): failed to open stream: No such file or directory in /home/consumab/public_html/shop/admin/easypopulate.php on line 528

 

Warning: Invalid argument supplied for foreach() in /home/consumab/public_html/shop/admin/easypopulate.php on line 532

 

Upload complete

 

All permissions are 777

 

Help!

 

Thanks,

Ivan

Link to comment
Share on other sites

I came across this but I do not know if its a bug or not. Here is my work around.

 

The program references DIR_FS_DOCUMENT_ROOT from oscommerce but this does not seem to be set. You can find it in admin/includes/configure.php. I put in my directory structure and it worked. Try it.

 

Heres an example:

 

define('DIR_FS_DOCUMENT_ROOT', '/home/my_account/public_html/'); // where the pages are located on the server

 

Let me know if this works for you, as maybe it should be defined in Easy Populate. It might be a bug for shared server accounts, Im not sure.

 

Best

Ian

Link to comment
Share on other sites

Ian

 

Were you replying to me? If so, thanks for doing so.

 

I checked my configure.php file in my admin/includes and it already contains:

define 'DIR_FS_DOCUMENT_ROOT', 'home/consumab/public_html/shop'); // where the pages are located on the server

 

which I think is right, every other 'admin' command works OK.

 

Thanks,

Ivan

Link to comment
Share on other sites

Ivan

I was replying to you, but I think I see whats wrong now. You have installed to the directory "shop". osc has a default of catalog, so what I suspect is that you need to change the variable $tempdir

 

Its explained further in the manual.

 

Best

Ian

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.
Note: Your post will require moderator approval before it will be visible.

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...