The eAuction Support Forums
https://www.everyscript.de/cgi-bin/yabb/YaBB.pl
eAuction 1.6.1.x >> Discussion of Functions >> Implementing your script for auction.pl AUTOPOST.P
https://www.everyscript.de/cgi-bin/yabb/YaBB.pl?num=1101418295

Message started by www.blitzday.com on 11/25/04 at 22:31:35

Title: Implementing your script for auction.pl AUTOPOST.P
Post by www.blitzday.com on 11/25/04 at 22:31:35

Hi,

I tried to implement you autopost.pl and succeeded partially. I get the following error:

TEST SITE:

Error:

http://www.blitzday.com/cgi-bin/eAuction162/eAuction.pl?action=autopost

Error
ALIAS

What could I be doing wrongly here?

Please help anyone?

Freddy

http://www.blitzday.com becoming serious with Dieter's script ...

Title: Re: Implementing your script for auction.pl AUTOPO
Post by Dieter Werner on 11/26/04 at 12:03:36

Let me see the first three lines of your CSV file.

Title: Re: Implementing your script for auction.pl AUTOPO
Post by www.blitzday.com on 11/26/04 at 12:11:53

Hi Dieter,

xxxxxxx      xxxxxxxx                                                
ALIAS      PASSWORD      CATEGORY      TITLE      RESERVE      BID      DESC      RESERVE      INC      DAYS
Coins      Coins      100      10      Test Item      0      7      7            

Its out of format here, but i guess the issue is that the format of items x.dat does not match the format of the x.dat in your new script. Also in your script you iuse number format 7,00 and in the original script it uses 7.00 as example. I am also not sure if the INC is used in your script. I hope this helps you and me in the end :-)

Basically I need the upload.pl script in the format you use in your 161 script. And also how to create the CSV in the 161 format

Title: Re: Implementing your script for auction.pl AUTOPO
Post by www.blitzday.com on 11/26/04 at 12:13:47

I solved the Alias thing then it went sour on the category and i fixed that. But then it said the .dat was wrong and it would be posted but mess up all the 161 script. if i deleted the posted .dat then all would be normal again. i compared trhe 161 .dat next to the .dat generatred by the autopost.pl script and it does not match at all and that is why it goes wrong i guess..

Title: Re: Implementing your script for auction.pl AUTOPO
Post by Dieter Werner on 11/26/04 at 15:57:06

The script you are talking about has been written in the year 2000 by me and it is related with EveryAuction only.

Use this one (add the sub to your eAuction.pl):

Code:
#-#############################################
# Sub: Bulklister
# This processes new items from a given csv file.
# Copyright by: Dieter Werner
#-#############################################
sub proc_bulklister {
   my (
       $password, $cnt, $datuser, $datheader, $record,
       @data, @datheader, @record
   );
   local $_;
   
   $config{'csv'} = '\|';
   $config{'post_dir'} = 'autopost';
   $config{'post_dat'} = 'autopost.dat';
   
   check_dir("$config{'basepath'}$config{'post_dir'}");
   
   open BULK, "$config{'basepath'}$config{'post_dir'}/$config{'post_dat'}" or oops $!;    
   ($datuser, $datheader, @data) = <BULK>;    
   close BULK;
   
   chomp ($datuser, $datheader);
   
   $form{'FROMPREVIEW'} = 1;
   ($form{'ALIAS'}, $form{'PASSWORD'}) = split /$config{'csv'}/, $datuser;
       
   @datheader = split /$config{'csv'}/, $datheader;

       foreach $record (@data) {
           chomp $record;
           @record = split /$config{'csv'}/, $record;            
           $form{$_} = shift @record foreach @datheader;              
           oops('The category does not exist') unless $category{$form{'CATEGORY'];            
           proc_new();
           $cnt++;
           undef @record;
       }
   
   delete $form{'FROMPREVIEW'};
   
   print qq|<br><br>\n<div align="center">$cnt items were posted successfully.<br><br></div>\n|;

}


Add this line to the event-block of eAuction.pl

Code:

       'autopost'            =>  \&proc_bulklister,


Examle of the CSV file:

Quote:
YourAlias|YourPassword
CATEGORY|TITLE|RESERVE|INC|DESC|IMAGE0|START_DAYS|START_HOUR|START_MIN|START_SEC|DAYS|HOUR|MIN|SEC|BID|BUY_IT
computer|Bulklister01|1.00|1.00|The Description|http://www.interwer.com/auktionstext/images/nokia8210.gif|0|14|40|0|7|14|40|0|10.00|50.00
computer|Bulklister02|1.00|1.00|The Description|http://www.interwer.com/auktionstext/images/nokia8210.gif|0|14|40|0|7|14|40|0|10.00|50.00
computer|Bulklister03|1.00|1.00|The Description|http://www.interwer.com/auktionstext/images/nokia8210.gif|0|14|40|0|7|14|40|0|10.00|50.00
computer|Bulklister04|1.00|1.00|The Description|http://www.interwer.com/auktionstext/images/nokia8210.gif|0|14|40|0|7|14|40|0|10.00|50.00
computer|Bulklister05|1.00|1.00|The Description|http://www.interwer.com/auktionstext/images/nokia8210.gif|0|14|40|0|7|14|40|0|10.00|50.00


This addon has been tested and it is working very well.

Title: Re: Implementing your script for auction.pl AUTOPO
Post by www.blitzday.com on 11/26/04 at 16:41:27

Excellent, except:

http://www.blitzday.com/cgi-bin/eAuction161/eAuction.pl?action=autopost

Check it please.

I had to change the 1.00 in 1,00 as well to make it work this far, but if I do this for the buy-it it does keep hanging on this error... each step we are getting closer to the solution :-) thank you! I gave you a little beer funding for your help.

