Jump to content
DunWeb

[Contribtion] Year/Make/Model for OSC v2.3.x

Recommended Posts

i purchased an oscommerce template so i can i have a website for my cars spare parts shop. so as you can see, my template isn't clean, but everything went right till i reached step 9, i'm just asking where to rep[lace and insert step 9.a and 9.b, ill post my all index.php code:

 

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2010 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

// the following cPath references come from application_top.php

$category_depth = 'top';

if (isset($cPath) && tep_not_null($cPath)) {

$categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");

$categories_products = tep_db_fetch_array($categories_products_query);

if ($categories_products['total'] > 0) {

$category_depth = 'products'; // display products

} else {

$category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");

$category_parent = tep_db_fetch_array($category_parent_query);

if ($category_parent['total'] > 0) {

$category_depth = 'nested'; // navigate through the categories

} else {

$category_depth = 'products'; // category has no products, but display the 'no products' message

}

}

}

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);

$tab_sel = tep_href_link(FILENAME_DEFAULT);

?>

<?php

require(DIR_WS_INCLUDES . 'template_top.php');

?>

 

<?php

if ($category_depth == 'nested') {

$category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");

$category = tep_db_fetch_array($category_query);

?>

 

<?php echo tep_draw_content_top();?>

 

<?php echo tep_draw_title_top();?>

<h1><?php echo $category['categories_name']; ?></h1>

<?php echo tep_draw_title_bottom();?>

 

<div class="contentContainer page_un">

 

<?php

if (isset($cPath) && strpos('_', $cPath)) {

// check to see if there are deeper categories within the current category

$category_links = array_reverse($cPath_array);

for($i=0, $n=sizeof($category_links); $i<$n; $i++) {

$categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");

$categories = tep_db_fetch_array($categories_query);

if ($categories['total'] < 1) {

$categories_row = $categories['total'];

// do nothing, go through the loop

} else {

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");

break; // we've found the deepest category the customer is in

}

}

} else {

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");

}

 

$number_of_categories = tep_db_num_rows($categories_query);

 

$rows = 0;

 

$col = 0;

$row = 0;

// $col_items = (MAX_DISPLAY_CATEGORIES_PER_ROW - 1);

 

$prods_content = '

<div class="padding">'. "\n";

$prods_content .= ' <ul class="sub_categories">'. "\n";

while ($categories = tep_db_fetch_array($categories_query)) {

$rows++;

$cPath_new = tep_get_path($categories['categories_id']);

$p_name = '<span><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . $categories['categories_name'] . '</a></span>';

$p_pic = '<a class="prods_pic_bg" href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '" style="width:'.(SUBCATEGORY_IMAGE_WIDTH + 2).'px;height:'.(SUBCATEGORY_IMAGE_HEIGHT + 2).'px;">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '';

// $width = (int)(100 / $categories_row) . '%';

 

// if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {

// $colspan = ((MAX_DISPLAY_CATEGORIES_PER_ROW * 2) - 1) ;

 

 

// if (($col === 0) && ($row != 0)) {

$prods_content .= ''. "\n"; // hor separator start

// }

// if ($col === 0) {

// $prods_content .= ' <ul class="sub_categories">'. "\n";

// }else {

// $prods_content .= ''; // vert separator start

// }

 

$prods_content .=

' <li class="prods_content" style="width:'.(SUBCATEGORY_IMAGE_WIDTH).'px;">'. "\n".

' <div class="pic_padd wrapper_pic_div" style="width:'.(SUBCATEGORY_IMAGE_WIDTH).'px;height:'.(SUBCATEGORY_IMAGE_HEIGHT).'px;">'.$p_pic.'</a></div>'. "\n".

' <div class="name name_padd">'.$p_name.'</div>'. "\n".

' </li>'. "\n";

 

// $col ++;

// if ($col > $col_items) {

// $prods_content .= ''. "\n"; // hor separator start

// $row ++;

// $col = 0;

// }else{

// $prods_content .= ''. "\n"; // vert separator end

// }

 

// }

}

$prods_content .= ' </ul>'. "\n";

 

$prods_content .= '</div>';

// needed for the new products module shown below

$new_products_category_id = $current_category_id;

?>

<div class="contentPadd un">

<?php echo $prods_content; ?>

</div>

 

<?php include(DIR_WS_MODULES . 'new_products.php'); ?>

 

 

</div><?php echo tep_draw_content_bottom();?>

 

<?php

} elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {

// create column list

$define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,

'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,

'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,

'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,

'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,

'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,

'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,

'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

 

asort($define_list);

 

$column_list = array();

reset($define_list);

while (list($key, $value) = each($define_list)) {

if ($value > 0) $column_list[] = $key;

}

 

$select_column_list = '';

 

for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {

switch ($column_list[$i]) {

case 'PRODUCT_LIST_MODEL':

$select_column_list .= 'p.products_model, ';

break;

case 'PRODUCT_LIST_NAME':

$select_column_list .= 'pd.products_name, ';

break;

case 'PRODUCT_LIST_MANUFACTURER':

$select_column_list .= 'm.manufacturers_name, ';

break;

case 'PRODUCT_LIST_QUANTITY':

$select_column_list .= 'p.products_quantity, ';

break;

case 'PRODUCT_LIST_IMAGE':

$select_column_list .= 'p.products_image, ';

break;

case 'PRODUCT_LIST_WEIGHT':

$select_column_list .= 'p.products_weight, ';

break;

}

}

 

// show the products of a specified manufacturer

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {

// We are asked to show only a specific category

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";

} else {

// We show them all

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";

}

} else {

// show the products in a given categorie

if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {

// We are asked to show only specific catgeory

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";

} else {

// We show them all

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";

}

}

 

if ( (!isset($HTTP_GET_VARS['sort'])) || (!preg_match('/^[1-8][ad]$/', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {

for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {

if ($column_list[$i] == 'PRODUCT_LIST_NAME') {

$HTTP_GET_VARS['sort'] = $i+1 . 'a';

$listing_sql .= " order by pd.products_name";

break;

}

}

} else {

$sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);

$sort_order = substr($HTTP_GET_VARS['sort'], 1);

 

switch ($column_list[$sort_col-1]) {

case 'PRODUCT_LIST_MODEL':

$listing_sql .= " order by p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

case 'PRODUCT_LIST_NAME':

$listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : '');

break;

case 'PRODUCT_LIST_MANUFACTURER':

$listing_sql .= " order by m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

case 'PRODUCT_LIST_QUANTITY':

$listing_sql .= " order by p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

case 'PRODUCT_LIST_IMAGE':

$listing_sql .= " order by pd.products_name";

break;

case 'PRODUCT_LIST_WEIGHT':

$listing_sql .= " order by p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

case 'PRODUCT_LIST_PRICE':

$listing_sql .= " order by final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

}

}

 

$catname = HEADING_TITLE;

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$image = tep_db_query("select manufacturers_image, manufacturers_name as catname from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");

$image = tep_db_fetch_array($image);

$catname = $image['catname'];

} elseif ($current_category_id) {

$image = tep_db_query("select c.categories_image, cd.categories_name as catname from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");

$image = tep_db_fetch_array($image);

$catname = $image['catname'];

}

