Latest News: (loading..)
DunWeb

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

275 posts in this topic

Ben,

 

You can remove the year requirement, but ensure you remove all of the database queries for year as well.

 

 

 

 

Chris

Share this post


Link to post
Share on other sites

Ben,

 

You can remove the year requirement, but ensure you remove all of the database queries for year as well.

 

Chris

 

Thanks for an extremely prompt reply smile.png

I currently only have 2 test products that I quickly created. one has a make of "ford" the other "fiat". I find that if I filter one of these, the number of products in the category changes to 1, but when I click the category, both products are displayed. I copied the files over a clean install so am confused as to what the problem is.

 

http://wardyb.byethost12.com

 

also, I set "ford orion" to only have 1999 as a year, but it shows the year range for a sequento instead :/

 

p.s. please ignore my poor choice of cars

Edited by wardillb

Share this post


Link to post
Share on other sites

 

 

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.

is it possible that you can tell more about the way you worked out the problem with the headings, because i got the same problem, but i do not have at index called polish....

Share this post


Link to post
Share on other sites

Hello Chris,

I feel I'm going mad ! I've applied every error correction I've found on the thread, and still no avail. The problem is as follows :

I have an auto parts store. Everything works ok with YMM, if I have the products under a single category, for example "Filters".

If I have "Filters", with 4 subcategories ("Oil Filters, Gas Filters, Air Filters, etc"), YMM stops working until I get to the category which DOES NOT HAVE other categories in it.

 

In short, let's suppose I have the following structure (after selecting a make/model/year):

 

Wheels (5)

Trim (3)

Filters (9) (actually 20 products in total, of which just 9 fit the car chosen)

- Air Filters (3)

- Oil Filters (5)

- Gas Filters (1)

 

If I click on "Wheels", it shows me correctly the 5 products corresponding to the chosen car. Same for Trim.

If I click "Filters", it shows me ALL THE 20 PRODUCTS !. If I subsequently click Air Filters, Oil Filters, or Gas Filters (terminal category), it again shows me correctly only the products that fit the chosen car.

I am at witts end ! Practically the filter doesn't apply if the chosen category contains another subcategory.

Help please ?!

Share this post


Link to post
Share on other sites

So I have went to install this on a new 2.3 install. I used the drop in files. But when I go to the modules to install it after doing the sql query theirs nothing there to install. I noticed that in the drop-in files theirs nothing that goes into the modules folder. Is the package to download on the site incomplete?

Share this post


Link to post
Share on other sites

So I have went to install this on a new 2.3 install. I used the drop in files. But when I go to the modules to install it after doing the sql query theirs nothing there to install. I noticed that in the drop-in files theirs nothing that goes into the modules folder. Is the package to download on the site incomplete?

 

 

The uploads are complete and functional. Ensure you have uploaded all of the new files as well as the drop on top files. There is NO file for the /includes/modules/ directory with the add on. The file is in the /includes/modules/boxes/ directory.

 

 

Chris

Share this post


Link to post
Share on other sites

@_Keith_,

 

I am glad you got it sorted out.

 

 

 

Chris

Share this post


Link to post
Share on other sites

Hi all!

 

Excellent this contribution ..! I need to add the ENGINE... anyone can help me with this? or if anyone has this module with more extras?

 

MAKE, MODEL, ENGINE, YEAR, PART (Tire, A/C bla bla.)

 

Thanks, I hope to answer as soon as possible.

Share this post


Link to post
Share on other sites

“ I DON’T HAVE THE DROPDOWN MENU IN THE LEFT COLUMN? CAN SOMEONE PLEASE PLEASE HELP ”

 

Hi guys please please please can some kind person help me? im new to php and oscommerce and I have been trying to get this contribution working for two weeks now and still cant understand where I’m going wrong

 

The steps I’m doing to install this,

 

Installed wamp

 

I have downloaded and installed a fresh copy of oscommerce 2.3.1 ( working fine )

 

I have downloaded 2.3.1 year_make_model r1.0_Upgrade_By_p0yo77

 

open phpmyadmin and in the table for oscommerce in going to sql and copying the step 1 Run sql part of the install instructions 9 copy and pasting and its says table has been created and it all looks fine.

 

now im useing the drop on top files simply copy and replace in the directory’s listed and puting in the new files also. ( i have also tryied the manual way and still no joy!)

 

i have made a couple of new products with the year make model boxes on the add new products page and it all works fine, when I select the product on the categories menu it has the year make model info on the product page.

 

THE PROBLEM IN HAVING IS I DON’T HAVE THE DROPDOWN MENU IN THE LEFT COLUMN? CAN SOMEONE PLEASE HELP THIS IS SOMETHING I CANT FIGURE ON MY OWN !

 

kind regards and thank you so much for reading my issue.

 

John Watson

Share this post


Link to post
Share on other sites

Hi Dunweb,

 

Thank you so very much i feel a little silly now as it was just as you said and very simple! I’m new to oscommerce and php ( done a little in the past but not much! )

 

I’m trying to get my own business off the ground and thought that this was the right shopping cart solution for us as its got the best support network and your help makes me feel happy the i made the right choice so a very very very big thanks!

 

