v1.1.0 I Would Like Delete Option on Winners Details Screen

Discussion in 'General PHP' started by DrJ, Oct 9, 2013.

  1. DrJ

    DrJ Active Member

    Joined:
    Jun 17, 2013
    Messages:
    510
    Likes Received:
    61
    Can anyone tell me how much code I need to copy from the yourauctions_c.php file in order to create the same column in the "Winners Details" screen, which is actually part of the sell.php file. I have users with more than 100 sold auction items and they would like to delete the auction once the item is paid for to reduce the number of auctions to look through. Right now, I am keeping the auctions for 30 days to insure they aren't deleted before they are paid for. I am not proficient in php, and although I can find the "Delete" portion of the code in the yourauctions_c.php file, I don't know how much is necessary. And help with this mod is greatly appreciated.
     
  2. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    Hi DrJ, yes I know what you mean, I was thinking down the line of possibly the user being able to hide them, and for them to be able to access them if needed until they are deleted on their own. this can be done by adding another field in the table (once we make sure this does not interfere with anything else). User will be able to set this and once set it will hide the sale from the page (when we pull the sales all we need to do is check to see if that var has been set. If set move on to next). Then we could have a button to reset them all so the user can pull all the hidden ones up again if needed. Your thoughts
     
  3. DrJ

    DrJ Active Member

    Joined:
    Jun 17, 2013
    Messages:
    510
    Likes Received:
    61
    I like your idea of have the option to hide them until they are automatically removed. That would solve the problem of having to look through all the items and yet keep them available for a period of time if they are needed. It seems like the coding for this would also be easier(I'm guessing). If the items could still be found using the advanced search function, the seller could still refer to them if needed.
     
  4. DrJ

    DrJ Active Member

    Joined:
    Jun 17, 2013
    Messages:
    510
    Likes Received:
    61
    It's been about a month so I thought I would bump this thread to see if you or anyone has had time to think about the hide option. :)
     
  5. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    Hi DrJ,
    I have not had time to delve into the user side yet. I have nearly completed theme change and just been trying out some speed tests. Next on the list is visiting user side pages and making changes to anything I can on that side with Winners Details being one of the major things.
     
  6. DrJ

    DrJ Active Member

    Joined:
    Jun 17, 2013
    Messages:
    510
    Likes Received:
    61
    Hi pani100, I'm sure you are busy and I appreciate the response. As I said, just giving the thread a bump since it has been a while. ;)
     
  7. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    Hi DrJ, time has come to look into this and outstanding pages.
    Is it the Winners details (selling.php) or Auctions you won (buying.php ) page you want to limit the items in?

    Some system with sorting (payed, not payed) maybe with default showing of not payed?
    Daily,Weekly or monthly display?
    Will Attempt to join all sorting together


    Just after your thoughts on the outstanding page too in the user control panel.
    Will be starting a new thread for that here.
     
    Last edited: Dec 30, 2013
  8. DrJ

    DrJ Active Member

    Joined:
    Jun 17, 2013
    Messages:
    510
    Likes Received:
    61
    Hi pani100, hope you had a nice holiday and let me wish you a Happy New Year!
    As I stated, I have a seller who has sold over 300 items on my site. When an item is paid for, she marks it as paid in the "Winners Details" screen(part of selling.php). Unfortunately, marking the item as paid doesn't remove it from the list and when the next winner come in to pay, she has to search through many items, both paid and unpaid, to find the correct item. She asked if there could be a way to delete the item from the list after it is paid for. You suggested that maybe a way to "hide" the item would be better, or easier. At the very least(I prefer the "hiding" of an item), sorting the list so that unpaid items were listed first, would be acceptable. Thanks for getting back to me on this issue.

    I'll give some thought to the outstanding page and comment in the new thread you start.
     
  9. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    DrJ, Wishing you a Happy New Year to you too. Break was nice and relaxing, hope it was same for you.
    I have just been looking into updating the invoice system on my older version, but table and column names have been changed a bit and will take a little longer to complete. Why does updating have to be such a pain:mad:
     
  10. bmroy

    bmroy Member

    Joined:
    Apr 6, 2012
    Messages:
    57
    Likes Received:
    6
    DrJ,

    I know on our site we have the option to archive the auction. This allows the auction to be moved to another tab and not displayed in the active auction tab. Another variable was assigned to the item so it could be archived. May want to look at adding another tab for archived auctions that way they can re-list from old items and it is not deleted. I absolutely hate deleting items from the site as Google does index those completed items which I feel help strengthen the search response, but that is only my stance on the situation. Just my 2 cents..

    bmroy
     
  11. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    hi bmroy,
    this is for Winners Details page (selling.php) which has all the user sold item records. We will not be deleting anything. All we want is to have various options, like hiding paid for items and maybe some sorting options as if you have sold many items they all show on the page.
    A tab system for paid and not paid is a good option. Let me start with this and see how we progress
     
  12. bmroy

    bmroy Member

    Joined:
    Apr 6, 2012
    Messages:
    57
    Likes Received:
    6
    Pani100,

    Sorry I was thinking a bit different, but from what you said the sorting and hiding option for Paid items should be pretty straight forward and is probably a bit easier to implement. Check box at the top of table to Hide Paid items and a maybe insert some code regarding variable order to the table so when you click the header or an arrow in the header row of the table it sorts by that column. Sounds like happiness.

    Bmroy
     
  13. DrJ

    DrJ Active Member

    Joined:
    Jun 17, 2013
    Messages:
    510
    Likes Received:
    61
    Now we are all on the same page! :D I have faith that pani100 will come up with a good solution.
     
  14. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    Hi DrJ,
    I have reached a good point for this page, added pagination with a tab system and ajax loading.
    Have a play with this and see what you think.
    Attached files selling.php, selling.tpl and tabs.js for the tabs. Put the js file in your root/js folder. The other 2 , save your original files and overwrite with the new.
    view thread for updated files​
     
    Last edited: Jan 5, 2014
    DrJ likes this.
  15. DrJ

    DrJ Active Member

    Joined:
    Jun 17, 2013
    Messages:
    510
    Likes Received:
    61
    Hi pani100, I'll give it a look and do some testing. Thanks in advance for your time and expertise.


    UPDATE: Replaced the selling.php and selling.tpl files in their respective folders. Added the tabs.js file to the JS folder. Ran a test auction to populate the screen.

    RESULT: Attempting to access the Winners Detail screen results in the standard error message and no information is displayed.
     
    Last edited: Jan 4, 2014
  16. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    Hi DrJ,
    attached updated files with dare sorting. The buttons are not working yet but date dropdown is ok. See if that works and post any errors in your logs.
     
    Last edited: Jan 5, 2014
  17. DrJ

    DrJ Active Member

    Joined:
    Jun 17, 2013
    Messages:
    510
    Likes Received:
    61
    Hi pani100, the new files are a big improvement. The page now loads with only three notices of undefined variables, listed below. I can now do a little testing to see what happens and will report any issues.

     
  18. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    Hi DrJ, just turned error reporting on as it was set to the default(not debugging) and can see them there too.
    Delete line 92 as not needed.
    I will look on the other 2 errors, and see what else we can add in there.

    Update 2:

    line 322 and 323 replace with
    PHP:
    $form_refresh_ipp 1;
    $form_refresh_order 1;
    They are redundant due to the ajax and independent pagination for each tab but are needed to add the onclick in the input.
     
    Last edited: Jan 5, 2014
  19. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    Hi DrJ,
    revision3 is ready for download. Code cleaned and all working with no errors down my end. Just a bit of bug testing needed.
    If you want something different or anything else added just say.

    Update:
    Revision 4 Beta with tabs updating too. View attachment selling rev4 Beta.zip
     
    Last edited: Jan 5, 2014
  20. DrJ

    DrJ Active Member

    Joined:
    Jun 17, 2013
    Messages:
    510
    Likes Received:
    61
    Hi pani100, I will try and give it a couple of hours of testing today. I will report back with any problems. Thanks for all your hard work.
     

Share This Page