?>

 

<?php echo tep_draw_content_top();?>

 

<?php echo tep_draw_title_top();?>

<h1><?php echo $catname; ?></h1>

<?php echo tep_draw_title_bottom();?>

 

<?php

// optional Product List Filter

if (PRODUCT_LIST_FILTER > 0) {

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name";

} else {

$filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name";

}

$filterlist_query = tep_db_query($filterlist_sql);

if (tep_db_num_rows($filterlist_query) > 1) {

echo tep_draw_form('filter', FILENAME_DEFAULT, 'get') . '<p class="show">' . TEXT_SHOW . ' ';

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']);

$options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));

} else {

echo tep_draw_hidden_field('cPath', $cPath);

$options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));

}

echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']);

while ($filterlist = tep_db_fetch_array($filterlist_query)) {

$options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);

}

echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()" class="select"');

echo tep_hide_session_id() . '</p></form>' . "\n";

// echo '<div class="prods_hseparator">'.tep_draw_separator('spacer.gif', '1', '1').'</div>';

}

}

 

include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);

?>

 

<?php echo tep_draw_content_bottom();?>

 

<?php

} else { // default page

$first_page = true;

?>

<?php echo tep_draw_content_top();?>

<div class="none">

<?php echo tep_draw_title_top();?>

<h1><?php echo HEADING_TITLE; ?></h1>

<?php echo tep_draw_title_bottom();?><br />

</div >

 

<div class="contentContainer page_un">

<div class="contentText none">

<?php echo tep_customer_greeting(); ?>

</div>

 

<?php

if (tep_not_null(TEXT_MAIN)) {

?>

 

<div class="contentText">

<?php echo TEXT_MAIN; ?>

</div>

 

<?php

}

?>

<?php

include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS);

include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS);

?>

 

</div>

<?php echo tep_draw_content_bottom();?>

<?php

}

 

require(DIR_WS_INCLUDES . 'template_bottom.php');

require(DIR_WS_INCLUDES . 'application_bottom.php');

?>

Share this post


Link to post
Share on other sites

hi again, sorry for posting frequently, i have installed a fresh copy of osc 2.3.1 and i tried both methods, manually and drop-on-top-files, but the results are the same:

the filter worked fine with New Products (on the home page) and with categories.

problems i found:

1- ymm is not filtering the products on the final level of catalog (number of products is correct but the content is listing all the products)

2- then "if you go back" to the main page the filter value remain the same BUT the page is posting all the products unfiltered.

3- in the admin page, if i insert a product with the value All, it wont display inside the drop down box. ex: Honda all 0 - 0 (there is no Honda in the vehicle drop down list)

 

btw 9.b needs some revision, because its resulting an error next to the line - else { // default page

 

thank you for your efforts on developing this useful tools, wish i can help, but i'm not an expert.

 

-Ludwig

Share this post


Link to post
Share on other sites

Hi. Thank you for this great module. I have just one question.

 

Is there any way to add one more column in module? Example : Year/Make/Model/Engine type

 

Thank you! :thumbsup:

Edited by papioane

Share this post


Link to post
Share on other sites

I cant figure out what I am doing wrong. I have a fresh install did the drop in files. Added the sql calls and they created and inserted.

Went into the boxes and this mod is not showing! Any help would be appreciated!

 

Thanks

Share this post


Link to post
Share on other sites

Keith,

 

Check your installation again. I have installed this add on into MANY standard and template sites without any problems. It functions as it is intended to and is quite a simple add on to install. Again, I suggest you check your installation again.

 

 

 

 

Chris


:|: Was this post helpful ? Click the LIKE THIS button :|:

 

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

Share this post


Link to post
Share on other sites

ok so a update. I found the year make and model under configuration inside the admin panel. But I still dont have it under the boxes for a module. Also when I click the link currently under config. its blank. I did add a test product and added some year makes and models. Still nothing.

 

Any help would be appreciated.

Share this post


Link to post
Share on other sites

Ok so i just downloaded this add on. well let me start by saying that this is my first web site and i am teaching myself how to do all of this by myself. When i look at the instructions i understand step 2 through 10, but i don't understand step one at all. It says to run SQL and then underneath that it says "CREATE TABLE `products_ymm`......." . What the heck do i do with that? Another thing... I use cPanel X3 from my hosting service HostGator. I have MySQL on my control panel but it is just a database right? I use the cpanel file manager v3 to do my editing. When the instructions say "run sql", does it mean to use the file manager to get to the files in the database? sorry for the odd questions. I feel like i shouldn't have to ask stuff like this with everything i have figured out already. I just don't know what to do with CREATE TABLE `products_ymm` and all the stuff after it.

 

Thanks in advance. maybe i am having a tough time because i don't get to work on the site until after 11pm because of dayjob, toddler, preggo wife on bed rest.

 

All this coding is tougher than i thought. :)

 

 

Kelly Comstock

Share this post


Link to post
Share on other sites

Ok so i just downloaded this add on. well let me start by saying that this is my first web site and i am teaching myself how to do all of this by myself. When i look at the instructions i understand step 2 through 10, but i don't understand step one at all. It says to run SQL and then underneath that it says "CREATE TABLE `products_ymm`......." . What the heck do i do with that? Another thing... I use cPanel X3 from my hosting service HostGator. I have MySQL on my control panel but it is just a database right? I use the cpanel file manager v3 to do my editing. When the instructions say "run sql", does it mean to use the file manager to get to the files in the database? sorry for the odd questions. I feel like i shouldn't have to ask stuff like this with everything i have figured out already. I just don't know what to do with CREATE TABLE `products_ymm` and all the stuff after it.

 

Thanks in advance. maybe i am having a tough time because i don't get to work on the site until after 11pm because of dayjob, toddler, preggo wife on bed rest.

 

All this coding is tougher than i thought. :)

 

 

Kelly Comstock

 

Hi Kelly,

 

To run the sql you need to go into your database through your control panel. You then run the sql statements so they are loaded into the database.

 

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

Mark,

 

I think i am catching on. I created a 'products_ymm' table in my sql database, but i am a little unsure what to do after that. How many fields do i make? When i create the table it takes me to a page where it looks like i need to edit fields... (again i am unsure) There are 'lists' that it looks like i am supposed to edit. they say:

 

Field

Type

Length/ Values

Default

Collation

Attributes

Null

Index

AUTO_INCREMENT

Comments

 

Am i supposed to modify the 'lists' with the information in step one?

 

 

I imagine that the manual installation instructions are "easy" for someone who has been doing this for a while, I have only been doing this for a month or two so its a little like trying to teach myself chinese :)

Share this post


Link to post
Share on other sites

Too bad i didnt find this add on before i started modifying the looks of the site. I don't want to lose all of that with the drop on top.

 

Kelly

Share this post


Link to post
Share on other sites

Kelly,

 

If you run the SQL as mark suggested, it will create and populate the tables as needed.

 

 

 

CREATE TABLE `products_ymm` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,`products_id` INT NOT NULL ,`products_car_make` VARCHAR( 100 ) NOT NULL ,`products_car_model` VARCHAR( 100 ) NOT NULL ,`products_car_year_bof` INT NOT NULL ,`products_car_year_eof` INT NOT NULL);

 

INSERT INTO configuration_group (configuration_group_title, configuration_group_description, sort_order, visible) SELECT 'Year Make Model', 'Year Make Model Filter Options', sort_order, '1' FROM configuration_group ORDER BY sort_order DESC LIMIT 1;

 

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function) VALUES ('YMM data on Product Info page', 'YMM_DISPLAY_DATA_ON_PRODUCT_INFO_PAGE', 'Yes', 'Display YMM data on the Product Info page?', LAST_INSERT_ID(), '1', 'tep_cfg_select_option(array(\'Yes\', \'No\'), ', now(), NULL),('number of Input fields', 'YMM_NUMBER_OF_INPUT_FIELDS', '6', 'Enter the number of how many YMM input fields should be displayed on the Edit Product page.',LAST_INSERT_ID(), '2', NULL, now(), NULL),('Categories box', 'YMM_FILTER_CATEGORIES_BOX', 'Yes', 'Filter Categories box by year, make, model selected?', LAST_INSERT_ID(), '3', 'tep_cfg_select_option(array(\'Yes\', \'No\'), ', now(), NULL),('count products in category', 'YMM_FILTER_COUNT_PRODUCTS_IN_CATEGORY', 'Yes', 'Filter count products in category by year, make, model selected?', LAST_INSERT_ID(), '4', 'tep_cfg_select_option(array(\'Yes\', \'No\'), ', now(), NULL),('categories listing', 'YMM_FILTER_CATEGORIES_LISTING', 'Yes', 'Filter categories listing by year, make, model selected?', LAST_INSERT_ID(), '5', 'tep_cfg_select_option(array(\'Yes\', \'No\'), ', now(), NULL),('product listing module', 'YMM_FILTER_PRODUCT_LISTING', 'Yes', 'Filter product listing module by year, make, model selected?', LAST_INSERT_ID(), '6', 'tep_cfg_select_option(array(\'Yes\', \'No\'), ', now(), NULL),('Product Info page', 'YMM_FILTER_PRODUCT_INFO', 'Yes', 'Filter Product Info page (product_info.php) by year, make, model selected?', LAST_INSERT_ID(), '7', 'tep_cfg_select_option(array(\'Yes\', \'No\'), ', now(), NULL),('What\'s New box', 'YMM_FILTER_WHATS_NEW_BOX', 'Yes', 'Filter What\'s New box by year, make, model selected?', LAST_INSERT_ID(), '8', 'tep_cfg_select_option(array(\'Yes\', \'No\'), ', now(), NULL),('New Products module', 'YMM_FILTER_NEW_PRODUCTS', 'Yes', 'Filter New Products module by year, make, model selected?', LAST_INSERT_ID(), '9', 'tep_cfg_select_option(array(\'Yes\', \'No\'), ', now(), NULL),('New Products page', 'YMM_FILTER_PRODUCTS_NEW', 'Yes', 'Filter New Products page (products_new.php) by year, make, model selected?', LAST_INSERT_ID(), '10', 'tep_cfg_select_option(array(\'Yes\', \'No\'), ', now(), NULL),('Product Reviews page', 'YMM_FILTER_PRODUCT_REVIEWS', 'Yes', 'Filter Product Reviews page (product_reviews.php) by year, make, model selected?', LAST_INSERT_ID(), '11', 'tep_cfg_select_option(array(\'Yes\', \'No\'), ', now(), NULL),('Reviews box', 'YMM_FILTER_REVIEWS_BOX', 'Yes', 'Filter Reviews box by year, make, model selected?', LAST_INSERT_ID(), '12', 'tep_cfg_select_option(array(\'Yes\', \'No\'), ', now(), NULL),('Reviews page', 'YMM_FILTER_REVIEWS', 'Yes', 'Filter Reviews page (reviews.php) by year, make, model selected?', LAST_INSERT_ID(), '13', 'tep_cfg_select_option(array(\'Yes\', \'No\'), ', now(), NULL),('Specials box', 'YMM_FILTER_SPECIALS_BOX', 'Yes', 'Filter Specials box by year, make, model selected?', LAST_INSERT_ID(), '14', 'tep_cfg_select_option(array(\'Yes\', \'No\'), ', now(), NULL),('Specials page', 'YMM_FILTER_SPECIALS', 'Yes', 'Filter Specials page (specials.php) by year, make, model selected?', LAST_INSERT_ID(), '15', 'tep_cfg_select_option(array(\'Yes\', \'No\'), ', now(), NULL),('Bestsellers box', 'YMM_FILTER_BEST_SELLERS_BOX', 'Yes', 'Filter Bestsellers box by year, make, model selected?', LAST_INSERT_ID(), '16', 'tep_cfg_select_option(array(\'Yes\', \'No\'), ', now(), NULL),('Also Purchased Products module', 'YMM_FILTER_ALSO_PURCHASED_PRODUCTS', 'Yes', 'Filter Also Purchased Products module by year, make, model selected?', LAST_INSERT_ID(), '17', 'tep_cfg_select_option(array(\'Yes\', \'No\'), ', now(), NULL),('Upcoming Products module', 'YMM_FILTER_UPCOMING_PRODUCTS', 'Yes', 'Filter Upcoming Products module by year, make, model selected?', LAST_INSERT_ID(), '18', 'tep_cfg_select_option(array(\'Yes\', \'No\'), ', now(), NULL),('Search Results page', 'YMM_FILTER_ADVANCED_SEARCH_RESULT', 'Yes', 'Filter Search Results page (advanced_search_result.php) by year, make, model selected?', LAST_INSERT_ID(), '19', 'tep_cfg_select_option(array(\'Yes\', \'No\'), ', now(), NULL);

 

 

 

Chris


:|: Was this post helpful ? Click the LIKE THIS button :|:

 

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

Share this post


Link to post
Share on other sites

First off, thank you for the addon, it is wonderful!

 

Is there a simple way to be able to add an additional filter field?

 

I would LOVE to be able to add the engine type in addition to the Make/Model/Year.

 

 

Please let me know! Thank you in advance!

Share this post


Link to post
Share on other sites

Dear All, Chris in particular.

 

First of all thanks for this contribution, it seems something that will fit perfectly, however not in an automotive shop. To do this I had to modify a little the script in naming. Some work done, uploaded, box installed. I see in shop admin the section for configuration and can tune that. On the shop It's visible as a box active.

 

From the configuration of the add-on I can guess that those attributes should be applied to products in the product edit page (configurable number of input fields there). The only issue is that my admin doesn't display any input fields for YMM attributes.

 

I don't have any idea where can be the error. Can you support in which file is responsible for displaying the YMM on product edit page?

 

The only incompatibility that I noticed in add-on txt manual is in section 9] index.php subsection 9.a]

The one to be replaced already contains YMM, but I think that it's just a minor instal manual issue.

 

Find:

