cancel
Showing results for 
Search instead for 
Did you mean: 

add to cart

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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