Market plugin v1.0d

Release Notes

Includes a fix so that access pulldown honors site default access - thanks to David Stawowy for finding that bug.


  • Thanks slyhne for this great simple plugin
    I'm building an initiative site and would also like to anable groups to post market item.would you be so kind to give us some reference ( I see KINGrahul has the same need)

    This market plugin with elgg provides the only opensource multi vendor (multi seller) option I know of.. althouth it doesn't provide online payment and inventory just yet. so THANKS again !  :)

  • @slyhne Many thanks again for this plugin... you have brought it a long way from the first release. 

    Thanks for adding the rss feed, this is really great.  I'm looking forward to a Group aware version of this some time too... I'd be happy to pay for this if you are up for it.

  • if no user is logged in, the market-items, which are public, are displayed unformated without elgg layout . . .
    who had the same problem and a solution?

  • @MS :- you must have some plugin such as siteaccess or walled garden that is blocking logged-out users from getting to the css and other files ;-(

  • ps: good night @ 3am.. promised myself  to go to sleep 1 hour back ;-P

  • @dhrup :-) wish you a nice dream with good looking angels ;-)

    found the bug, we must poof if logged in . . . .

    change line 162 in object\market.php to:

    if (isloggedin()) {
     if($ownerGUID != $_SESSION['user']->getGUID()){
      if(get_plugin_setting('market_pmbutton', 'market') == 'yes') {
       echo "<a class=\"market_button\" href=\"{$url}mod/messages/send.php?send_to={$ownerGUID}\">{$pmbuttontext}</a>&nbsp;&nbsp;";
    . . .

  • @mandred salomon, it is not a good idea to block unloged in users to view the market posts. Is there anyway to show elgg layout when the unloged in users are opening the market posts by url?

  • How can we set it so that the admin has to approve the market posts? I think this would solve the problem with having to integrate a payment system into this plugin. that way, the administrator could just place a paypal button anywhere on their site for users who want to place ads. then a user could post their ad, and the administrator could approve the ad whenever they receive a payment from the person who is placing the ad. this is just an idea.

  • I would like to know if ist's possible to delete market posts older than let's say 2 months. And it would be very nice to send a message to the owner first.

  • @RubenB

    That involves setting up a cron job in start.php, and is beyond the scope of this plugin.

    This snippet of code to be included in start.php should get you startet:

    function market_cron_hook($hook, $entity_type, $returnvalue, $params) {

    global $CONFIG;


    $entity_type = 'object';

    $entity_subtype = 'market';

    $max_age = 60;

    $timelimit = time() - ($max_age * 86400);

    $deletions = elgg_get_entities(array(

    "type" => $entity_type,

    "subtype" => $entity_subtype,

    "limit" => "2000",

    "created_time_upper" => $timelimit,


    foreach ($deletions as $delete) {


    $i = $i + 1;


    //return "Deleted $i old market posts";

    return "";



    register_plugin_hook('cron', 'weekly', 'market_cron_hook');

    Please consult the Elgg documentation for help:


  • @ slyhne

    I have redirection problems, market item published in river are not redirecting properly. if clicked on river item its loding the homepage itself instead of going to the market item.

    how to fix this? i am using elgg 1.7.8


  • @Thuvalpakshi

    How does the link in the river look?

    It should be something like:

  • @ slyhne

    yes exactly but after clicking riverpage again loads.

  • Hello everyone
    I am trying to set up market plugin but it shows there was a problem saving for the market plugin.. Can anyone guide me with this regard.


  • Category: eCommerce
  • License: GNU General Public License (GPL) version 2
  • Updated: 2020-9-9
  • Downloads: 23193
  • Recommendations: 69

Other Projects

View slyhne's plugins