if (isset($cPath) && strpos('_', $cPath)) {
// check to see if there are deeper categories within the current category
     $category_links = array_reverse($cPath_array);
     for($i=0, $n=sizeof($category_links); $i<$n; $i++) {
       $categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
       $categories = tep_db_fetch_array($categories_query);
       if ($categories['total'] < 1) {
         // do nothing, go through the loop
       } else {
[b]          $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and " . (YMM_FILTER_CATEGORIES_LISTING == 'Yes' ? YMM_get_categories_where((int)$category_links[$i],$YMM_where) : '') . " c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
         break; // we've found the deepest category the customer is in
       }
     }
   } else {
     $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and " . (YMM_FILTER_CATEGORIES_LISTING == 'Yes' ? YMM_get_categories_where((int)$current_category_id,$YMM_where) : '') . " c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
   }
[/b]
Replace with this:


//bof Year_Make_Model Contribution v2.3.x by Dunweb Designs
if (isset($cPath) && strpos('_', $cPath)) {
// check to see if there are deeper categories within the current category
     $category_links = array_reverse($cPath_array);
     for($i=0, $n=sizeof($category_links); $i<$n; $i++) {
       $categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
       $categories = tep_db_fetch_array($categories_query);
       if ($categories['total'] < 1) {
         // do nothing, go through the loop
       } else {
         $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and " . (YMM_FILTER_CATEGORIES_LISTING == 'Yes' ? YMM_get_categories_where((int)$category_links[$i],$YMM_where) : '') . " c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
         break; // we've found the deepest category the customer is in
       }
     }
   } else {
     $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and " . (YMM_FILTER_CATEGORIES_LISTING == 'Yes' ? YMM_get_categories_where((int)$current_category_id,$YMM_where) : '') . " c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
   }
//eof Year_Make_Model Contribution v2.3.x by Dunweb Designs

 

My original piece of index.php that I replaced with the one above:

    if (isset($cPath) && strpos('_', $cPath)) {
// check to see if there are deeper categories within the current category
     $category_links = array_reverse($cPath_array);
     for($i=0, $n=sizeof($category_links); $i<$n; $i++) {
       $categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
       $categories = tep_db_fetch_array($categories_query);
       if ($categories['total'] < 1) {
         // do nothing, go through the loop
       } else {
         $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
         break; // we've found the deepest category the customer is in
       }
     }
   } else {
     $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
   }

 

If anyone can direct me where I should look for my issue, I would appreciate.

 

Regards

Szymon

Share this post


Link to post
Share on other sites

Sorry everyone that I don't edit my previous post, but... where is edit button? :blink:

 

More or less I sorted out and YMM is working now. However I have few more precise questions:

 

1) Is YMM working with more than one language? Every input that i place into YMM using second language (english) is switching me into results in (polish).

 

2) The result of the YMM is top-named "What's new".

 

3) The header of YMM result is a mess instead of name, price and buynow. It's probably me, but help where to correct it appreciated.

 

3) The filtering works only if the shop is in the main. Any other action - use of search or categories tree makes YMM not working. Is it normal, or I can correct it? Use of YMM box could or filter previous results given by category tree or search or it could even reset those actions and filter by itself from whole store. But it's quite strange when YMM in such situation looks like active but doesn't launch any action.

 

4) Use of YMM decrease the number of products displayed on the right of category tree into only those fitting the filter, but when you click on the category it gives all listed, however the number still remains decreased by YMM.

 

5) YMM runs automatically once you fill the last field (year). Is there any way to disable this? (means - click on go needed)

 

All the issues you can see on http://sklep.cantine.pl/

Share this post


Link to post
Share on other sites

Ok, I made the scrip working in quite complicated way. I'm not an expert on coding, to be honest it's my first time with sql, php, etc.

 

I don't know why, because using several tools I've been checking implementation of YMM on my already modified shop, and it doesn't give the result. I made a fresh install and applied drop on top files - they are wrong.

 

To make it working I implemented few corrections mentioned in this thread in several posts:

1. Something with the cache I suppose - post

2. I cutted the red lines from post - link

3. I closed with missing </u> from - post

4. I added //<![CDATA[ from - post

 

In case of no quick support on this contribution, maybe that will help somebody. I don't suggest to implement it an modified shops if you have a problem. It's probably the bast way to make in the way I described above and that to add other contributions as even if I made the changes to my modified shop the implementation seems to be interfering with something that I cannot catch.

 

If anyone will watch this thread and will be able to give any hint on the following, I would appreciate:

 

1. I still can't make the script fully multi-language. The first and most obvious case is this post. I don't know how to make the array multi-language when it's in the file non language specific. If anyone would give a hint on this, it would be a great support.

 