please can you give me a tip on how to style the ymm background box and also text so i can get this to stand out on my website as my colours are black and red.

 

Honestly i really appreciate you taking the time to give me advise me.

 

kind regards

 

John

Share this post


Link to post
Share on other sites

Hey Chris so I now have the test site up and am modding up the store. Know where I can find a pre made list thats easy to import into the database with all the year make model info? Looking at saving some time here.

Share this post


Link to post
Share on other sites

Also another thing I have noticed. I setup my sort order for this contrib and its still at the bottom of the page.

Share this post


Link to post
Share on other sites

Hi Dunweb

 

Im stuck!

 

i have been on this now for some weeks and i need help!

 

the page looks great wit the template i have however the ymm app will not work with my template as it will not do the product search ( i know this contribution works as i have tested it on a fresh install of oscommerce.

 

if i past the code in could someone please point out where its all going wrong? ( what is stopping the search? )

 

<?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 ofh">'. "\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 + 2).'px;">'. "\n".

' <div class="pic_padd wrapper_pic_div" style="width:'.(SUBCATEGORY_IMAGE_WIDTH + 2).'px;height:'.(SUBCATEGORY_IMAGE_HEIGHT + 2).'px;">'.$p_pic.''.tep_draw_prod_pic3_top().''.tep_draw_prod_pic3_bottom().'</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();?>

 

</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');

?>

 

please help you will be my hero!

 

regards

 

john watson

Share this post


Link to post
Share on other sites

NOW HERE IS THE CODE THAT DONT WORK IF I FOLLOW THE YMM GUIDE

 

<?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

 

//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

 

$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 ofh">'. "\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 + 2).'px;">'. "\n".

' <div class="pic_padd wrapper_pic_div" style="width:'.(SUBCATEGORY_IMAGE_WIDTH + 2).'px;height:'.(SUBCATEGORY_IMAGE_HEIGHT + 2).'px;">'.$p_pic.''.tep_draw_prod_pic3_top().''.tep_draw_prod_pic3_bottom().'</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

}

//bof Year_Make_Model Contribution v2.3.x by Dunweb Designs

 

elseif($_GET['Make'] || $_GET['Model'] || $_GET['Year']){

 

$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;

}

}

if($current_category_id){

$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 " . (YMM_FILTER_PRODUCT_LISTING == 'Yes' ? $YMM_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 . "'";

}else{

$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 " . (YMM_FILTER_PRODUCT_LISTING == 'Yes' ? $YMM_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 . "'";

}

 

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'];

}

?>

 

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

 

<div class="contentContainer">

 

<?php

 

 

include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);

echo '</div>';

 

//eof Year_Make_Model Contribution v2.3.x by Dunweb Designs

 

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();?>

 

</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

CAN ANYONE HELP ON MY POST ABOVE?

HIS HAS BEEN A REAL PICKLE!

 

REGARDS

 

JOHN

Edited by Dream Media

Share this post


Link to post
Share on other sites

@@Dream Media

 

The YMM contribution works fine on a standard installation. If you have a customized site or template, you will need to make the appropriate changes to suit your needs.

 

 

 

Chris

Share this post


Link to post
Share on other sites

Hi !

 

Thx for all this work ! It's works fine at the moment.

 

I would like to know if it's possible to add one more field in the box and modify date format like this

Year => ok

Make => ok

Model => ok

Engine => if possible add this field

Year => Modify this field that user would be able to enter MONTH - YEAR with drop-down list.

 

Does someone would be able to add these changes admin/catalog sides ?

 

Good day to all

Edited by HaaGeN

Share this post


Link to post
Share on other sites

Hi all!

 

I am having an issue when using this mod coupled with Master Products for v2.3x. Basically the YMM is working as intended however if I try to add a master product (a core function of the Master Product addon) I do not get the option to assign it to a year, make, or model. My entire shopping cart revolves around being able to do this successfully so I would greatly appreciate any help you can offer.

 

I dont know enough about php to post up anything relevant but if you tell me which files you need to look at I can put them up here.

 

Thank you in advance!

Share this post


Link to post
Share on other sites

@@grellk

 

The two files that would need to be altered significantly to use both of the contributions are /admin/categories.php and /product_info.php. If you are NOT PHP proficient, then I suggest find someone who is to integrate the two.

 

 

Chris

Share this post


Link to post
Share on other sites

Maybe my message was not read because it's at the end of the 6th page so i've copy it here :$

 

Hi !

 

Thx for all this work ! It's works fine at the moment.

 

I would like to know if it's possible to add one more field in the box and modify date format like this

Year => ok

Make => ok

Model => ok

Engine => if possible add this field

Year => Modify this field that user would be able to enter MONTH - YEAR with drop-down list.

 

Does someone would be able to add these changes admin/catalog sides ?

 

Good day to all

Share this post


Link to post
Share on other sites

@@HaaGeN,

 

YES, it is possible to add the fields if you re-write the code.

 

 

Chris

Share this post


Link to post
Share on other sites

To anyone interested, I just uploaded a revised contribution with a fourth filter for PART. This filter can be altered to suit your individual needs such as trim or body type.

 

You can download the YMMP Fork here: http://addons.oscommerce.com/info/7835

 

 

 

 

Chris

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