Mod Market plugin to store transaction between users

Hi all,I am quite new to Elgg and php, but I am willing to learn and I am studying.

What I want to do: I am using Market plugin, but I would like to add a feature: I want that if a buyer is intersted in a classified he contacts the seller and if he accepts the offer, it is stored somewhere that he bought the item of the classified and that the seller sold it.
In user profile I want to show how many item the user bought and how many sold. It would be nice also to have a list of the item bought/sold by an user in his profile.
Trigger a notification to the administrator if for a user count(bought_items) - count(sell_items) > N

How to do it: the informations I need to store are: buyer_guid, seller_guid and market_item_guid. I think I need to add these relationships: add_entity_relationship(buyer_guid, 'buy', market_item_guid) and add_entity_relationship(seller_guid, 'sell', market_item_guid) when the seller accepts buyer's offer.
[please, correct me if I am wrong or if there is a better way to do it. Maybe there is a plugin ready and I didn't find it].

What to add/modify:

  • market/views/default/object/market.php: to add a button for buying and triggering a message to the seller;
  • in the message add two bottons for accepting or refusing buyer's offer;
  • create a widget in user profile to display the number of transactions and the list of market_items dealed;
  • automagically trigger the notification to the admin.

Ok, this is what I would like to do, but I have little idea how. Can anyone help me? Ideas, directions, hints?
I could also pay something for this.

Thank you!

Teo

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking