4 Replies - 791 Views - Last Post: 02 October 2017 - 11:38 AM Rate Topic: -----

#1 helder13  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 02-October 17

product search notifications

Posted 02 October 2017 - 06:05 AM

Hi everyone , i'm new here i really dont know how the forum concept works yet. Just needed some help/ideas on how to implement something on a website i'm developing. I was wondering what would be the best way to implement a notification to a user that is registered every time a new product was added on a saved search the user has. So for example if i search for a black mercedes and save that search on my profile, how could i send a notification every time a new black mercedes was uploaded to the server.

Dont know if i explained it properly,

Thank you in advance for any advice or ideas.

Is This A Good Question/Topic? 0
  • +

Replies To: product search notifications

#2 andrewsw  Icon User is online

  • the case is sol-ved
  • member icon

Reputation: 6374
  • View blog
  • Posts: 25,755
  • Joined: 12-December 12

Re: product search notifications

Posted 02 October 2017 - 06:23 AM

It depends how a new product is added. Are you doing it manually (adding a row in a database) or automatically (reading, and updating, from elsewhere)?
Was This Post Helpful? 0
  • +
  • -

#3 ArtificialSoldier  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1828
  • View blog
  • Posts: 5,755
  • Joined: 15-January 14

Re: product search notifications

Posted 02 October 2017 - 10:03 AM

Saving the searches might be another issue. An obvious way to do that is to re-run every saved search every time any product is added to see if the product matches each search, but that doesn't sound very elegant. That's kind of the brute force way of handling that, but if there are a lot of saved searches that's a lot of work for the server to do every time a product is added.
Was This Post Helpful? 0
  • +
  • -

#4 helder13  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 02-October 17

Re: product search notifications

Posted 02 October 2017 - 11:30 AM

View PostArtificialSoldier, on 02 October 2017 - 10:03 AM, said:

Saving the searches might be another issue. An obvious way to do that is to re-run every saved search every time any product is added to see if the product matches each search, but that doesn't sound very elegant. That's kind of the brute force way of handling that, but if there are a lot of saved searches that's a lot of work for the server to do every time a product is added.


that is also a issue, if its a small amount of users, but once it gets many people using it, its going to be a problem, i have to find a way to optimize it.

View Postandrewsw, on 02 October 2017 - 06:23 AM, said:

It depends how a new product is added. Are you doing it manually (adding a row in a database) or automatically (reading, and updating, from elsewhere)?


at the moment doing it manually, just inserting to make certain tests.
Was This Post Helpful? 0
  • +
  • -

#5 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13482
  • View blog
  • Posts: 53,820
  • Joined: 12-June 08

Re: product search notifications

Posted 02 October 2017 - 11:38 AM

Users save criteria into some table which consists of USER ID and criteria.

New item is added.
Check new item's info against that table above.
If found - send email/flag some notification to display.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1