Magento地理搜索和产品推荐 [英] Magento geographical search and product recommendation

查看:98
本文介绍了Magento地理搜索和产品推荐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为一家旅游公司评估Magento,该公司将需要根据地理距离进行产品搜索和推荐.该公司正在根据各种要素(例如:住宿,旅游,餐厅代金券等)创建自定义的度假套餐.这些组件可能具有重叠的位置(即:特定的旅行可能距离几家酒店足够近,以至于它们都与之相关).

I'm evaluating Magento for a travel company who will need to do product searches and recommendations based on geographical distance. The company is creating custom holiday packages based on various components (eg: accommodation, tours, restaurant vouchers, etc). These components potentially have overlapping locations (ie: a particular tour might be close enough to several hotels to be considered related to each of them).

当用户通过添加各家酒店的住宿来建立其自定义套餐时,我希望根据地理位置显示相关的产品推荐.而且,如果他们搜索旅行团,我希望将更近的旅行团放在目录搜索结果的顶部.

As a user builds up their custom package by adding stays at various hotels, I'd like related product recommendations to appear based on geographical location. And, if they search for tours, I'd like closer tours to be weighted toward the top of the catalogue search results.

很不错:用户可以选择他们认为足够接近"的距离(例如:10km,50km,200km等).

Nice to have: the ability for the user to select how close / far they consider "close enough" to be (eg: 10km, 50km, 200km, etc).

我的研究表明,Magento中没有对任何类型的空间查询的现成支持.我能想到的最好的解决方案是自定义产品属性,其中列出了将每个产品手动分配到各个位置的位置".但是,我认为要在超过50个地点进行管理将变得非常困难.我的研究正确吗?是否有可以满足这种情况的加载项/扩展程序?您认为后端可以管理50个重叠地点吗?

My research indicates there isn't out of the box support for any sort of spatial queries in Magento. The best solution I could come up with was custom product attributes which list "location" where each product is manually assigned to various locations. But I think that's going to get pretty hard to manage for more than ~50 locations. Is my research correct? Is there an add-on / extension which will fulfil this scenario? Do you think overlapping 50 locations will be manageable in the backend?

出于Microsoft的背景,我自然倾向于启用SQL Server 2008+空间功能并在数据库中进行查询.显然,该选项在LAMP堆栈中不可用.我错了吗? MySQL是否支持WHERE productA.Location.GetDistanceFrom(productB.Location) < 50km这样的空间查询?

Coming from a Microsoft background, my natural inclination would be to enable SQL Server 2008+ spacial functionality and do the queries in the database. Obviously, this option isn't available in the LAMP stack. Am I wrong? Does MySQL support spatial queries like WHERE productA.Location.GetDistanceFrom(productB.Location) < 50km?

推荐答案

MySQL也支持空间查询

Mysql supports spatial queries as well http://dev.mysql.com/doc/refman/4.1/en/spatial-extensions.html but nothing will help you or free you from entering the relations between products and it's location and you have to implement it yourself as well as extend the search based on location

这篇关于Magento地理搜索和产品推荐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