xxxxxxxx|xxxxxxxx
CATEGORY|TITLE|RESERVE|INC|DESC|IMAGE0|START_DAYS|START_HOUR|START_MIN|S TART_SEC|DAYS|HOUR|MIN|SEC|BID|BUY_IT
Adult|Bulklister01|1,00|1,00|Test|http://www.interwer.com/auktionstext/images/nokia8210.gif|0|14 |40|0|7|14|40|0|10,00|0,00

Title: Re: Implementing your script for auction.pl AUTOPO
Post by Dieter Werner on 11/26/04 at 16:51:42

Seems to be a bad setting of the related config-variables.
As I told you already before...  ;)
The addon has been tested and it is working very well.

Title: Re: Implementing your script for auction.pl AUTOPO
Post by www.blitzday.com on 11/26/04 at 16:53:57

So I can't use your script?

Title: Re: Implementing your script for auction.pl AUTOPO
Post by Dieter Werner on 11/26/04 at 16:57:46

Use it or do whatever you want to do with it  :)
It's free of any charge and it is working with eAuction v.1.6.1.x

Title: Re: Implementing your script for auction.pl AUTOPO
Post by www.blitzday.com on 11/27/04 at 12:07:14

Yeah, you told me now, but what do you mean with there is some setting wrong in the config part? what setting would that be then?

Title: Re: Implementing your script for auction.pl AUTOPO
Post by Dieter Werner on 11/27/04 at 12:43:43


www.blitzday.com wrote:
Yeah, you told me now, but what do you mean with there is some setting wrong in the config part? what setting would that be then?


The internal use of numbers (currencies too) is
###.## (for instance: 1.00, 20.00, 100.00)

The config variables:

Code:
#-#############################################
# Config-Section-03
# The Config-Variables of: form_date
#-#############################################
  $config{'continent'}              = 0;      # 0 = USA  1 = Others
  $config{'time_delay'}              = 0;      # time delay  (Server/Client)
 
#-#############################################
# Config-Section-04
# The Config-Variables of: form_currency
#-#############################################
  $config{'currency'}            = 0;      # 0 = USA  1 = Others
  $config{'cur_symbol'}      = '$';      # Your Currency-Symbol
  $config{'allow_cent'}            = 1;      # 0 = No |  1 = Yes


are important for the displayed format of numbers and currencies.

Title: Re: Implementing your script for auction.pl AUTOPO
Post by www.blitzday.com on 11/27/04 at 14:53:19

Hi,

The config variables are in the script with blitzday:

#-#############################################
# Config-Section-03
# The Config-Variables of: form_date
#-#############################################
  $config{'continent'}              = 1;      # 0 = USA  1 = Others
  $config{'time_delay'}              = 0;      # time delay  (Server/Client)
 
#-#############################################
# Config-Section-04
# The Config-Variables of: form_currency
#-#############################################
  $config{'currency'}            = 1;      # 0 = USA  1 = Others
  $config{'cur_symbol'}      = '€';      # Your Currency-Symbol
  $config{'allow_cent'}            = 1;      # 0 = No |  1 = Yes
 
  my $titlelength = 22; # length in characters



I do not see any variations there do you?

Freddy

Title: Re: Implementing your script for auction.pl AUTOPO
Post by www.blitzday.com on 11/27/04 at 14:56:15

