Hello!
I am currently trying to perfect an amazing contribution called " Year Make Model (YMM) "Select Vehicle" box for Auto Parts web sites version 2.3.1 ".
Basicly, the contribution is a filter, it filters your auto parts catalog by "year of the vehicle, model and make" so you can see only the parts that fit your vehicle.
Contribution is working perfectly except for one little detail:
once you chose your vehicle, you get the parts for that vehicle, but when you switch categories, like say you go from "BRAKES" into "ALTERNATORS",
the filtration is gone, so the prospect, has to resubmit his vehicles information every time he changes categories creating frustration/waste of time resulting in some lost of sells.
I already posted in the original contributions thread, but from reading the entire thread, I noticed that theirs only one active contributor viewing that thread, DunWeb him self, but poor
guy already put so much effort in this contribution, I'm not sure if he has more time or even motivation to complete this final tweak. I was hoping more professionals could help if I post
here aswell.
From my understanding, I was told that the reason for this malfunction, is that the attributes variables don't get passed along to the categories.
The URL looks something like this when u do the first filter "http://localhost/index.php?Make=Acura&Model=TL&Year=2005"
Once you click on a category, it changes to somewhere around those lines: "http://localhost/index.php?Path=23"
I don't know how hard it is to do the changes, I've skipped 2 nights trying to fix this, but I simply lack the knowledge to fix this... I need help...
Latest News: (loading..)
Need help with an awesome add-on (YMM by DunWeb)
Started by willer2k, Jul 04 2012 10:06 AM
oscommerce 2.3.1
10 replies to this topic
#1
Posted 04 July 2012 - 10:06 AM
#2
Posted 04 July 2012 - 02:23 PM
I think you just have to append the "?Make=Acura&Model=TL&Year=2005" to the links.
This is rough, I haven't used that contribution, but maybe something like:
My guess though is you have to figure out away to append the variables to all links on that page that bring you to another category. Maybe you just have to add something like that code to your product menu?
This is rough, I haven't used that contribution, but maybe something like:
if (isset($HTTP_POST_VARS['Make']) && isset($HTTP_POST_VARS['Year']) ){
//rewrite the links
$my_new_link = tep_href_link(FILENAME_DEFAULT, 'cPath=30' . '&' . $HTTP_POST_VARS['Make']) . '&' . $HTTP_POST_VARS['Year']));
}
My guess though is you have to figure out away to append the variables to all links on that page that bring you to another category. Maybe you just have to add something like that code to your product menu?
Edited by dailce, 04 July 2012 - 02:26 PM.
#3
Posted 04 July 2012 - 02:42 PM
Hi Alex, we had custom coded a search 3 years ago for our parts it seems to be along the same lines as what Chris (DunWeb) has done.
http://www.rubberstore.com/catalog/product-search.php
Long story short I had to port this functionality across a few pages on our site. To keep the variables I used session_register to create global variables so I could pass them between pages. Thinking of what is going on with this search (I haven't used it) but would it make sense to ask the user what kind of car the have?, then store that in the session.. subsequent returns to the search would check if the session for car type is set then use that information to base the selections. At the very least holding the the car / make / model / year in sessions would eliminate a lot of re-selecting.
http://www.rubberstore.com/catalog/product-search.php
Long story short I had to port this functionality across a few pages on our site. To keep the variables I used session_register to create global variables so I could pass them between pages. Thinking of what is going on with this search (I haven't used it) but would it make sense to ask the user what kind of car the have?, then store that in the session.. subsequent returns to the search would check if the session for car type is set then use that information to base the selections. At the very least holding the the car / make / model / year in sessions would eliminate a lot of re-selecting.
#4
Posted 04 July 2012 - 02:43 PM
tep_get_all_get_params()
Community profile | Partner page | NEW : Feedback Chanel
#5
Posted 04 July 2012 - 02:54 PM
@multimixer is correct. And I gave you the exact same advice in chat yesterday.
You need to pass tep_get_all_get_params through the links.
You need to pass tep_get_all_get_params through the links.
Dummies guide to designing osCommerce 2.3 Click Me
Or maybe a ready made theme for your shop ??
Warning: My posts may contain Horsemeat.
Or maybe a ready made theme for your shop ??
Warning: My posts may contain Horsemeat.
#6
Posted 04 July 2012 - 03:11 PM
@multimixer Hi George,
@burt Hi Gary,
I thank you for those advice, but I really don't know what that means... Can you please be a little bit more specific?... What file to I input the tep_get_all_get_params() ?? What does this function even do??
Do I add it in index.php??
I don't expect you to do the code for me, that's not what the forum is for, but if you could just be a little more specific please? This is my first eCommerce attempt, I am no pro yet
@dailce I am not sure what that code means, ill google it right away and figure it out and try to implement it! Thanks!
@burt Hi Gary,
I thank you for those advice, but I really don't know what that means... Can you please be a little bit more specific?... What file to I input the tep_get_all_get_params() ?? What does this function even do??
Do I add it in index.php??
I don't expect you to do the code for me, that's not what the forum is for, but if you could just be a little more specific please? This is my first eCommerce attempt, I am no pro yet
@dailce I am not sure what that code means, ill google it right away and figure it out and try to implement it! Thanks!
#9
Posted 04 July 2012 - 03:44 PM
This may be what you are looking for, but again I'm not too familiar with that contribution. Basically you need to try to pass the already set variables to the other links on the page, which in your case you are saying you want them to stick to the category menu. Sorry it might be GET instead of POST.
$link = tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('Make','Model','Year')).'Make=$HTTP_GET_VARS['Make']&Model=$HTTP_GET_VARS['Model']&Part=all&Year=$HTTP_GET_VARS['Year']', 'NONSSL', false);
Like you said when you do a first filter your url looks like this:
http://localhost/index.php?Make=Acura&Model=TL&Year=2005
from this we can pull the Make, Model, and Year with
$themake = $HTTP_GET_VARS['Make']
$themodel =$HTTP_GET_VARS['Model']
$theyear =$HTTP_GET_VARS['Year']
So I think you just have to find a way to add these to your links. In your category menu you may have a tep_href_link somewhere (could be more than one spot), and I think you just need to add the variables to it.
tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('Make','Model','Year')).'Make=$themake&Model=$themodel&Year=$theyear', 'NONSSL', false);
I would check that they are set with something like this:
if (isset($HTTP_GET_VARS['Year']) {
$theyear =$HTTP_GET_VARS['Year']
}
Hope this helps in someway.
$link = tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('Make','Model','Year')).'Make=$HTTP_GET_VARS['Make']&Model=$HTTP_GET_VARS['Model']&Part=all&Year=$HTTP_GET_VARS['Year']', 'NONSSL', false);
Like you said when you do a first filter your url looks like this:
http://localhost/index.php?Make=Acura&Model=TL&Year=2005
from this we can pull the Make, Model, and Year with
$themake = $HTTP_GET_VARS['Make']
$themodel =$HTTP_GET_VARS['Model']
$theyear =$HTTP_GET_VARS['Year']
So I think you just have to find a way to add these to your links. In your category menu you may have a tep_href_link somewhere (could be more than one spot), and I think you just need to add the variables to it.
tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('Make','Model','Year')).'Make=$themake&Model=$themodel&Year=$theyear', 'NONSSL', false);
I would check that they are set with something like this:
if (isset($HTTP_GET_VARS['Year']) {
$theyear =$HTTP_GET_VARS['Year']
}
Hope this helps in someway.
Edited by dailce, 04 July 2012 - 03:56 PM.
#11
Posted 08 July 2012 - 01:02 PM
@multimixer Hi george!
So I've finally managed to pass the variables into the URL from the categories section with Chris help. Here is the new code:
The variables get passed, but the filter still doesn't work... When I go to a different category, the filters attributes don't apply any more...
Can someone advice what I can do next??
So I've finally managed to pass the variables into the URL from the categories section with Chris help. Here is the new code:
$categories_string .= '<a href="';
if ($tree[$counter]['parent'] == 0) {
$cPath_new = 'cPath=' . $counter;
} else {
$cPath_new = 'cPath=' . $tree[$counter]['path'];
} $categories_string .= tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params() . $cPath_new) . '">';
if (isset($cPath_array) && in_array($counter, $cPath_array)) {
$categories_string .= '<strong>';
}// display category name
$categories_string .= $tree[$counter]['name'];
if (isset($cPath_array) && in_array($counter, $cPath_array)) {
$categories_string .= '</strong>';
} if (tep_has_category_subcategories($counter)) {
$categories_string .= '->';
}
$categories_string .= '</a>';
The variables get passed, but the filter still doesn't work... When I go to a different category, the filters attributes don't apply any more...
Can someone advice what I can do next??
Also tagged with one or more of these keywords: oscommerce 2.3.1
osCommerce Online Merchant v2.x →
General Support →
Random Text issueStarted by Jordanjd, 05 May 2013 |
|
|
||
General →
General Discussions →
Transfer OSCommerce site to new serverStarted by huwd, 04 May 2013 |
|
|
||
osCommerce Online Merchant v2.x →
General Support →
Remove all pricingStarted by Jordanjd, 04 May 2013 |
|
|
||
osCommerce Online Merchant v2.x →
General Support →
Recovered OSCommerce Files - IssueStarted by Fizzlee, 30 Apr 2013 |
|
|
||
osCommerce Online Merchant v2.x →
General Support →
Does OSCommerce Integrate with Payment Platform Pagseguro?Started by eirlymeyer, 21 Apr 2013 |
|
|









