on 07-07-2014 6:02 PM
Hi All, I am working on functionality ,where the user rather than adding product using "add to cart" , On a specific date when the time ends , i look at table and the user with highest bid will have this product added automatically to his cart Please let me know how this can be implemented , should i use a cron job or should i have a new controller which approach is best
Assuming the Product is unique for the market you could achieve this as follows.
Record the bid for the product and relate to the customer. You could use a PriceRow for this since user is an attribute of PriceRow (coupled with Product of course).
I assume you want to use carts to allow users to remove bids or at least view grouped bids, otherwise to be honest I don't see the need to have a cart until the market is closed so-to-speak. You have PriceRow as a record.
At the end of the market process, run a process to find the price row with the highest bid. This could be a cronjob (one that checks for closed markets and calculates the winner).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.