Jump to content

Best way to group products


oracle765

Recommended Posts

Hi Professionals

 

We are trying to compare hotel prices like trivago do but the problem is there are slightly different hotel names but exactly the same hotel that we are pulling from the hotel providers as shown in the following request result

 

 

Any ideas if there could be a way around this, obviously trivago have managed it somehow but there are literally hundreds of hotels we are gathering at any one time

 

 

<<< Hotels duplicate details:-
 
hotel:- 1:-
 
[skoosh_id] => 
    [expedia_id] => exp123
    [getaroom_id] => get123
    [name] => Napa Prince Hotel Apartments
    [address1] => Tefkrou Anthia 65
    [city] => Ayia Napa
    [latitude] => 34.99267
    [longitude] => 33.99417
    [usersession_id] => user458492685
    [total_apis] => 2
 
 
hotel:- 2:-
 
[skoosh_id] => 
    [expedia_id] => 
    [lateroom_id] => late123
    [getaroom_id] => 
    [name] => Napa Prince Hotel Apts
    [address1] => Tefkrou Anthia St. 65, P.O.Box 30239 Ayia Napa 5342
    [city] => Ayia Napa
    [latitude] => 34.99288
    [longitude] => 33.99402
    [usersession_id] => user458492685
Edited by oracle765
Link to comment
Share on other sites

levenshtein()

with
$words  = array('apts','apartments','hotel');

To try and match up say hotels like the following

Napa Prince Hotel Apartments
Napa Prince Hotel
napa Prince Hotel apts

If = Napa Prince Hotel and there is another with Napa Prince Hotel + $words then it could be a match

am I totally going of track here

Hi Barand I hope you are well

 

Thanks for this I have worked on it for days now but just cannot get my head around it

 

I am trying things like

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.