cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Cronjob for Auto-placing a cart of Favourite Customer on 5th of every month

Former Member
0 Kudos
198

How to create a cronjob for Auto-placing a cart of Favourite Customer on 5th of every month.

Scenario: 1) I need to get a list of favourite customers from the Database. 2) Then we need to get Cart for the particular Customer. ( I need to create a list of Products , may be a list of 5 Products) 3)Now we need to put the list of Products into the cart . 4) Finally we need to place the Order for that Cart.

Could someone help me here (Not exactly with the same logic mentioned here)?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

1) You need to create Usergroup like favouriteCustomerProduct. Assign it to the customer which ever applicable.

2) Need some additional attribute in Customer Table to store some favourite products for him and also the date of each month to place the order.

3) Create a cron job and you can write a logic to get those customer and date. If those are matching then create cart for this user and call the checkout controller flow or any other flow you have defined.

Not sure what issue you are facing. Please let me know if this does not work or you have tried any other approach

Answers (1)

Answers (1)

Former Member
0 Kudos

I do agree to the points you have provided. But i am facing problem in getting the Cart. If the Cart of that user already contains some different products then how to get a new Cart for the same Customer.

Former Member
0 Kudos

Also not sure how to place Order for the new Cart (I was getting some exception which invoking at service layer)