Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

auctionTastic


FWR Media

Recommended Posts

It is not your server Chooch, I managed to replicate this problem, the fix I believe is below: -

 

catalog/includes/modules/auctions/js/countdown.js

 

find ..

 

var dthen = new Date(TargetDate);
var dnow = new Date();

if(CountStepper>0)
 ddiff = new Date(dnow-dthen);
else
 ddiff = new Date(dthen-dnow);
gsecs = Math.floor(ddiff.valueOf()/1000);

CountBack(gsecs);

 

Replace with ...

if(CountStepper>0)
 ddiff = new Date(TimeDiff);
else
 ddiff = new Date(TimeDiff);
gsecs = Math.floor(ddiff.valueOf()/1000);

CountBack(gsecs);

 

catalog/includes/modules/auctions/auction_bids.php

 

Find ...

 

<noscript>
<?php
  $this->auctionsCountdown($this->auctions['auctions'][$this->auctionKey]->expires_date); 
?>
</noscript>
<script language="javascript" type="text/javascript">
TargetDate = "<?php echo date("m/d/Y H:i:s", strtotime($this->auctions['auctions'][$this->auctionKey]->expires_date)); ?>";
CountActive = true;
CountStepper = -1;
LeadingZero = true;
DisplayFormat = "%%D%% Day(s), %%H%% Hour(s), %%M%% Minute(s), %%S%% Second(s).";
FinishMessage = "<?php echo COUNTDOWN_COMPLETE; ?>";
</script>

 

Replace with ...

 

<noscript>
<?php
  $this->auctionsCountdown($this->auctions['auctions'][$this->auctionKey]->expires_date); 
?>
</noscript>
<?php
 $time_diff = (strtotime($this->auctions['auctions'][$this->auctionKey]->expires_date) - time());
?>
<script language="javascript" type="text/javascript">
function Redirect()
{
window.location="<?php echo tep_href_link(FILENAME_PRODUCT_INFO,'products_id=' . $this->auctions['auctions'][$this->auctionKey]->products_id . '&page=' . (int)$_GET['page'] . '&auction_show=1'); ?>";
}
TargetDate = "<?php echo date("m/d/Y H:i:s", strtotime($this->auctions['auctions'][$this->auctionKey]->expires_date)); ?>";
TimeDiff = "<?php echo date("m/d/Y H:i:s", $time_diff); ?>";
CountActive = true;
CountStepper = -1;
LeadingZero = true;
DisplayFormat = "%%D%% Day(s), %%H%% Hour(s), %%M%% Minute(s), %%S%% Second(s).";
FinishMessage = "<?php echo COUNTDOWN_COMPLETE; ?>";
</script>

 

 

FWR it is amazing that the other posters frequenting the thread didn't notice it before me or even bother testing it after I highlighted it as a possible problem? At least some one could have tried to test it ashte goal of people asking you for a beta version was to test and identify any problems/possible problems. I was going loopy there thinking something was up wrong with my hosts server. I will change the code and update you when I get a chance.

 

That still leaves the 'status' issue in admin to be looked at, I think I will return to this later this evening as I have to go out in a bit. After adding and confirming the clocks are in sync I will have to look in to the admin status issue.

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

@Chooch

 

My apologies the code I gave was wrong .. try the below: -

 

auction_bids should look like . .

 

<noscript>
<?php
  $this->auctionsCountdown($this->auctions['auctions'][$this->auctionKey]->expires_date); 
?>
</noscript>
<script language="javascript" type="text/javascript">
function Redirect()
{
window.location="<?php echo tep_href_link(FILENAME_PRODUCT_INFO,'products_id=' . $this->auctions['auctions'][$this->auctionKey]->products_id . '&page=' . (int)$_GET['page'] . '&auction_show=1'); ?>";
}
TargetDate = "<?php echo date("m/d/Y H:i:s", strtotime($this->auctions['auctions'][$this->auctionKey]->expires_date)); ?>";
CurrentTime = "<?php echo date("m/d/Y H:i:s"); ?>";
CountActive = true;
CountStepper = -1;
LeadingZero = true;
DisplayFormat = "%%D%% Day(s), %%H%% Hour(s), %%M%% Minute(s), %%S%% Second(s).";
FinishMessage = "<?php echo COUNTDOWN_COMPLETE; ?>";
</script>

 

