Our team intervenes within 48 hours, we recommend you submit a public ticket so that other developers can help to fix the issue as soon as possible.

If you purchased the item 6 months ago, please read the Item Support Policy carefully before submitting a ticket.

Note: don’t share item or server credentials on public, use the private option.

Okay
  Public Ticket #2451121
Automate push notification on store creation
Closed

Comments

  • Dmitri started the conversation

    Hello, I would like to know, how i can set up NearbyStores dashboard to send notifications to clients automatically on store creation, as it does in manual variant, when I go to campaigns and press send notification about object.


    Looking forward,

    Dmitri 

  •  146
    Elyas replied

    Hello ,


    This feature needs some improvement on the source code , because it's not possible right now .


    Thank you

    Best Regards DT team.

    NearbyStores iOS => Buy now from envato

    NearbyStores Android => Buy now from envato

    Follow us on Facebook Page => Here

  • Dmitri replied

    So, I would like to know, in which files I can workaround. What ready methods I can use to achieve my goal. 

  •  146
    Elyas replied

    There's a function called send_notification in the following file application/modules/notification/models/Notification_model.php , you can call this function in createstore inside your store_model.



    Best Regards DT team.

    NearbyStores iOS => Buy now from envato

    NearbyStores Android => Buy now from envato

    Follow us on Facebook Page => Here

  • Dmitri replied

    Hello, thank you for reply, it helped me.

    I added this code into Store_model.php and it worked for me:  

    $params = array(    "user_id" => $user_id,    "id" => $store_id,    "type" => "store",
    );
    $json = json_encode($this->mCampaignModel->getEstimation($params));
    $json = json_decode($json, true);
    $usercount = $json['result'];
    //echo "<script>console.log('" . $usercount . "' );</script>";
    $type =  "store";
    $int_id =  $store_id;
    $name =  "Появился новый объект поблизости с вами";
    $t =  $usercount;
    $user_id =  intval($this->mUserBrowser->getData("id_user"));
    $params = array(    "user_id" => $user_id,    "name"       => $name,    "int_id" => $int_id,    "t" => $t,    "type" => $type,
    );
    $this->mCampaignModel->createCampaign($params);


  •  146
    Elyas replied

    Good job Dmitri , 


    Thank you for your feedback ,

    Best Regards DT team.

    NearbyStores iOS => Buy now from envato

    NearbyStores Android => Buy now from envato

    Follow us on Facebook Page => Here