简体   繁体   English

年/品牌/型号产品搜索Joomla / VirtueMart?

[英]Year / Make / Model Product search for Joomla / VirtueMart?

有谁知道如何为Joomla / VirtueMart实施Year / Make / Model Product搜索?

There is no easy way to do this. 没有简单的方法可以做到这一点。 Depending on what you are trying to accomplish - tag parts with the y/m/m that it fits vs. listing cars by y/m/m it goes from hard to harder. 根据您要完成的任务-用适合的y / m / m标记零件,而按y / m / m标记列出的汽车,难度会越来越大。 The current version of Virtuemart is a poor component to start with when trying to extend the functionality since it is not MVC and it is not designed to be extended. 当前版本的Virtuemart在尝试扩展功能时是一个较差的组件,因为它不是MVC且不旨在进行扩展。

The easiest way would probably be to write a new component with 2 tables. 最简单的方法可能是编写一个包含2个表的新组件。 One with the y/m/m info and the other that maps VM product IDs to the y/m/m that you want the product to show up for. 一个带有y / m / m信息,另一个带有将VM产品ID映射到您要为其显示产品的y / m / m的信息。 That would avoid hacking the VM core files so you could still update, but it would be a pain for administration. 这样可以避免黑客入侵VM核心文件,因此您仍然可以进行更新,但这将给管理带来麻烦。

Another option would be to use K2Mart so you can use K2's extra fields. 另一种选择是使用K2Mart,以便您可以使用K2的额外字段。 This would be a good solution if each product has a single y/m/m. 如果每个产品的y / m / m为单个,这将是一个很好的解决方案。 If each product can have multiple associations it gets a little tougher but it could still be done. 如果每个产品可以有多个关联,则难度会增加一些,但仍然可以做到。 You could also write a K2 admin plugin to handle the y/m/m duties. 您也可以编写一个K2管理插件来处理y / m / m职责。

If you want to give more details on how you need it to work I can probably get you pointed in the right direction, but any solution is going to be a pretty significant amount of code and database work. 如果您想提供更多有关如何工作的详细信息,我可能会为您指明正确的方向,但是任何解决方案都将是相当大量的代码和数据库工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM