Page 1 of 5

[Released][Commercial] Vehicle Year/Make/Model Filter mod

Posted: Thu Oct 20, 2011 5:08 am
by Xsecrets
http://spotonsolutions.net/vehicle-ymm
http://www.opencart.com/index.php?route ... on_id=3621

This is a vehicle year/make/model filter solution for opencart 1.5.1 and newer.
Tested with 1.5.1.2 and 1.5.1.3.1, but should work with earlier versions down to 1.5.1.

Demo available at http://demo15.spotonsolutions.net/

This mod allows you to add unlimted year make and model combinations to your products.

Unlike other year make model mods this is not a search mod. It is a filter mod. Once the customer selects a year make and model the entire site gets filtered by only the applicable products and categories. You can browse anywhere in the site and everything will be filtered.

Features
  • unlimited year make model per product
  • not a search mod any browsing or searching done on the site once filter is set will be limited to applicable products.
  • filters products, categories, bestsellers, specials, featured, latest products
  • option to remember vehicle which sets a cookie so that the user does not have to select vehicle every time they visit your site.
  • set products as universal so they show up no matter what filter is selected.
  • show applicable vehicles on product page
  • utilizes vqmod for upload and use install
  • Includes import export script for easy adding of year make model to products.

Re: [Released][Commercial] Vehicle Year/Make/Model Filter mo

Posted: Thu Oct 27, 2011 11:02 pm
by tvieira24
Can you give an example of how the import/export function works?

Re: [Released][Commercial] Vehicle Year/Make/Model Filter mo

Posted: Thu Oct 27, 2011 11:14 pm
by Xsecrets
it's pretty simple. It takes a csv file in the format

product_id, make, model, begin_year, end_year

It dumps the table and imports everything from the csv file, so you do have to do complete imports. I may look at updates at a later time, but it should suffice for now. When you export you get a csv file in the same format, so you can simply do an export add to it then do an import.

Re: [Released][Commercial] Vehicle Year/Make/Model Filter mo

Posted: Thu Nov 17, 2011 6:39 am
by alex1
I looked at your demo, and noticed something strange.

There is a Year/Make/Model drop down under the catalog tab, which is fine, it lists all of the year/make/model choices.

However, when you are setting it up in a product, you need to type it out. Leaves room for either a typo. Would be good if it would auto complete, or be a drop down, to select the fitment...

Also, you can select universal, which is great... but would the product be marked as universal on the store? How does that work?

thanks!

Re: [Released][Commercial] Vehicle Year/Make/Model Filter mo

Posted: Thu Nov 17, 2011 6:45 am
by Xsecrets
alex1 wrote:I looked at your demo, and noticed something strange.

There is a Year/Make/Model drop down under the catalog tab, which is fine, it lists all of the year/make/model choices.

However, when you are setting it up in a product, you need to type it out. Leaves room for either a typo. Would be good if it would auto complete, or be a drop down, to select the fitment...
it does autocomplete you have to enter at least two digits and then it autocompletes. It also auto selects the first choice in the autocomplete, so you can just hit tab when the one you want gets to the top and it will fill it in.
I didn't do dropdown because I did not want to force you to enter all makes and models first. As it is now you can do that if you want to on the make/model edit page, but you don't have to if you enter a new make/model it will get created when you save the product. If it already exists it uses autocomplete. If you are typing really fast you may never see it.
Also, you can select universal, which is great... but would the product be marked as universal on the store? How does that work?

thanks!
It doesn't actually show the word universal anywhere, but if a product is set as universal it will be listed no mater which year make model selection you choose. Basically setting a product as universal just makes sure it never gets limited/hidden by the filter.

Re: [Released][Commercial] Vehicle Year/Make/Model Filter mo

Posted: Thu Nov 17, 2011 6:45 am
by alex1
Also, if you select the make and model, but no year, it shows the year as 0

Re: [Released][Commercial] Vehicle Year/Make/Model Filter mo

Posted: Thu Nov 17, 2011 6:47 am
by alex1
I also got this error:

Notice: Undefined index: model in /home/nmmclean/demo15/catalog/model/module/ymmfilter.php on line 37

When I selected just a make, and hit submit

Re: [Released][Commercial] Vehicle Year/Make/Model Filter mo

Posted: Thu Nov 17, 2011 6:50 am
by Xsecrets
alex1 wrote:Also, if you select the make and model, but no year, it shows the year as 0
yeah that's an oversite. I had forced all three, but forgot about it when I switched from a standard form submit to the button submit. I'll have to disable the button till the year is selected, because I really don't have time to add all the logic needed to handle any combination of make make/model make/model/year right now.

so yes that is a limitation, and it will not be fixed in the short term the short term solution is going to be to force all three.

Re: [Released][Commercial] Vehicle Year/Make/Model Filter mo

Posted: Thu Nov 17, 2011 6:53 am
by alex1
when can you update this to make it force all three? Let me know so I can know when to purchase it.

Also, how do categories get handled? If a category doesn't have a product for the year/make/model does the category still show?

thanks

Re: [Released][Commercial] Vehicle Year/Make/Model Filter mo

Posted: Thu Nov 17, 2011 6:58 am
by Xsecrets
no categories will not show if they don't have any products in them. This is a departure from the default opencart behavior, but I figured for anyone wanting to use this mod it would be the desired behavior for them to disappear.

Re: [Released][Commercial] Vehicle Year/Make/Model Filter mo

Posted: Thu Nov 17, 2011 6:59 am
by alex1
Yeah, I just tested that, and it works great, thanks for this, very excited to get this mod!

Let me know when you can make it force all 3, and I will order it.

Thanks

Re: [Released][Commercial] Vehicle Year/Make/Model Filter mo

Posted: Thu Nov 17, 2011 7:07 am
by Xsecrets
yeah I'll try to get it done tonight. Forcing them is easy, the hard part is how to make the button not look like it should work until the third one is chosen since it's you can't just gray it out. I may have to hide the button till all three are chosen or just not have a button and filter when the third one changes, but I had it that way originally and I added the button for some reason that I can't recall right now, so I'll have to look it over.

Re: [Released][Commercial] Vehicle Year/Make/Model Filter mo

Posted: Thu Nov 17, 2011 7:10 am
by Xsecrets
I remember now it was to give people a chance to choose the remember option, so I'll have to figure out some way to make it obvious you can't click till after the third choice. Hmmm I'll figure something out.

Re: [Released][Commercial] Vehicle Year/Make/Model Filter mo

Posted: Thu Nov 17, 2011 7:13 am
by alex1
yeah, making the button unclickable would be great, or grayed out... thanks for your help! I'll check this thread tonight

Re: [Released][Commercial] Vehicle Year/Make/Model Filter mo

Posted: Thu Nov 17, 2011 1:40 pm
by alex1
let me know when it's ready to rock and roll, I'll buy the mod. thanks

Re: [Released][Commercial] Vehicle Year/Make/Model Filter mo

Posted: Thu Nov 17, 2011 1:43 pm
by Xsecrets
yeah I'm working on it now. I've fixed the issues we discussed, but another person who had purchased it let me know about a bug with the hiding of categories. I'm trying to get that one fixed and I'll upload an update.

Re: [Released][Commercial] Vehicle Year/Make/Model Filter mo

Posted: Thu Nov 17, 2011 2:45 pm
by Xsecrets
ok I've updated it so that you cannot apply until you've chosen all three, and I fixed the category bug so that now the categories are limited properly, and separated the category filter stuff into a separate vqmod file so people who want to show all categories with a 0 count (the default behavior) can.
All the new changes have been applied to the demo so you can see them in action.

Re: [Released][Commercial] Vehicle Year/Make/Model Filter mo

Posted: Thu Nov 17, 2011 10:37 pm
by Degsey
I have used this mod to filter for ink cartridges which worked fine at first but then I found out that you can only allocate one product to the YMM filter mod, is there a way that we can have more than one product allocated to a specific Year Make and Model.

For example a tire seller who has different makes for a car who would want to use this module.

Or am I doing it wrong?

You can see my demo site here http://www.inkjet2u.com

Re: [Released][Commercial] Vehicle Year/Make/Model Filter mo

Posted: Thu Nov 17, 2011 10:43 pm
by Xsecrets
I think you are thinking about the other year make model mod. It is a search mod not a filter mod and it only allows one per product. Mine is a filter mod that remembers the state as you browse the store, and it allows an unlimited number of year make model combinations on each product. You can see how it works on the demo site http://demo15.spotonsolutions.net the admin login info is on the front of the demo site.

Re: [Released][Commercial] Vehicle Year/Make/Model Filter mo

Posted: Thu Nov 17, 2011 11:19 pm
by Degsey
Well it looks like I need to use your mod then, I will purchase it tonight and let you know how it does.