Jump to content
PupStar

Year Make Model for Bootstrap Edge

Recommended Posts

Also, I agree with getting rid of the go button.

 

Oh, and it will look much better if you change ymm.php from

<div class="panel panel-default">
  <div class="panel-heading"><?php echo MODULE_BOXES_YEAR_MAKE_MODEL_TITLE; ?></div>
  <?php echo $data; ?>
</div>

to

<div class="panel panel-default">
  <div class="panel-heading"><?php echo MODULE_BOXES_YEAR_MAKE_MODEL_TITLE; ?></div>
  <div class="panel-body">
  <?php echo $data; ?>
  </div>
</div>

Adds panel-body style


Let's make things easier for new osCommerce users http://forums.oscommerce.com/topic/402638-discussion-about-hard-coded-database-tables/?p=1718900  Getting there with osCommerce 2.4! :thumbsup:

Share this post


Link to post
Share on other sites

Also, I agree with getting rid of the go button.

 

Oh, and it will look much better if you change ymm.php from

<div class="panel panel-default">
  <div class="panel-heading"><?php echo MODULE_BOXES_YEAR_MAKE_MODEL_TITLE; ?></div>
  <?php echo $data; ?>
</div>

to

<div class="panel panel-default">
  <div class="panel-heading"><?php echo MODULE_BOXES_YEAR_MAKE_MODEL_TITLE; ?></div>
  <div class="panel-body">
  <?php echo $data; ?>
  </div>
</div>

Adds panel-body style

@@frankl

 

your on fire today pal

 

I will get my 2 penneth in while I can lol

 

change the 'go' button and 'reset' code in bm_year_make_model.php to

'<div class="text-center"><a class="btn btn-primary" href="' . $link . '" role="button">Reset</a></div></form>';
Edited by PupStar

Bootstrap 3 ROCKS!

(or it will if I ever get my head around it lol)

(and I think I have now (w00t) )

Share this post


Link to post
Share on other sites

@@PupStar

 

If you want to test https://www.tonerpak.com.au/edge3/

 

One thing I'm not sure about, in admin/categories.php I can only add one new line at a time so I'm not sure what all those extra lines are for (unless to add manually?)

 

post-3583-0-52883400-1478129014_thumb.png

 

 


Let's make things easier for new osCommerce users http://forums.oscommerce.com/topic/402638-discussion-about-hard-coded-database-tables/?p=1718900  Getting there with osCommerce 2.4! :thumbsup:

Share this post


Link to post
Share on other sites

@@PupStar

 

If you want to test https://www.tonerpak.com.au/edge3/

 

One thing I'm not sure about, in admin/categories.php I can only add one new line at a time so I'm not sure what all those extra lines are for (unless to add manually?)

 

delete-ymm.PNG

@@frankl

 

Strange as I can add multiple lines in the administration with no problems.

 

The amount of lines are set in admin configuration. Default is 6. I will test again in the morning to make sure it is working correctly


Bootstrap 3 ROCKS!

(or it will if I ever get my head around it lol)

(and I think I have now (w00t) )

Share this post


Link to post
Share on other sites

@@PupStar

 

I would like to know how to make the changes to admin/categories.php and index.php without touching core code. Is that even possible @@burt?

 

admin/categories - I usually just make a whole new page or do it in the new module.  

Eg:  featured products.  

Index module, choose the products inside the module.

That used to be done by tickbox in admin/categories

 

Eg:  related products

pi module, choose the products (to attach to a product) in a new admin page

 

Index:  is mostly modular

Admin/Index:  dashboard apps?


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

admin/categories - I usually just make a whole new page or do it in the new module.  

Eg:  featured products.  

Index module, choose the products inside the module.

That used to be done by tickbox in admin/categories

 

Eg:  related products

pi module, choose the products (to attach to a product) in a new admin page

 

Index:  is mostly modular

Admin/Index:  dashboard apps?

 

@@burt

 

I like that idea and will look into it although @@frankl will probably beat me to it with his lightening coding skills (w00t)

 

Mark


Bootstrap 3 ROCKS!

(or it will if I ever get my head around it lol)

(and I think I have now (w00t) )

Share this post


Link to post
Share on other sites

@@PupStar

Hi,

 

I recently became interested in this project (since last week-end) and I would like to know if you had reached a result in relation to the many problems encountered until now?