countdown.js should look like ...

 

var dthen = new Date(TargetDate);
var dnow = new Date(CurrentTime);

if(CountStepper>0)
 ddiff = new Date(dnow-dthen);
else
 ddiff = new Date(dthen-dnow);
gsecs = Math.floor(ddiff.valueOf()/1000);

CountBack(gsecs);

Link to comment
Share on other sites

FWR I will add it within the next 30mins and update you.

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

FWR I will add it within the next 30mins and update you.

 

Thanks

 

@ Chooch and Ankur

 

Have sent you both emails with a link to a newer version (in case it's easier than adding all the minor changes). If on modified sites the only changes are in the "upload folder" no changes to core files.

Link to comment
Share on other sites

@Chooch

 

My apologies the code I gave was wrong .. try the below: -

 

auction_bids should look like . .

 

<noscript>
<?php
  $this->auctionsCountdown($this->auctions['auctions'][$this->auctionKey]->expires_date); 
?>
</noscript>
<script language="javascript" type="text/javascript">
function Redirect()
{
window.location="<?php echo tep_href_link(FILENAME_PRODUCT_INFO,'products_id=' . $this->auctions['auctions'][$this->auctionKey]->products_id . '&page=' . (int)$_GET['page'] . '&auction_show=1'); ?>";
}
TargetDate = "<?php echo date("m/d/Y H:i:s", strtotime($this->auctions['auctions'][$this->auctionKey]->expires_date)); ?>";
CurrentTime = "<?php echo date("m/d/Y H:i:s"); ?>";
CountActive = true;
CountStepper = -1;
LeadingZero = true;
DisplayFormat = "%%D%% Day(s), %%H%% Hour(s), %%M%% Minute(s), %%S%% Second(s).";
FinishMessage = "<?php echo COUNTDOWN_COMPLETE; ?>";
</script>

 

countdown.js should look like ...

 

var dthen = new Date(TargetDate);
var dnow = new Date(CurrentTime);

if(CountStepper>0)
 ddiff = new Date(dnow-dthen);
else
 ddiff = new Date(dthen-dnow);
gsecs = Math.floor(ddiff.valueOf()/1000);

CountBack(gsecs);

 

 

I still have the same mis-match time issues even with the code added both on a fresh install of RC2+auctions and also a modified site. The only common denominator is they are on the same host/server

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

I still have the same mis-match time issues even with the code added both on a fresh install of RC2+auctions and also a modified site. The only common denominator is they are on the same host/server

 

Well I managed to replicate the issue and it's solved my side.

 

I presume you did a hard refresh Ctrl + F5 to reload the js.

Link to comment
Share on other sites

Thanks

 

@ Chooch and Ankur

 

Have sent you both emails with a link to a newer version (in case it's easier than adding all the minor changes). If on modified sites the only changes are in the "upload folder" no changes to core files.

 

Thank you FWR I Received your mail.

 

One small favor, as I alws update my version with the changes, it will be very helpful if you can list down the changes between last version(beta2) and this !!! Please as this will be very fruitful for me.

 

@Chooch

 

I also tested the changes for catalog/auction.php and catalog/product_info, it is working now with latest change as syncronise and perfect.

 

You will not beleive but today I was about to inform FWR about this.......

 

This is basicaly fault of server side and client side script........Earlier version was taking your system time as current time and after this new posted change sytem will take server time as current time......

 

If you change your current system time with old version you will find more time gap..........

Edited by ankurdhoom
Link to comment
Share on other sites

Well I managed to replicate the issue and it's solved my side.

 

I presume you did a hard refresh Ctrl + F5 to reload the js.

 

Just did a hard refresh and yes it is in sync. I still have to check out if it will still allow me to bid on an ended auction. I will post my results in a bit.

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

The issue of bids being placed after auctions ended has gone, I am now automatically directed back to catalog/auctions.php and no bids can be placed after the auction has ended. Tomorrow I will add the auto-refresh page code and look for any updates suggested and then double check everything is working in the front end - from what I can see it already is but will update after adding the code. Once confirmed it is working I have to take a deeper look in to the admin/auctions issue of why it isn't showing the 'status'.

 

It looks like I'm to just down to one problem left to solve.

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

Thanks to both of you for your efforts .. absolutely impossible to make solid something this complex without testing and feedback.

Link to comment
Share on other sites

But the file is exactly on the right place:

 

atalog/includes/modules/auctions/classes/oscAuctions.php

 

and on my EasyPHP it is working.

 

 

Can enybody help me with my problem please?

 

Thanks.

 

ldon

Link to comment
Share on other sites

Thanks to both of you for your efforts .. absolutely impossible to make solid something this complex without testing and feedback.

 

FWR anything we've done is actually quite little compared to what you done ;)

 

Can you please add the SQL code here so I can compare it with what I have in the store, maybe there isn't anything in the database to capture the 'won' status. I just need to eliminate this possibility

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

FWR anything we've done is actually quite little compared to what you done ;)

 

Can you please add the SQL code here so I can compare it with what I have in the store, maybe there isn't anything in the database to capture the 'won' status. I just need to eliminate this possibility

 

Are you using the file from the latest package? sent you an email with a link for download yesterday. If nothing else use the admin/auctions.php.

Edited by FWR Media
Link to comment
Share on other sites

Are you using the file from the latest package? sent you an email with a link for download yesterday. If nothing else use the admin/auctions.php.

 

Thanks, checking...

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

Right, here goes.

 

I've downloaded beta4 and added the core files to the fresh install and I still have the same problem regarding the 'status won' in admin and also I have an issue I didn't know existed until I saw in the 'winning bid' gif in modules/auction.

 

In all of my testing on a heavily modified store and on a fresh installation of RC2 the 'winning bid' has never show up. I think both of these issues may be related albeit specific to my host but has anyone else encountered the 'winning bid' gif not showing?

 

Where does the winning bid gif appear?

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

Right, here goes.

 

I've downloaded beta4 and added the core files to the fresh install and I still have the same problem regarding the 'status won' in admin and also I have an issue I didn't know existed until I saw in the 'winning bid' gif in modules/auction.

 

In all of my testing on a heavily modified store and on a fresh installation of RC2 the 'winning bid' has never show up. I think both of these issues may be related albeit specific to my host but has anyone else encountered the 'winning bid' gif not showing?

 

Where does the winning bid gif appear?

 

You wont because if bid_status does not == won then the image is not shown.

Edited by FWR Media
Link to comment
Share on other sites

You wont because if bid_status does not == won then the image is not shown.

 

Could you just confirm that TABLE_AUCTIONS_BIDS exists in database_tables

Link to comment
Share on other sites

You wont because if bid_status does not == won then the image is not shown.

 

I just revisted the gif with status won and remove showing, by that image I take it the 'winning big' gif shows in catalog/product_info_auctions and not in admin.

 

Just for clarity the winning bidder and winning bid appears in admin and on product info. The item is automatically added to cart and cannot be removed. Once checkout is completed the item bidders list vanishes from admin/auctions. All winning and outbid emails are sent out as they should.

 

The contribution works for me as it is and I can put it in a live store as the issue of not being able to remove bidders isn't the be all and end all as the core functions work but this could prove to cause trouble for me later so I will continue to check possibilities. And as for the 'winning bid' gif not appearing in product info there has to be an explanation.

 

 

FWR, can you please take a look at the database:

============================================================

$tables_to_add = array('auctions' => "CREATE TABLE `auctions` (

`auctions_id` int(11) NOT NULL auto_increment,

`products_id` tinytext NOT NULL,

`auctions_starting_price` decimal(15,4) NOT NULL default '0.0000',

`auctions_date_added` datetime default NULL,

`auctions_last_modified` datetime default NULL,

`expires_date` datetime default NULL,

`date_status_change` datetime default NULL,

`status` int(1) NOT NULL default '1',

`overbid_amount` float(10,2) NOT NULL default '0.00',

`notified` int(1) NOT NULL default '0',

`auction_paid` int(1) NOT NULL default '0',

`auctions_nb` int(5) unsigned zerofill default '00000',

`auctions_max` decimal(15,2) default '0.00',

`auctions_high_cust` int(15) default NULL,

PRIMARY KEY (`auctions_id`)

);",

'auctions_attributes' => "CREATE TABLE `auctions_attributes` (

`auctions_attributes_id` int(11) NOT NULL auto_increment,

`auctions_id` int(11) NOT NULL,

`products_id` tinytext NOT NULL,

`products_options_id` int(11) NOT NULL,

`products_options_value_id` int(11) NOT NULL,

PRIMARY KEY (`auctions_attributes_id`)

);",

'auctions_bids' => "CREATE TABLE `auctions_bids` (

`auctions_bids_id` int(11) NOT NULL auto_increment,

`auctions_id` int(11) NOT NULL default '0',

`customers_id` int(11) NOT NULL default '0',

`bid_price` float(10,2) NOT NULL default '0.00',

`bid_status` varchar(10) collate latin1_general_ci default NULL,

`bid_date_added` datetime NOT NULL,

PRIMARY KEY (`auctions_bids_id`)

);");

 