2. Second issue on the multi-language is that I added properly and functionally the second language (just simple modifications in two files in second language, exactly the same as in english. YMM is working the same way in both languages, however there is an error on the added language. When the customer is in the main catalog of the shop, and using YMM in both languages it's working, however in added language the name of the result page is "what's new" and the header of the product listing there is still what I described previously: TABLE_HEADING_IMAGE TABLE_HEADING_PRODUCTS+ TABLE_HEADING_PRICE TABLE_HEADING_BUY_NOW instead of proper Product Name+ Price Buy Now. I don't think it's related to a language specific files where the changes of YMM are really simple. Anyone help on this?

 

3. The last question is not about an error. More to a small issue. Is it possible to configure YMM in the way that it will filter always all products in the shop?

 

Regards

Szymon

Share this post


Link to post
Share on other sites

2. Second issue on the multi-language is that I added properly and functionally the second language (just simple modifications in two files in second language, exactly the same as in english. YMM is working the same way in both languages, however there is an error on the added language. When the customer is in the main catalog of the shop, and using YMM in both languages it's working, however in added language the name of the result page is "what's new" and the header of the product listing there is still what I described previously: TABLE_HEADING_IMAGE TABLE_HEADING_PRODUCTS+ TABLE_HEADING_PRICE TABLE_HEADING_BUY_NOW instead of proper Product Name+ Price Buy Now. I don't think it's related to a language specific files where the changes of YMM are really simple. Anyone help on this?

 

Forget about the table issue, now it's working fine and the problem was in /includes/languages/polish/index.php which is not a part of this contribution. The coder that was preparing the translation of the whole OSC 2.3.1 into our language made some improvements into that file that determined behavior of the frontend in few cases. One was interfering with the action of YMM. After modifying the code into original structure YMM module works well.

 

So only the two other questions remain open, if anyone would be so kind, before I will learn too much about php and sql.

Share this post


Link to post
Share on other sites

Is there any better optimized way to achieve the WHERE IN query?

c.categories_id in ('.$ids.') and

 

It is super slow on sites with 1000s of products and makes ridiculously large queries. It also runs these queries many times per page load and just slows everything way down.

 

Current Parse Time: 3.639 s with 46 queries And 16 of those queries are running the WHERE IN clause.

 

Here is an example.

 

select
  c.categories_id
  FROM
  products p,
  products_to_categories pc,
  categories c,
  categories_description cd
  WHERE  p.products_id in (14967,14971,14965,13831,13851,13852,14959,8046,7519,14973,7277,7276,7275,7274,7972,7968,7970,7971,7116,7117,7119,7120,7121,7122,7123,7124,7125,7126,7687,7420,7419,11822,11821,10796,7333,7326,7295,9111,7172,12348,12351,12352,13806,13814,13815,13816,13817,13827,13835,13836,13854,13856,7900,7901,7909,7910,7911,7930,7967,7969,8055,8049,8048,8047,8032,8031,8015,8014,7978,7158,7132,7133,7134,7135,7140,7143,7144,7145,7146,7148,7149,7153,7154,7850,7740,7739,7738,7737,7736,7735,7717,7716,7715,7686,7633,7622,7621,7620,7619,7618,7617,7616,7615,7614,7610,7609,7608,7607,7606,7605,7583,7549,7550,7516,7512,7486,7487,7488,7471,7470,7467,7464,7465,7463,7460,7339,12053,11860,11664,7388,7387,7386,7385,7384,7383,7381,7382,7380,7364,7358,7357,7346,7347,7321,7311,7306,7305,7300,7296,7292,7288,7287,7286,7284,7285,7283,7281,7282,7280,7279,7263,7251,7252,7253,7254,7250,7249,7246,7245,7238,7239,7237,7231,7230,7226,7224,7222,7220,7219,7218,8392,7200,7198,7197,7196,7193,7192,7188,7187,7183,7182,7180,7179,7178,7177,7176,7173,7171,7170,7169,7168,7167,7166,7162,7161,7160,12345,12346,12347,12349,12350,12584,12585,12586,12587,12673,12674,12675,12676,12677,12902,13545,7958,13862,13863,13864,7189,7905,7904,7906,7902,7903,13891,13935,13936,13934,13998,14892,14893,14904,14905,14907,14908,14927,14926,14909,14903,14928,14925,13992,13993,14906,14886,14939,14940,14941,14942,14943,14945,14946,14948,14949,14951,14954,14955,15074,15082,15083,15076,7934,7150,7151,0,10070,9917,13628,12859,12644,11778,7129,7131,8365,8338,8145,7356,7355,7354,7353,7344,7345,13808,12337,12255,12338,7808,7580,7578,7581,7579,14891,7489,8060,8052,7931,13888,7137,13819,13820,7678,7567,7566,7564,7565,7569,7568,7329,7338,12679,15115,15116,15117,15123,15114,15113,15087,15088,15058,7477,7476,7475,7478,7634,12750,12739,12740,12166,12084,8485,8486,7096,7094,7093,7092,7087,7079,7082,7083,7084,7085,8483,8482,8481,8480,8479,8476,8468,8447,8446,8445,8431,8430,8429,8428,8425,8423,8420,8417,8412,8411,8410,8406,8407,8868,8867,8404,8400,8399,8387,8386,8385,15059,15050,15051,15052,15053,15055,15057,8235,15064,15060,8226,8225,8222,8221,8218,8217,8215,8214,15001,15002,15031,15032,15033,15003,15004,15005,15006,15007,15008,15009,15010,15011,15012,15013,15014,15015,15016,15017,15021,14999,15000,8170,15037,15038,15039,8156,8155,8153,8152,8151,8150,8147,8146,8144,8143,8141,8140,8139,8137,8138,8136,8134,8135,8132,8124,8118,8117,8112,8111,8110,8107,8105,8104,8103,8102,8101,8099,8100,8495,8098,8097,8096,8095,8094,8093,8092,8091,8090,8089,8088,8087,8086,8085,8084,8083,8082,8081,8075,8073,8059,8058,8057,8056,8001,7984,7982,7981,7974,7952,7925,7924,7919,7918,7917,7916,7915,7914,7913,7912,7907,7899,7898,7897,7896,7895,7894,7893,7892,7891,7890,7889,7888,7887,7886,7885,7884,7883,7882,7881,7880,7879,7878,7877,7876,7875,7874,7873,7872,7871,7870,7869,7868,7867,7866,7865,7864,7863,7862,7861,7860,7859,7858,7857,7856,7855,7854,7853,7852,7851,7849,7847,7846,7845,7844,7843,7842,7841,7840,7839,7838,7837,7836,7835,7834,7833,7832,7831,7830,7829,7828,7827,7826,15069,15070,15071,15072,15075,15041,15042,15043,15044,15045,7685,7659,7658,7657,7078,7076,7072,7073,7074,7613,7612,7064,7065,7595,7592,7062,7061,7060,7059,7057,7055,7054,7053,7052,7050,7048,7044,7040,7039,7038,7037,7036,7029,7028,7026,7025,7022,7017,7013,7011,7010,7004,7000,12851,12849,7582,7585,8862,8863,12847,12846,8896,12830,12829,12824,6992,6993,6995,6996,6997,7571,7570,7563,8860,8858,8857,8856,8855,8854,8851,8850,8849,8848,8846,8845,8842,8841,8839,8838,8834,8833,8832,8831,8830,8829,8828,8827,8825,8824,8823,8816,8815,8812,8811,8810,8808,8807,8806,8805,8800,8799,8798,8797,8796,8795,12812,12806,12798,12796,12795,12794,12793,12792,12789,12788,12784,7490,12771,12765,12760,12756,12755,12754,12753,12751,12749,12743,12742,12738,12737,12736,12735,12734,12733,12732,12731,12730,12729,12728,12727,12725,12724,12715,12713,12710,12708,12707,12706,12697,12695,12652,12651,12650,12649,12640,12638,12637,12634,12633,12632,12631,12630,12628,12626,12620,12619,12616,12615,12614,12612,12609,12608,12607,12606,12605,12604,12603,12602,12601,12600,12598,12597,12596,12595,12594,12593,12592,12591,12528,12519,12518,12517,12515,12514,12512,12511,12509,12508,12507,12506,12505,12502,12497,12496,12492,12491,12490,12489,12488,12487,12486,12483,12482,12481,12480,12479,12478,12477,12476,7458,7459,12474,12471,12467,12465,12460,12457,12434,7457,7454,7455,7456,12428,12427,12426,7451,7452,7453,7448,7449,7450,12328,12313,12305,12294,12293,12292,12291,12290,12276,12275,12262,12261,12257,12254,12252,12247,12246,12243,12242,12241,12240,12238,12237,12236,12235,12233,12228,12227,12226,12223,12222,12219,12218,12217,12216,12188,12182,12179,12178,12177,12176,12174,12173,12163,12162,12157,12156,12155,12154,12153,12149,12148,12147,12146,12145,12142,12139,12138,12137,12136,12133,12117,12116,12115,12110,12109,12102,12097,12096,12094,12092,12091,12090,12088,12085,12079,12078,12076,13978,12071,12070,12069,12058,12055,12054,12052,12050,12046,12044,12042,12037,12036,12035,12034,12033,12032,12031,12030,12028,12027,12026,12025,12024,12023,12022,12019,12017,12011,12010,12003,12001,12000,11998,11997,11996,11995,11989,11988,11982,11981,11978,11971,11970,11969,11967,11966,11965,11964,11963,11962,11961,11959,11958,11956,11955,11953,11952,11951,11950,11949,11948,11947,11944,11943,11942,11938,11935,11934,11929,11928,11927,11926,11925,11924,11923,11922,11921,11920,11919,11918,11917,11916,11915,11914,11913,11912,11911,11910,11907,11896,11894,11893,11892,11891,11890,11889,11885,11881,11880,11879,11878,11877,11873,11872,11870,11868,11859,11856,11854,11849,11847,11846,11845,11841,11840,11839,11838,11836,11835,11834,11833,11832,11831,11830,11829,11828,11827,11826,11825,11824,11823,11820,11819,11818,11817,11816,11815,11814,11813,11812,11811,11810,11809,11808,11807,11806,11805,11804,11803,11802,11801,11800,11799,11798,11797,11796,11794,11788,11787,11786,11785,11784,11777,11776,11775,11774,11773,11772,11771,11770,11769,11762,11761,11760,11759,11758,11757,11756,11755,11754,11753,11748,11747,11746,11745,11743,11742,11741,11740,11739,11738,11737,11736,11733,11732,11730,11729,11727,11723,11722,11721,11720,11714,11713,11712,11710,11708,11707,11705,11704,11703,11702,11701,11700,11699,11698,11697,11696,14985,11694,11693,11692,11691,11690,11689,11688,11687,11686,11683,11682,11680,11676,11675,11674,11673,11672,11671,11669,11668,11667,11658,11657,11656,11655,11654,11653,11652,11651,11650,11649,11648,11646,11644,11643,11642,11641,11639,11638,11637,11635,11634,7446,7447,11633,11632,11631,11630,11629,11628,11627,11626,11625,11624,11623,11622,11621,11620,11619,11618,11617,11616,11615,11614,11613,11612,11611,11610,11609,11608,11607,11606,11605,11604,11603,11602,11601,11600,11599,11598,11597,11596,11595,11594,11593,11592,11590,11589,11588,11587,11586,11585,11584,11583,11582,11581,11580,11579,11578,11577,11576,11575,11574,11573,11572,11571,11570,11548,11542,11539,11537,11534,11533,11531,11526,11522,11521,11520,11519,11518,11507,11506,11505,11503,11489,7445,7444,7443,7442,7441,7439,7440,7435,7436,7437,11475,11461,11451,11445,11444,11443,11442,11441,11440,11437,11436,11433,11430,11427,11426,11424,11422,11416,7422,7423,11414,11412,11411,11410,11409,11408,11407,11406,11405,7421,7416,7417,11404,11403,11402,7414,7415,11401,11400,11399,11397,11396,11395,11393,11392,11391,11390,11388,11363,11362,11361,11360,11357,11354,11350,11349,11348,11347,11346,11344,11338,11337,11336,11335,11334,11333,11331,11330,11322,11321,11320,11319,11306,11305,11303,11299,11298,11297,11296,11295,11292,11291,11290,11289,11288,11287,11286,11282,11281,11279,11278,11270,11267,11255,11254,11230,11198,11136,11124,11080,11057,11053,11049,11046,11045,11044,11043,11042,11041,11040,11038,11037,11036,11034,11033,11032,11031,11030,11028,11027,11023,11006,11005,11003,11002,11000,10999,10996,10995,10992,10990,10989,10988,10983,10981,10980,10979,10974,10973,10968,10967,10965,10962,10961,10960,10959,10955,10954,10952,10950,10949,10946,10943,10942,10934,10933,10927,10920,10915,10904,10903,10900,10899,10898,10897,10896,10894,10887,10886,10885,10884,10877,10876,10872,10871,10869,10868,10866,10865,8864,8866,10860,10852,10851,10849,10848,10837,10835,10825,10821,10818,10817,10814,10813,10792,10791,10786,10785,10763,10760,14997,14998,10753,10746,10745,10744,10742,10741,10740,10738,10731,10713,10708,10688,10687,10681,10680,10678,14996,10654,10653,10634,10633,10631,10628,10627,10626,10625,10624,10623,10622,10621,10620,10619,10618,10617,10616,10615,10614,10613,10612,10610,10609,10608,10606,10605,10604,10603,10602,10600,10598,10597,10596,10594,10592,10591,10588,10583,10582,10581,10580,10577,10576,10574,10573,10571,10570,10569,10568,10567,10566,10564,10560,10559,10558,7396,7393,10555,10554,10553,10548,10540,10533,10529,10528,10514,10513,10511,14993,10499,10493,10489,10488,7389,7378,7379,10463,10459,10452,10451,10450,10448,10447,10445,10444,10443,10442,10441,10440,10439,10438,10437,10435,10434,10433,10432,10431,10429,10427,10426,10425,10422,10421,10420,10419,10413,10411,10408,10407,10406,10405,10403,10398,10396,10395,10394,10393,10392,10391,7377,7374,7375,7376,10373,10371,10370,7371,10367,10366,10365,10357,10355,10354,10353,10352,10351,10350,10347,10346,10336,10335,10332,10330,10325,10323,10318,10315,10313,10312,10311,10310,10309,10308,10306,10305,10304,10303,10300,10299,10292,10291,10289,10287,10286,10285,10284,10283,10282,10281,10280,10279,10278,10277,10276,10275,10270,10269,10268,10267,10263,10250,10248,10247,10237,10236,10234,10231,10230,10229,10228,10220,10217,10216,10215,10214,10213,10212,10209,10206,10205,10204,10188,10184,10173,10168,10167,10166,10165,10164,10163,10162,10161,10160,10159,10158,10157,10156,10155,10154,10153,10152,10151,10150,10149,10147,10144,8791,8790,8789,8787,8778,8781,8782,8783,8892,8891,8890,8888,8889,10123,8776,8772,8771,8770,8768,8764,8763,8762,8758,8759,10110,10107,10087,8755,8754,8752,8751,6988,6987,6986,6985,8884,10082,10081,8744,8742,8741,8731,8729,8730,8728,8724,8723,8719,8720,8722,10069,10068,10054,10044,10037,10036,10035,10010,10009,10003,9994,9993,9986,9964,9961,9957,9955,9953,9950,9948,9934,9928,9926,9909,9908,9905,9904,9887,9880,9879,9873,8717,8718,8881,8882,8883,9869,9867,9866,9865,9857,9854,9853,9851,9850,9843,9839,9836,9835,9833,9831,9828,9825,9819,9817,9816,9815,9809,9808,9807,9791,9786,9783,9782,9781,9780,9779,9778,9777,9776,9775,9774,9773,9772,9771,9770,9769,9768,9767,9766,9765,9764,9763,9762,9761,9760,9759,9758,9757,7370,7369,7368,7366,7367,9750,9748,9743,14937,9726,9725,9724,9722,9721,7365,9715,9713,9712,9711,9710,9708,9706,9702,9700,9689,7330,9682,9681,9675,9674,9669,9655,9642,9639,9636,9634,9630,9623,9622,9621,9618,9617,9616,9611,9608,9605,9601,9600,9588,9585,9584,9583,9580,9579,9578,9576,9575,9574,9573,9572,9571,9570,9565,9561,9558,9557,9556,9555,9554,9553,9552,9551,9550,9549,9548,7272,7268,7256,7257,7258,7255,8716,8715,8714,8713,8712,8711,8710,8709,8704,8702,8701,9539,9530,9529,9528,9527,9526,9525,7244,9524,9523,9521,9519,9518,9515,9514,9513,9509,9508,9507,9506,9505,9504,9502,9501,9500,9487,9485,9484,9472,9471,9464,9463,7240,7235,7236,7234,7232,7228,7227,7217,7213,7212,7209,7210,7211,9457,9456,9455,9453,9452,7204,7205,7206,7207,9439,9437,9434,9433,9426,9425,9422,9420,9418,9412,9411,9410,9409,9408,9407,9406,7203,7201,7199,9405,9404,9403,9396,9395,9393,9388,9385,9384,9383,9382,9381,9380,9377,9371,7194,9370,9369,9368,9367,9366,9365,9362,9359,9352,9351,9350,9348,9347,9346,9345,9343,8887,9341,9340,9339,9338,9337,9336,9335,9332,9331,9330,9329,9326,9324,9323,9322,9321,9320,9318,9317,9316,9315,9314,9313,9312,9311,9310,9309,9308,9306,9305,9304,9303,9302,9299,9298,9297,9296,9295,9294,9293,9290,9289,9288,9285,9284,9283,9282,9281,9280,9279,9278,9277,9274,9273,9272,9271,9270,9267,9266,9265,9264,9263,9262,9261,9260,9258,9257,9256,9255,9254,9253,9252,9251,9250,9249,9248,9247,9246,9245,9243,9242,9239,9238,9237,9236,9226,9225,9224,9223,9222,9221,9219,9218,9217,9216,9214,9212,9211,9210,9208,9207,9204,9203,9202,9201,9200,9195,9194,9192,9191,9186,9177,9175,9172,9171,9169,9167,9164,9163,9162,9157,9152,9151,9150,9149,9147,9146,9145,9144,9143,9142,9141,9140,9139,9131,9130,9129,9126,9125,9123,9122,9121,9120,9113,9112,9108,9103,9101,9100,9099,9098,9097,9096,9095,9092,9088,9087,9086,9085,9082,9081,9080,6967,9073,9072,7181,8653,8651,8650,8648,8880,8642,8639,8638,8631,8628,8627,8622,8621,8617,8615,8613,13977,8608,8607,8606,8605,8604,8603,8602,8600,8599,8598,8596,8597,8594,8593,8592,8591,8588,8586,8587,7175,7165,8585,8584,8583,8582,8581,8580,8579,8578,8571,8570,8568,8567,8566,8559,8557,8548,8547,8546,8545,8544,8543,8542,8541,8540,8539,8538,8537,8536,8535,8532,8534,9058,9057,9056,9055,9054,9053,9049,9047,7164,9044,9040,9039,8528,8527,8526,7156,7157,9032,9031,9030,9028,9027,9026,8873,8875,8876,9024,9023,9022,9021,9020,9019,9016,9015,9014,9013,9012,9011,9010,7155,7147,7142,7141,9005,7130,7128,7115,7114,7113,7112,7106,9004,8999,8998,8996,8995,7104,8872,8992,8988,8987,8986,8985,8984,8983,8982,8981,8980,8979,8978,8975,8974,8971,8969,8967,8965,8964,8524,8522,8521,8519,8518,8517,8508,8509,8510,8511,8512,8513,8514,8957,8956,8955,8953,8952,8951,8949,8948,8947,8944,8942,8941,8940,8939,8938,8937,8499,8504,8934,8936,8933,8932,8931,8930,8926,8927,8928,12874,12873,12872,12871,12870,12869,12868,12867,12866,8922,8924,8917,8918,8919,8920,8921,8907,8897,8898,8899,8900,8908,12875,12876,12877,12878,12879,12880,12882,12890,12891,12892,12898,14966,12907,12908,12909,12910,12911,12912,12914,12915,12918,12922,12924,12927,12931,12941,12943,12944,12945,12954,12956,12969,12970,12983,12988,12989,12991,12993,12998,13005,13006,13008,13009,13010,13014,13087,13088,13090,13093,13102,13103,13104,13106,13108,13117,13118,13119,13122,13125,13132,13133,13134,13135,13136,13137,13139,13140,13141,13142,13143,13149,13150,13151,13152,13153,13154,13155,13156,13157,13158,13161,13162,13164,13165,13174,13175,13177,13178,13179,13180,13181,13182,13184,13185,13186,13187,13188,13189,13192,13193,13194,13195,13196,13197,13200,13201,13202,13203,13204,13205,13209,13210,13211,13212,13237,13238,13239,13240,13241,13242,13243,13244,13245,13246,13247,13248,13249,13250,13251,13252,13255,13256,13257,13258,13259,13260,13261,13262,13263,13264,13265,13266,13267,13268,13279,13290,13291,13292,13293,13302,13303,13308,13310,13315,13316,13317,13318,13320,13321,13323,13324,13325,13326,13327,13328,13329,13330,13331,13332,13975,13976,13974,13972,13973,13971,13969,13970,13968,13967,13965,13342,13344,13346,13348,13349,13351,13352,13353,13355,13357,13358,13359,13360,13361,13362,13363,13364,13365,13367,13368,13370,13371,13372,13373,13374,13375,13376,13377,13378,13379,13380,13381,13382,13383,13384,13385,13386,13387,13388,13389,13390,13391,13392,13393,13394,13395,13396,13397,13398,13399,13400,13401,13402,13403,13404,13405,15036,15035,13409,13410,13411,13412,13413,13414,13415,14880,13417,13418,13419,13420,15049,13964,13962,13961,13428,13429,13441,13442,13443,13444,13445,13446,13447,13448,13449,13450,13451,13453,13454,13456,13457,14879,13459,13460,13462,13463,13464,13465,13466,13467,13468,13469,13470,13471,13472,13473,13474,14960,13476,13477,13478,13479,13480,13482,13483,13484,13485,13486,13487,13488,13489,13490,13491,13492,13493,13494,13495,13496,13497,13498,13499,13500,13501,13502,13503,13504,13505,13506,13508,13509,13539,13540,13543,13544,13546,13547,14878,13560,13561,13562,13563,13571,13582,13583,13584,13585,13586,13587,13608,13609,13610,13611,13612,13613,13615,13616,13618,13626,13627,13640,13641,13671,13672,13959,13957,13958,13683,13684,13687,13688,13689,13690,13691,13692,14958,13695,13696,13697,13698,13699,13700,13701,13702,13703,13705,13707,13708,13709,13710,13711,13712,13713,13717,13721,13722,13723,13724,13725,13726,13727,13728,13732,13733,13792,13793,13795,13799,13800,13801,13802,13803,13804,13805,13812,13818,15077,13825,13828,13837,13839,13840,13841,13844,13845,13846,13847,13848,13853,13859,13860,13865,13866,13867,13956,13980,13981,13966,13963,13960,13979,13884,15066,15067,13982,13983,13984,13985,13986,13988,13989,13990,13991,13994,13995,13996,13997,13999,14000,14001,14002,14003,14004,14005,14006,14007,14008,14009,14010,14011,14012,14013,14015,14016,14017,14018,14019,14020,14021,14022,14023,14024,14025,14026,14027,14028,14029,14030,14031,14032,14033,14034,14035,14036,14037,14038,14039,14040,14041,14042,14043,14044,14045,14046,14047,14048,14049,14050,14051,14052,14053,14054,14055,14056,14057,14058,14059,14060,14061,14062,14063,14064,14065,14066,14071,14072,14073,14074,14075,14076,14077,14078,14079,14080,14081,14082,14083,14084,14085,14086,14087,14088,14089,14090,14091,14092,14093,14094,14095,14096,14097,14098,14099,14100,14101,14102,14103,14104,14105,14106,14107,14108,14109,14110,14111,14112,14113,14114,14115,14116,14117,14118,14119,14120,14121,14122,14123,14125,14126,14127,14128,14129,14130,14131,14132,14133,14134,14135,14136,14137,14138,14139,14140,14141,14142,14143,14144,14145,14146,14147,14148,14149,14150,14151,14152,14153,14154,14155,14156,14157,14158,14159,14160,14163,14164,14165,14168,14172,14177,14178,14179,14180,14181,14182,14184,14188,14189,14190,14191,14192,14193,14194,14195,14196,14197,14198,14199,14200,14201,14202,14203,14204,14205,14206,14207,14208,14209,14210,14211,14212,14213,14214,14215,14216,14217,14218,14219,14220,14221,14222,14223,14224,14225,14226,14227,14228,14229,14230,14231,14232,14233,14234,14235,14236,14237,14238,14239,14240,14241,14242,14243,14244,14245,14246,14247,14248,14249,14250,14251,14252,14253,14254,14255,14256,14257,14258,14259,14260,14261,14262,14263,14264,14265,14266,14267,14268,14269,14270,14271,14272,14273,14274,14275,14276,14277,14278,14279,14280,14281,14282,14283,14284,14285,14286,14287,14288,14289,14290,14291,14292,14293,14294,14295,14296,14297,14298,14299,14300,14301,14302,14303,14304,14305,14306,14307,14308,14309,14310,14311,14312,14313,14314,14315,14316,14317,14318,14319,14320,14321,14322,14323,14324,14325,14326,14327,14328,14329,14330,14331,14332,14333,14334,14335,14336,14337,14338,14339,14340,14341,14342,14343,14344,14345,14346,14347,14348,14349,14350,14351,14352,14353,14354,14355,14356,14357,14358,14359,14360,14361,14362,14363,14364,14365,14366,14367,14368,14369,14370,14371,14372,14373,14374,14375,14376,14377,14378,14379,14380,14381,14382,14383,14384,14385,14386,14387,14388,14389,14390,14391,14392,14393,14394,14395,14396,14397,14398,14399,14400,14401,14402,14403,14404,14405,14406,14407,14408,14409,14410,14411,14412,14413,14414,14415,14416,14417,14418,14419,14420,14421,14422,14423,14424,14425,14426,14427,14428,14429,14430,14431,14432,14433,14434,14435,14436,14437,14438,14439,14440,14441,14442,14443,14444,14445,14446,14447,14448,14449,14450,14451,14452,14453,14454,14455,14456,14457,14458,14459,14460,14461,14462,14463,14464,14465,14466,14467,14468,14469,14470,14471,14472,14473,14474,14475,14476,14477,14478,14479,14480,14481,14482,14483,14484,14485,14486,14487,14488,14489,14490,14491,14492,14493,14494,14495,14496,14497,14498,14499,14500,14501,14502,14503,14504,14505,14506,14507,14508,14509,14510,14511,14512,14513,14514,14515,14516,14517,14518,14519,14520,14521,14522,14523,14524,14525,14526,14527,14528,14529,14530,14531,14532,14533,14534,14535,14536,14537,14538,14539,14540,14541,14542,14543,14544,14545,14546,14547,14548,14549,14550,14551,14552,14553,14554,14555,14556,14557,14558,14559,14560,14561,14562,14563,14564,14565,14566,14567,14568,14569,14570,14571,14572,14573,14574,14575,14576,14577,14578,14579,14580,14581,14582,14583,14584,14585,14586,14587,14588,14589,14590,14591,14592,14593,14594,14595,14596,14597,14598,14599,14600,14601,14602,14603,14604,14605,14606,14607,14608,14609,14610,14611,14612,14613,14614,14615,14616,14617,14618,14619,14620,14621,14622,14623,14624,14625,14626,14627,14628,14629,14630,14631,14632,14633,14634,14635,14636,14637,14638,14639,14640,14641,14642,14643,14644,14645,14646,14647,14648,14649,14650,14651,14652,14653,14654,14655,14656,14657,14658,14659,14660,14661,14662,14663,14664,14665,14666,14667,14668,14669,14670,14671,14672,14673,14674,14675,14676,14677,14678,14679,14680,14681,14682,14683,14684,14685,14686,14687,14688,14689,14690,14691,14692,14693,14694,14695,14696,14697,14698,14699,14700,14701,14702,14703,14704,14705,14706,14707,14708,14709,14710,14711,14712,14713,14714,14715,14716,14717,14718,14719,14720,14721,14722,14723,14724,14725,14726,14727,14728,14729,14730,14731,14732,14733,14734,14735,14736,14737,14738,14739,14740,14741,14742,14743,14744,14745,14746,14747,14748,14749,14750,14751,14752,14753,14754,14755,14756,14757,14758,14759,14760,14761,14762,14763,14764,14765,14766,14767,14768,14769,14770,14771,14772,14773,14774,14775,14776,14777,14778,14779,14780,14781,14782,14783,14784,14785,14786,14787,14788,14789,14790,14791,14792,14793,14794,14795,14796,14797,14798,14799,14800,14801,14802,14803,14804,14805,14806,14807,14808,14809,14810,14811,14812,14813,14814,14815,14816,14817,14818,14819,14820,14821,14822,14823,14824,14825,14826,14827,14828,14829,14830,14831,14832,14833,14834,14835,14836,14837,14838,14839,14840,14841,14842,14843,14844,14845,14846,14847,14848,14849,14850,14851,14852,14853,14854,14855,14856,14857,14858,14859,14860,14861,14862,14863,14864,14865,14866,14867,14868,14869,14870,14871,14872,14873,14874,14875,14876,14877,15048,14938,14944,15110,15121,15132,15137,15139,15141,15142,15143,15144,15145,15146,15147,15148,15149,15150) and
  p.products_id = pc.products_id AND c.categories_id = pc.categories_id AND
  p.products_status = '1' AND
  c.categories_id = 33 AND
  c.categories_id = cd.categories_id AND
  cd.language_id = '1' LIMIT 1

Edited by Nathek

Share this post


Link to post
Share on other sites

I may have missed it, where is the post describing how to fix the category / subcategory filtering?

 

I got it figured out. Thanks to omulec's post

Share this post


Link to post
Share on other sites

Hi Everyone,

 

Is it possible to get this to work with Zencart? I am wondering because I would much rather have it running off of a Zencart site.

 

Thanks,

 

Phil

Share this post


Link to post
Share on other sites

Phil,

 

Yes, I am certain this contribution could be developed for Zencart but this forum is not where Zencart contributions should be discussed.

 

 

 

Chris


:|: Was this post helpful ? Click the LIKE THIS button :|:

 

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

Share this post


Link to post
Share on other sites

I want to remove the year filter from this so I just have Make and Model. If I remove the Year inputs will it mess the whole thing up?

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

×