Could you share the current result, please?

Thank you.
 


Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

I have applied patches but I still can't get the dropdowns with data from admin and catalog box...

 

@@PupStar do you know this issue ?
 


Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

@@milerwan

 

I have it working on my test site thanks to @@frankl and the posts above but I have not yet attempted the seperate admin page. I may attempt it between christmas and new year if I get time away from the family festivities :P


Bootstrap 3 ROCKS!

(or it will if I ever get my head around it lol)

(and I think I have now (w00t) )

Share this post


Link to post
Share on other sites

Ok, to have dropdown we must register at least one full Make-Model-Part-Years data.

The registration of data from admin needs a clic on "save" button which is not practical at all. :/

A javascript code that records on the fly in real time (without leaving the product page) is really necessary in that case.

 

PS: @@PupStar, sure now I can wait as the main system works, thank you.

 

Edited by milerwan

Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

@@frankl

Thank you for the link.
I have follow the thread and obtained a result not perfect yet.

I see that you have the same problem as me from your test website when you try to use YMM search box out of "xxx/edge3/index.php" URL.

 

For exemple, when you are in a category like :

"xxx/edge3/index.php?cPath=1"

 

and try to make a search with YMM box you get this URL :

"xxx/edge3/index.php?Make=Rolls+Royce&Model=Silver+Spirit&Part=Hood+Ornament&Year=1930&cPath=1"

The path of the category remains and prevents a search result. :/

Edited by milerwan

Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

@@milerwan

 

Better to ask @@PupStar if he has that working. I can take a look at it but I won't be near my dev machine until the first week of January.


Let's make things easier for new osCommerce users http://forums.oscommerce.com/topic/402638-discussion-about-hard-coded-database-tables/?p=1718900  Getting there with osCommerce 2.4! :thumbsup:

Share this post


Link to post
Share on other sites

@@milerwan

@@frankl

 

yes your right, I had not spotted that.

Another BIG bug (but I have a radical fix).

 

For exemple you have :

- Toyota -> Prius C -> Graphic Card -> 1929 / 1945

- Toyota -> Prius V -> Bumper -> 2014 / 2016

 

These 2 entries could display correctly the years

 

But if you have this :

- Toyota -> Prius C -> Graphic Card -> 1929 / 1945

- Toyota -> Prius C -> Bumper -> 2014 / 2016

 

=> You will have ALWAYS 1 choice (the smallest) for "Year", in that case "1929 / 1945" even if you select "Bumper".

 

So here is my solution...

The standardized nomenclature for car/motorcycle (and so one) is :

1. Brand -> 2. Model -> 3. Type (motorization)

 

The range years is included in Model, here is an example:

1. Volkswagen -> 2. Bora type 1J2 (10/98 - 05/05) -> 3. Diesel 1,9 SDI-68cv type AGP

 

So my solution is to delete all scripts relative to Years function, display and database of course.

 

Thus we can more accurately rename this contribution in BMT (Brand Model Type) for 2.3.4 BS.   :)

 

 

PS: Please confirm me that you encountred this bug from your localhost/test sites too.

Edited by milerwan

Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

Sorry, for motorcyle, the 4 entries with 1. Brand -> 2. Cylinder -> 3. Model -> 4. Year is relevant...

Maybe we must debug this issue before cutting the code. ^_^'


Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

Maybe a partial fix for ymmajax.php :

<?php
$action = $_POST['action'];
$action();

function getmodel(){
	$make = $_POST['make'];
	$Make_Model_Year_query = tep_db_query("select distinct products_car_model from products_ymm where products_car_make = '".$make."' and  products_car_model != '' and products_car_part != '' and products_car_year_bof !=0 and products_car_year_eof != 0 order by products_car_make, products_car_model, products_car_year_bof, products_car_year_eof");
			$Model_array[] = array('id' => 'all', 'text' => 'Model');
			while ($Makes = tep_db_fetch_array($Make_Model_Year_query)) {

				$Model_array[] = array('id' => $Makes['products_car_model'], 'text' => $Makes['products_car_model']);
			}

			echo tep_draw_pull_down_menu('Model', $Model_array, (isset($Model_selected_var) ? $Model_selected_var : ''), 'onChange="pop_part();" style="width: 100%"');
}


function getpart(){
	$make = $_POST['make'];
	$model = $_POST['model'];
	$Make_Model_Year_query = tep_db_query("select distinct products_car_part from products_ymm where products_car_make = '".$make."' and  products_car_model = '".$model."' and products_car_part != '' and products_car_year_bof !=0 and products_car_year_eof != 0 order by products_car_make, products_car_model, products_car_year_bof, products_car_year_eof");
			$Part_array[] = array('id' => 'all', 'text' => 'Part');
			while ($Makes = tep_db_fetch_array($Make_Model_Year_query)) {

				$Part_array[] = array('id' => $Makes['products_car_part'], 'text' => $Makes['products_car_part']);
			}

			echo tep_draw_pull_down_menu('Part', $Part_array, (isset($Model_selected_var) ? $Model_selected_var : ''), 'onChange="pop_year();" style="width: 100%"');
}

function getyear(){
	$make = $_POST['make'];
	$model = $_POST['model'];
	$Make_Model_Year_query = tep_db_query("select products_car_year_bof,  products_car_year_eof  from products_ymm where products_car_make = '".$make."' and  products_car_model = '".$model."' and products_car_part != '".$part."' and products_car_year_bof !=0 and products_car_year_eof != 0 order by products_car_make, products_car_model, products_car_year_bof, products_car_year_eof");
			$Year_array[] = array('id' => 'all', 'text' => 'Year');
			$Makes = tep_db_fetch_array($Make_Model_Year_query);
				$start = $Makes['products_car_year_bof'];
				while($start <= $Makes['products_car_year_eof']){

				$Year_array[] = array('id' => $start, 'text' => $start);
				$start++;
			}

			echo tep_draw_pull_down_menu('Year', $Year_array, '', 'onChange="document.make_model_year.submit();" style="width: 100%"');
}
?> 

Replace by this :

<?php
require('includes/application_top.php');
$action = $_POST['action'];
$action();

function getmodel(){
	$make = $_POST['make'];
	$Make_Model_Year_query = tep_db_query("select distinct products_car_model from products_ymm where products_car_make = '".$make."' and  products_car_model != '' and products_car_part != '' and products_car_year_bof !=0 and products_car_year_eof != 0 order by products_car_make, products_car_model, products_car_part, products_car_year_bof, products_car_year_eof");
			$Model_array[] = array('id' => 'all', 'text' => 'Model');
			while ($Makes = tep_db_fetch_array($Make_Model_Year_query)) {

				$Model_array[] = array('id' => $Makes['products_car_model'], 'text' => $Makes['products_car_model']);
			}

			echo tep_draw_pull_down_menu('Model', $Model_array, (isset($Model_selected_var) ? $Model_selected_var : ''), 'onChange="pop_part();" style="width: 100%"');
}


function getpart(){
	$make = $_POST['make'];
	$model = $_POST['model'];
	$Make_Model_Year_query = tep_db_query("select products_car_part from products_ymm where products_car_make = '".$make."' and  products_car_model = '".$model."' and products_car_part != '' and products_car_year_bof !=0 and products_car_year_eof != 0 order by products_car_make, products_car_model, products_car_part, products_car_year_bof, products_car_year_eof");
			$Part_array[] = array('id' => 'all', 'text' => 'Part');
			while ($Makes = tep_db_fetch_array($Make_Model_Year_query)) {

				$Part_array[] = array('id' => $Makes['products_car_part'], 'text' => $Makes['products_car_part']);
			}

			echo tep_draw_pull_down_menu('Part', $Part_array, (isset($Part_selected_var) ? $Part_selected_var : ''), 'onChange="pop_year();" style="width: 100%"');
}

function getyear(){
	$make = $_POST['make'];
	$model = $_POST['model'];
	$part = $_POST['part'];
	$Make_Model_Year_query = tep_db_query("select products_car_year_bof, products_car_year_eof from products_ymm where products_car_make = '".$make."' and  products_car_model = '".$model."' and products_car_part != '".$part."' and products_car_year_bof !=0 and products_car_year_eof != 0 order by products_car_make, products_car_model, products_car_part, products_car_year_bof, products_car_year_eof");
			$Year_array[] = array('id' => 'all', 'text' => 'Year');
			$Makes = tep_db_fetch_array($Make_Model_Year_query);
				$start = $Makes['products_car_year_bof'];
				while($start <= $Makes['products_car_year_eof']){

				$Year_array[] = array('id' => $start, 'text' => $start);
				$start++;
			}

			echo tep_draw_pull_down_menu('Year', $Year_array, '', 'onChange="document.make_model_year.submit();" style="width: 100%"');
}
?> 