============================================================

 

Where in the database modifications are the winning bidders linking with the REMOVE and STATUS options in admin/auctions?

 

Apart from the configuration modifications this was the key part of the database and I am little baffled.

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

Could you just confirm that TABLE_AUCTIONS_BIDS exists in database_tables

 

I see there we were both thinking about the database. I compared your first release installer file witht the latest release one and there isn't anything as a difference wise. I also went in to phpmyadmin to check for myself and the 3 tables exist:

 

Auctions

Auctions Attributes

Auctions Bids

 

Here's what I'll do, I keep the files as they are on the fresh install and re-install a fresh RC2 database and then add the auction modifications to the database without using the installer - probably won't do much but I'm stumped at the moment so worth a try I guess

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

I see there we were both thinking about the database. I compared your first release installer file witht the latest release one and there isn't anything as a difference wise. I also went in to phpmyadmin to check for myself and the 3 tables exist:

 

Auctions

Auctions Attributes

Auctions Bids

 

Here's what I'll do, I keep the files as they are on the fresh install and re-install a fresh RC2 database and then add the auction modifications to the database without using the installer - probably won't do much but I'm stumped at the moment so worth a try I guess

 

You still haven't confirmed that TABLE_AUCTIONS_BIDS exists (as a define()) in includes/database_tables.php

