Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As I understand correctly, for now, end of auction is detect only when somebody visit auction node. Then the commerce_auction_node_view is called and this hook detects if auction ended and if product should be added to cart to winner.
I suggest that it could work with cron, so product is placed in cart without needing to visit node page.
I think it can be achieved to move code from commerce_auction_node_view to hook_cron function and make some simple edits.
If you don't mind, I can write a patch.
Comment | File | Size | Author |
---|---|---|---|
#9 | commerce_auction-use-cron-1947466-9.patch | 6.61 KB | lauriii |
#8 | commerce_auction-use-cron-1947466-8.patch | 6.73 KB | lauriii |
#7 | commerce_auction-use-cron-1947466-7.patch | 6.73 KB | lauriii |
#5 | commerce_auction-use-cron-1947466-7534009.patch | 12.44 KB | swim |
#4 | commerce_auction-use-cron-1947466-7534009.patch | 30.42 KB | swim |
Comments
Comment #1
pinkonomy CreditAttribution: pinkonomy commentedCould you write a also a patch for this?thanks
Comment #2
pinkonomy CreditAttribution: pinkonomy commentedAlso,the best would be to automatically,when an auction ends,the product to be placed inside the cart.What about using a rule firing on this?Since I think waiting for cron to run can take a lot of time.
thanks
Comment #3
swim CreditAttribution: swim commentedFYI,
if anyone still needs this I had to quickly throw the feature together today. Once I get home I'll upload the patch. The patch will also fix these issues;
Cheers,
Comment #4
swim CreditAttribution: swim commentedNeeds some more love but for anyone else that needs this.
Comment #5
swim CreditAttribution: swim commentedAhhg rerolled without the license.txt.
Comment #6
farhadhf CreditAttribution: farhadhf commentedHey,
Thanks for the patch - I'm free for the next 2 days, planning to do some cleanup in commerce_auction issue queue :)
Comment #7
lauriiiRerolled last patch
Comment #8
lauriiiRemoved whitespaces
Comment #9
lauriiiRemoved commerce_product_line_item_new call which wasnt needed
Comment #10
MegaChriz CreditAttribution: MegaChriz as a volunteer commentedClosed #2483657: Adding winning bid to user's cart only works intermittently and #1884208: Cart is empty after won auction as duplicates.