Many variables were missing (that I have corrected) and in function get_part(), the "select distinct" query prevented the display of the different years entries (bug announced above).

Now, if you have just 1 entry for "Year", the "year" dropdown is empty.
If you have 2 or more entries, "year" dropdown is ok with multiple choices.

Currently, the search function can't match any product with this type of selection.
It will be interesting that @@frankl you test from your side just by replacing the "ymmajax.php" script above because I'm not sure of the rest of my install.

Edited by milerwan

Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

In "bm_year_make_model.php" file, there is no mention of Part at all in this script :
 

	  if (isset($Make_selected_var) && isset($M_a[$Make_selected_var])) {
		foreach ($M_a[$Make_selected_var] as $k => $v)
		$Model_array[] = array('id' => $k, 'text' => $k);}
		if (isset($Make_selected_var) && isset($Model_selected_var) && isset($M_a[$Make_selected_var][$Model_selected_var]))
		foreach ($M_a[$Make_selected_var][$Model_selected_var] as $k => $v)
		$Year_array[] = array('id' => $k, 'text' => $k);

It seems this version with 4 filters can't work properly.

I will try to use the version before from p0yo77 with 3 filters (http://addons.oscommerce.com/info/7835) and see if this script works.


Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

In "ymmajax.php" file, the getyear function can display only one entrie for "products_car_bof/eof" variables because of the inadaptive script.
I don't know how to get dropdown with all years available but I have made a little fix to get the right values.

Here is the getyear function :
 

function getyear(){
	$make = $_POST['make'];
	$model = $_POST['model'];
	$Make_Model_Year_query = tep_db_query("select products_car_year_bof,  products_car_year_eof  from products_ymm where products_car_make = '".$make."' and  products_car_model = '".$model."' and products_car_part != '".$part."' and products_car_year_bof !=0 and products_car_year_eof != 0 order by products_car_make, products_car_model, products_car_year_bof, products_car_year_eof");
			$Year_array[] = array('id' => 'all', 'text' => 'Year');
			$Makes = tep_db_fetch_array($Make_Model_Year_query);
				$start = $Makes['products_car_year_bof'];
				while($start <= $Makes['products_car_year_eof']){

				$Year_array[] = array('id' => $start, 'text' => $start);
				$start++;
			}

			echo tep_draw_pull_down_menu('Year', $Year_array, '', 'onChange="document.make_model_year.submit();" style="width: 100%"');
}

Replace it by this :

function getyear(){
	$make = $_POST['make'];
	$model = $_POST['model'];
	$Make_Model_Year_query = tep_db_query("select distinct products_car_year_bof, products_car_year_eof from products_ymm where products_car_make = '".$make."' and  products_car_model = '".$model."' and products_car_year_bof !=0 and products_car_year_eof != 0 order by products_car_make, products_car_model, products_car_year_bof, products_car_year_eof");
/*			$Year_array[] = array('id' => 'all', 'text' => 'Year');
			$Makes = tep_db_fetch_array($Make_Model_Year_query);
			$start = $Makes['products_car_year_bof'];
			while($start <= $Makes['products_car_year_eof']){
				$Year_array[] = array('id' => $start, 'text' => $start);
				$start++;*/
			while ($Makes = tep_db_fetch_array($Make_Model_Year_query)) {
				$Year_array[] = array('id' => $Makes['products_car_year_bof'], 'text' => $Makes['products_car_year_bof'] . ' - ' . $Makes['products_car_year_eof']);
			}

			echo tep_draw_pull_down_menu('Year', $Year_array, '', 'onChange="document.make_model_year.submit();" style="width: 100%"');
} 

Now you have the missing entries displayed like this :
- 2000 - 2001
- 2002 - 2003
- 2004 - 2005
ect.

 

But when you want to redo selection from Year dropdown, the previous bug come back :
- 2000
- 2001
That's all !

Maybe someone can arrange the code to have the expected years dropdown display...
For example, version from p0yo77 has got correct years dropdown display but use different javascript code to do it :
- 2000
- 2001
- 2002
- 2003
- 2004
- 2005

Edited by milerwan

Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

Ok in "ymmajax.php" file, replace the getyear function by this one :

function getyear(){
	$make = $_POST['make'];
	$model = $_POST['model'];
	$Make_Model_Year_query = tep_db_query("select products_car_year_bof, products_car_year_eof from products_ymm where products_car_make = '".$make."' and  products_car_model = '".$model."' and products_car_year_bof !=0 and products_car_year_eof != 0 order by products_car_make, products_car_model, products_car_year_bof, products_car_year_eof");
/*			$Year_array[] = array('id' => 'all', 'text' => 'Year');
			$Makes = tep_db_fetch_array($Make_Model_Year_query);
			$start = $Makes['products_car_year_bof'];
			while($start <= $Makes['products_car_year_eof']){
				$Year_array[] = array('id' => $start, 'text' => $start);
				$start++;*/
			$Year_array[] = array('id' => 'all', 'text' => 'Year');
			while ($Makes = tep_db_fetch_array($Make_Model_Year_query)) {
			  $start = $Makes['products_car_year_bof'] . ' - ' . $Makes['products_car_year_eof'];
			  $Year_array[] = array('id' => $start, 'text' => $start);
			}

			echo tep_draw_pull_down_menu('Year', $Year_array, '', 'onChange="document.make_model_year.submit();" style="width: 100%"');
} 

 
And in "bm_year_make_model.php" (includes/modules/boxes), replace at line 55 :
 

		$Year_array[] = array('id' => 0, 'text' => TEXT_PRODUCTS_CHOOSE_CAR_YEARS);
		if($Model_selected_var!=''){
		  $Make_Model_Year_query = tep_db_query("select products_car_year_bof, products_car_year_eof from products_ymm where products_car_make = '".$Make_selected_var."' and  products_car_model = '".$Model_selected_var."' and products_car_year_bof !=0 and products_car_year_eof != 0 order by products_car_make, products_car_model, products_car_year_bof, products_car_year_eof");

		  $Makes = tep_db_fetch_array($Make_Model_Year_query);
		  $start = $Makes['products_car_year_bof'];
		  while($start <= $Makes['products_car_year_eof']){
			$Year_array[] = array('id' => $start, 'text' => $start);
			$start++;
		  }
		}

By this code :

		$Year_array[] = array('id' => 0, 'text' => TEXT_PRODUCTS_CHOOSE_CAR_YEARS);
		if($Model_selected_var!=''){
		  $Make_Model_Year_query = tep_db_query("select products_car_year_bof, products_car_year_eof from products_ymm where products_car_make = '".$Make_selected_var."' and  products_car_model = '".$Model_selected_var."' and products_car_year_bof !=0 and products_car_year_eof != 0 order by products_car_make, products_car_model, products_car_year_bof, products_car_year_eof");

/*		  $Makes = tep_db_fetch_array($Make_Model_Year_query);
		  $start = $Makes['products_car_year_bof'];
		  while($start <= $Makes['products_car_year_eof']){
			$Year_array[] = array('id' => $start, 'text' => $start);
			$start++;*/
		  while ($Makes = tep_db_fetch_array($Make_Model_Year_query)) {
			$start = $Makes['products_car_year_bof'] . ' - ' . $Makes['products_car_year_eof'];
			$Year_array[] = array('id' => $start, 'text' => $start);
		  }
		} 

This modifications solve the bug related in my previous post.

For the moment the addon is OK with 3 filters.

Edited by milerwan

Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

With any version tested (p0yo77 or upper), when you have 2 or more products that get :
- same MAKE
- and/or same MODEL
- and/or same YEAR range (not necessary identical)

Just one can be displayed by listing... e
mbarrassing as a result.  :mellow: 

Am I alone in that case ?

 


Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

December 2016 - milerwan
------------------------------
Many script et mysql errors have been fixed to fit with osc 2.3.4 BS version.
I delete additional filter to keep original 3 main filters (MAKE, MODEL, YEAR) to get solid script base of work.
I have kept javascript code from the latest version and improved dropdown management with language conversion and added "disabled" function for form-control.
 
Now, there are still several bugs:
 
1. Dropdown YEAR (admin/categories.php and includes/modules/boxes/bm_year_make_model.php)
-> One/first entry display fine but other/next entries with same MAKE/MODEL and partial YEAR range or different range aren't displayed (source code error: bm_year_make_model.php, ymmajax.php).
 
2. Search engine (index.php)
-> For "All MAKE/MODEL/YEAR" search (no filter enabled), all products are displayed from listing.
-> When 1 or 2 or 3 filters selected, One/first entry selected will display fine as result but other/next entries with same MAKE/MODEL and partial YEAR range or different range aren't displayed. As you can see, no more than 1 result can be displayed by listing of products.
 
3. Categories display (index.php )
-> With or without filter enabled, no effect on the display of categories.
 
NOTE: "readme.txt file" is the original 4 filters version (latest).

 

Year Make Model 2.3.4 (BS) with 3 filters - need help - v1.0.zip


Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

I have used the previous javascript code with the current 3 filters version (downloadable file available above) and this trick resolves the issue 1 and 3 :
1. Dropdown YEAR -> OK
3. Categories display -> OK

But the search engine is always defective with just one product found/displayed from listing of products.


That means the javascript code from 4 filters version need to be fixed to go further.

 

NB: The modified files are:
- admin/categories.php
- includes/modules/boxes/bm_year_make_model.php

Year Make Model 2.3.4 (BS) with 3 filters - old javascript - v1.0.zip

Edited by milerwan

Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites
December 2016 - milerwan

------------------------------

v1.1 - 3 filters

------------------------------

Temporary troubleshooting fix applied ("ymmajax.php" and "bm_year_make_model.php").

-> These lines must be corrected :

 

/* Fix needed for this code

 $Makes = tep_db_fetch_array($Make_Model_Year_query);

 $start = $Makes['products_car_year_bof'];

 while($start <= $Makes['products_car_year_eof']){

$Year_array[] = array('id' => $start, 'text' => $start);

$start++;

$Year_disabled = '';

Fix needed for this code */

 

// Temporary troubleshooting fix START

 while ($Makes = tep_db_fetch_array($Make_Model_Year_query)) {

$start = $Makes['products_car_year_bof'] . ' - ' . $Makes['products_car_year_eof'];

$Year_array[] = array('id' => $start, 'text' => $start);

$Year_disabled = '';

// Temporary troubleshooting fix END

 

 

NB: Finally latest javascript seems to be good with this "temporary troubleshooting fix", but some code must be fixed to find a "regular" Year dropdown.

 

Year Make Model 2.3.4 (BS) with 3 filters - need help - v1.1.zip

Edited by milerwan

Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites
December 2016 - milerwan

------------------------------

v1.2 - 3 filters

------------------------------

Small fix in "admin/categories.php" at line 385 that prevents a crash when the product sheet is duplicated.

 

   if (tep_db_num_rows($q) > 0){

//  while ($r = tep_db_fetch_assoc($q)){

     while ($r = tep_db_fetch_array($q)){

 

Year Make Model 2.3.4 (BS) with 3 filters - need help - v1.2.zip


Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites
December 2016 - milerwan
------------------------------
v1.3 - 3 filters
------------------------------
1. Small fix (my fault) in "includes/application_top.php" that makes YMM search operational now. ^_^'
 
// $YMM_where .= " p.products_id in ('".$ids."') and ";
$YMM_where .= " p.products_id in ($ids) and ";
 
2. Add vehicle filter incidence into product listing from categories in "index.php" (line 154 to 165).
 
3. "HEADING_TITLE" renamed as "HEADING_TITLE_SEARCH_BY_VEHICLE" in "index.php" (line 339):
 
// YMM BOF
//    $catname = HEADING_TITLE;
if ($Make_selected_var == '') {
 $catname = HEADING_TITLE_ALL_OUR_PRODUCTS;
} else {
 $catname = sprintf(HEADING_TITLE_SEARCH_BY_VEHICLE, $Make_selected_var, $Model_selected_var, $Year_selected_var);
}
// YMM EOF
 
4. Add "distinct" into "$listing_sql" select sequences to avoid multiple display of duplicated products in search by vehicle listing in "index.php" (line 301 and 303).


NB: This time search function through "index.php" gives expected listing of products.

Now we must achieve non-display of subcategories (in a category) that do not match with filters when none contains the expected product.
Currently, other sub-categories aren't display when at least one contains an expected product.
 

Year Make Model 2.3.4 (BS) with 3 filters - need help - v1.3.zip


Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×