Edited by FWR Media
Link to comment
Share on other sites

I just took out the auction sql and re-added it, same issue for status not showing won and remove not showing.

 

Yes both includes database files have them included

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

I'm going to the server configurations and having a look at the settings for now just in case something stands out. I'll post back here later

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

Hi FWR & CHOOCH,

 

I have tested this today on both fresh and modified Shop, it is working fine. After more then one bidding and after time expires the admin auction add page is getting populated along with new table, where for the top most user(winner) i am getting remove option.

 

One question FWR,

 

After removing the top most user(winner),

 

1.The item is not geting off from user cart immediatly, user has to sign off then only it is removing from cart, but mail to next user is going instantly.

2.The table on admin page is not showing immediately after remove button press and page referesh, it is also waiting for some thing, may be sign-off for top winner or may be some thing else?

 

Any comments on this are welcome.

 

Also Chooch is 100% right your effort is much much more then any one else, thanks for valueable code.

 

Regards,

Ankurdhoom

Link to comment
Share on other sites

Hi FWR & CHOOCH,

 

I have tested this today on both fresh and modified Shop, it is working fine. After more then one bidding and after time expires the admin auction add page is getting populated along with new table, where for the top most user(winner) i am getting remove option.

 

One question FWR,

 

After removing the top most user(winner),

 

1.The item is not geting off from user cart immediatly, user has to sign off then only it is removing from cart, but mail to next user is going instantly.

 

If the top most winner is currently logged in then their cart is based on their session, nothing you do to the DB can affect their existing session.

 

2.The table on admin page is not showing immediately after remove button press and page referesh, it is also waiting for some thing, may be sign-off for top winner or may be some thing else?

 

Bit late here (tired) but I'm not understanding the question tbh.

Link to comment
Share on other sites

No what I'm saying is ..

 

Notice: Undefined variable: oscAuctions in /home/xxx/public_html/xxx/includes/boxes/categories.php on line 134

Fatal error: Call to a member function categoriesAdd() on a non-object in /home/xxx/public_html/xxx/includes/boxes/categories.php on line 134

 

ONLY can happen if the class is not instantiated in application_top.php.

 

I have just installed your beta2 and seems to work great.

 

Thanks keep up the good work :rolleyes:

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