of course there is the variation of $ instead of € in your example and I used option 1 for other so might that be why i had to change your script addon in 1,00 instead of 1.00 like opening bid 1.00 gives an error opening bid error if i change it in 1,00 the error goes away and continues to reserve error. changing thaqt from x.00 to x,00 did not make the error go away? Do you still understand what I mean?

Title: Re: Implementing your script for auction.pl AUTOPO
Post by Dieter Werner on 11/27/04 at 15:43:08


www.blitzday.com wrote:
of course there is the variation of $ instead of € in your example and I used option 1 for other so might that be why i had to change your script addon in 1,00 instead of 1.00 like opening bid 1.00 gives an error opening bid error if i change it in 1,00 the error goes away and continues to reserve error. changing thaqt from x.00 to x,00 did not make the error go away? Do you still understand what I mean?


Sorry - but your 'running' script has been modified by you and I don't know what you have done.
So this 'bulklister' thing has been written to work with the 'Original' of eAuction and that's what it does.

Hey man - you are talking to the author of a free of charge script ...
and now you have gotten a free of charge addon - do you remember these facts?  ::)

On the other hand ...
- you are using my code and you maintain neither my copyright nor my (back) links
- you are searching, via your forums, for a good Perl programmer  
- you are using my forums in order to become rude against me

But OK ...  
there is no need to become friends.
I promised to support every user and I use to keep my promises; but please, play 'nice' and write 'nice'.  



Title: Re: Implementing your script for auction.pl AUTOPO
Post by mick2005 on 09/01/05 at 15:33:39

Hi Dieter,

i do exact what you do here. My autolister works fine, there is no error-message and it tell 'items was listed' , but: the items do no will be shown in the categories or elsewhere. Also on the server, in the directorys, there are not saved! what do i wrong?? Handmade auctions works fine.

mick2005

Title: Re: Implementing your script for auction.pl AUTOPO
Post by Dieter Werner on 09/01/05 at 16:03:05

Has the directory 'autopost' been created at your server?

Title: Re: Implementing your script for auction.pl AUTOPO
Post by mick2005 on 09/01/05 at 17:45:28

The directory and the name of the file in there is...

cgi-bin/eauction/autopost/autopost.dat

or do you mean a listing on the root-even?  there is none, since application runs exclusively in the cgi listing.


testx|testy
computer|testitem|120,00|10,00|testdesc|http://www.test.de/produkte/10/10369_norm.jpg|0|14 |40|0|7|14|40|0|10,00|120,00

Title: Re: Implementing your script for auction.pl AUTOPO
Post by Dieter Werner on 09/02/05 at 10:23:37


mick2005 wrote:
The directory and the name of the file in there is...

cgi-bin/eauction/autopost/autopost.dat

or do you mean a listing on the root-even?  there is none, since application runs exclusively in the cgi listing.


testx|testy
computer|testitem|120,00|10,00|testdesc|http://www.test.de/produkte/10/10369_norm.jpg|0|14 |40|0|7|14|40|0|10,00|120,00


/cgi-bin/eauction
is the directory that contains the .pl files

/autopost/autopost.dat
must be a part of the directory that contains the .dat files

the .csv file must contain this line (no linebreak please):
CATEGORY|TITLE|RESERVE|INC|DESC|IMAGE0|START_DAYS|START_HOUR|START_MIN|START_SEC|DAYS|HOUR|MIN|SEC|BID|BUY_IT

Example:

testx|testy
CATEGORY|TITLE|RESERVE|INC|DESC|IMAGE0|START_DAYS|START_HOUR|START_MIN|START_SEC|DAYS|HOUR|MIN|SEC|BID|BUY_IT
computer|testitem|120,00|10,00|testdesc|http://www.test.de/produkte/10/10369_norm.jpg|0|14 |40|0|7|14|40|0|10,00|120,00

Title: Re: Implementing your script for auction.pl AUTOPO
Post by mick2005 on 09/02/05 at 12:02:16

So, the dir is:

/cgi-bin/eauction
is the directory that contains the .pl files = correct, o.k.!

/cgi-bin/eauction/autopost/autopost.dat
is, where the pl calls the dat file - he found it, theres no error in!

the result is:

"items were posted successfully"

but: in the categories a n d in the directorys are nothing!
what do i wrong?

offcourse, i do from the csv

testx|testy  
CATEGORY|TITLE|RESERVE|INC|DESC|IMAGE0|START_DAYS|START_HOUR|START_MIN|S TART_SEC|DAYS|HOUR|MIN|SEC|BID|BUY_IT  
computer|testitem|120,00|10,00|testdesc|http://www.test.de/produkte/10/10369_norm.jpg|0|14 |40|0|7|14|40|0|10,00|120,00  

the change into following...

testx|testy  
computer|testitem|120,00|10,00|testdesc|http://www.test.de/produkte/10/10369_norm.jpg|0|14 |40|0|7|14|40|0|10,00|120,00  

if i don't, i get an error!

mick2005

Title: Re: Implementing your script for auction.pl AUTOPO
Post by Dieter Werner on 09/02/05 at 12:25:20

This line:
 
CATEGORY|TITLE|RESERVE|INC|DESC|IMAGE0|START_DAYS|START_HOUR|START_MIN|START_SEC|DAYS|HOUR|MIN|SEC|BID|BUY_IT

is a must and it must be the 2. line of the .csv file.

Please, post the error message you got.

Title: Re: Implementing your script for auction.pl AUTOPO
Post by mick2005 on 09/02/05 at 14:42:55

o.k., i do 3 lines as following:

testx|testy
CATEGORY|TITLE|RESERVE|INC|DESC|IMAGE0|START_DAYS|START_HOUR|START_MIN|S TART_SEC|DAYS|HOUR|MIN|SEC|BID|BUY_IT  
Kleidung|testitem|120.00|10.00|testdesc|http://www.test.de/produkte/10/10369_norm.jpg|0|14 |40|0|7|14|40|0|10.00|120.00

changed the category (cause computer don't exist), use my original logins and get following error (sorry, error in german... but i know: Y O U  understand it well ;-))

Fehler
Bitte geben Sie einen gültigen Start-Preis ein

...so i changed the dot into kommata, and get...

Fehler
Bitte geben Sie einen gültigen Sofortverkaufs-Preis ein

hmmm???

mick2005


Title: Re: Implementing your script for auction.pl AUTOPO
Post by Dieter Werner on 09/02/05 at 15:09:03

Kleidung|testitem|120.00|10.00|testdesc|http://www.test.de/produkte/10/10369_norm.jpg|0|14 |40|0|7|14|40|0|10.00|120.00

change
10.00 into 10,00
120.00 into 120,00
and try again ...

Title: Re: Implementing your script for auction.pl AUTOPO
Post by mick2005 on 09/02/05 at 15:45:07

changed...

Kleidung|testitem|120.00|10.00|testdesc|http://www.test.de/produkte/10/10369_norm.jpg|0|14 |40|0|7|14|40|0|10,00|120,00

result:
[glb]
Fehler
Bitte geben Sie einen gültigen Sofortverkaufs-Preis ein[/glb]

mick2005  :'(

Title: Re: Implementing your script for auction.pl AUTOPO
Post by mick2005 on 09/02/05 at 18:35:59

hi Dieter,

i got a nick for the german forum.

is it possible to change for you and me to there - is a better understanding. so if is ok, i will open there a new item!

mick2005

Title: Re: Implementing your script for auction.pl AUTOPO
Post by Dieter Werner on 09/02/05 at 21:20:41

No problem ...

Title: Re: Implementing your script for auction.pl AUTOPO
Post by mick2005 on 09/03/05 at 08:43:54

http://www.everyscript.de/cgi-bin/deyabb/YaBB.pl?board=general;action=display;num=1125729775

Title: Re: Implementing your script for auction.pl AUTOPO
Post by Dieter Werner on 09/03/05 at 10:31:10


mick2005 wrote:
changed...

Kleidung|testitem|120.00|10.00|testdesc|http://www.test.de/produkte/10/10369_norm.jpg|0|14 |40|0|7|14|40|0|10,00|120,00

result:
[glb]
Fehler
Bitte geben Sie einen gültigen Sofortverkaufs-Preis ein[/glb]

mick2005  :'(


What you did is incorrect.
For the use of Euro notification ...
you should write it this way:

testx|testy  
CATEGORY|TITLE|RESERVE|INC|DESC|IMAGE0|START_DAYS|START_HOUR|START_MIN|S  TART_SEC|DAYS|HOUR|MIN|SEC|BID|BUY_IT  
computer|testitem|120,00|10,00|testdesc|http://www.test.de/produkte/10/10369_norm.jpg|0|14 |40|0|7|14|40|0|10,00|120,00

That means:
each ammount has to written as
###,##
#.###,##


The eAuction Support Forums » Powered by YaBB 2.2!
YaBB © 2000-2007. All Rights Reserved.