Jump to content
DunWeb

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

Recommended Posts

Hello, I have a website running osc 2.3.1 with YMM installed. Everything works well but for the site I only need Make / Model filter (without the year range).

Before I go ahead and destroy everything, I am asking for a more experienced programmer for help as to what needs to be deleted/modified. My knowldege is limited.

Any advice is welcomed.

 

Thank you!

Share this post


Link to post
Share on other sites

Hello, I have a website running osc 2.3.1 with YMM installed. Everything works well but for the site I only need Make / Model filter (without the year range).

Before I go ahead and destroy everything, I am asking for a more experienced programmer for help as to what needs to be deleted/modified. My knowldege is limited.

Any advice is welcomed.

 

Thank you!

 

dont just go hacking into it, look for the functions you wish to remove and comment out the code using // then at least if you break it you know to uncomment.

 

Start with the bm_year_make_model.php box and pick say 'year' and work your way through the code doing the above.

 

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

Hey Pupstar, thank you for the quick reply. Tried to do that but I start to get lost when java starts..

 

a quick example

 

  $javascript .= '
 function pop_model(){

  var sv = document.make_model_year.Make.value;
  if(sv != "all"){
    $.ajax({
  type: "POST",
  url: "ymmajax.php",
  data: "action=getmodel&make="+sv,
  success: function(o){
 document.getElementById("model_select").innerHTML= o;
  }
   });
  } else {
  var o ="<select name=\"Model\" onchange=\"pop_part();\" style=\"width: 100%\"><option value=\"all\">Chainsaw Model</option>";
  o+="</select>";
  document.getElementById("model_select").innerHTML= o;
  }
//   document.getElementById("year_select").innerHTML= "<select name=\"Year\" style=\"width: 100%\"><option value=\"0\">Year</option></select>";
  document.getElementById("part_select").innerHTML= "<select name=\"Part\" style=\"width: 100%\"><option value=\"all\">Bar Size/Drive Links</option></select>";
 }

 

:thumbsup:


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

Hey guys I upgraded to 2.3.3.4 and now all my drop downs for this module are blank. No text in the boxes either or values. Is anyone else having this issue or know of a method to resolve? Re installing didn't help. Thanks in advance!

Share this post


Link to post
Share on other sites

Hello, how can I have the user redirected to cPath=0 (main category list) when he selects the model when he already browsed and he is in a subcategory?

thank you, constantin

Share this post


Link to post
Share on other sites

Hi, if I have the optional Product List Filter installed, can you provide with correct code to filter products for selecte model by manufacturer?

 

Original code follows:

 

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

}

 

.........

Share this post


Link to post
Share on other sites

Hello Chris,

 

ymm is a great addon and has been working without any problems in 2.2rca.

 

Now I build a 2.3.1 and get ymm with 4. filter not to run properly.

 

The ymm list on the product_info.php always appears in TAB5, in addition it is necessary that something is in TAB5 so that the list will appear there.

 

There currently are only 5 products in the shop with something in TAB5 (english -> Model List and german -> Verwendungsliste).

 

The five products are the three Galaxy and the two graphics cards. (Galaxy None and the graphics cards are Universal Products)

 

It also filters into the subcategories but not universal products and the box in the left column shows not uprightly according to the selection.

 

Please can you have a look on www.motopart24.de ? - maybe there is a quick solution wich i do not see.

 

I really read the last 13 pages on this thread more than once and didn't find the solution.

 

br

&

thx

Stefan

Edited by stratula

Share this post


Link to post
Share on other sites

hello, thanks for you time developing this code.

i have just installed in 2.3.3.4 and got some problems when trying to add new YMM. This is the problem I get:

Can someone help me?post-315950-0-35647500-1398720138_thumb.png

Share this post


Link to post
Share on other sites

Hey all, first time poster.

 

I am trying to get this up and running for my Motorcycle Parts Store. I am having issues with the First Step believe it or not. I launched a brand new OSCommerce webpage on update 2.3.3 and would ideally like to use the drop-on-top method. My issue is I have gone to MySQL and create the indicated table from the first part(products_ymm) but the rest is a bit confusing. The Insert into bits I am having trouble with. If anyone could give some advice it would be appreciated.

 

Much thanks.

 

C.

Share this post


Link to post
Share on other sites

Okay, I've realized how to pass step one. But now for the Drop on top files. I have dropped them all onto the default location which would be the store's main folder. is there something i'm missing? I don't seem to see any optional installations under "boxes".

 

Thanks,

 

C.

Share this post


Link to post
Share on other sites

Further in my progress, I've found that merging and replacing the files does not allow me to install the boxes. So I also merged and replaced the "New" files as well, leading to me being able to install the Year Make Model category. However, now I am unable to edit the YMM boxes. I.e, I cannot put any words in them. Any help?

 

Thanks,

 

C.

Share this post


Link to post
Share on other sites

has anyone had any success installing this contribution using 2.3.3.4 with bootstrap running on top?

 

 

I make my revisions to all the files and then I get a white page for my test environment, no errors. 

 

Admin panel still works, I can actually go into modules > boxes and install the ymm addon, though i dont see it through catalog as specified in step 10's readme. 

Share this post


Link to post
Share on other sites

Hello ppl,

 

A HUGE thank you is not enough for the job you're doing. Hope u keep on forever and provide the amount of help u always do.

 

I'm fairly new to the whole thing and i've got a prob.

 

Tried installing the module on a fresh v2.3.4 and everything looked good at first.

When i've tried entering some data for the module on the product (meaning i've entered the Model , Make , year and Part stuff) after i hit SAVE this came up.

 

Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\inetpub\vhosts\dounas.gr\httpdocs\ESHOP\admin\categories.php on line 281

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\inetpub\vhosts\dounas.gr\httpdocs\ESHOP\admin\categories.php on line 281

Warning: Cannot modify header information - headers already sent by (output started at C:\inetpub\vhosts\dounas.gr\httpdocs\ESHOP\admin\categories.php:281) in C:\inetpub\vhosts\dounas.gr\httpdocs\ESHOP\admin\includes\functions\general.php on line 38

 

 

This comes up ONLY when i enter data on YMM boxes...if i update any other thing in the product and hit save , it is ok.

I haven't modified anything on the files , used them as they are in the folders.

 

I know this might be so simple but i am really not that much and i hope anyone can help

 

Thnx in advance

everflowgr

Share this post


Link to post
Share on other sites

This addon was never properly coded, and the problems are becoming evident with newer versions of osCommerce. You'll need to fix all of these errors as they show up. To start, replace mysql_query with tep_db_query everywhere. Delete the second parameter if it has one.

 

You'll probably find more errors after this is fixed. I have no idea how many bugs this thing has.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

I know this thread is pretty old, but I have installed the YMM module on my auto parts store, and I have something like 30,000+ parts, most of which all have a YMM specification.  Now is there a way to import them into my store with the YMM attached so I do not have to edit each and every part?

Share this post


Link to post
Share on other sites

I have been away from Oscommerce for some time using Zen Cart as my ecommerce platform. I have had great success with Zen Cart except for one issue and that is the year make model search option used. It works for me but is not allowing me do what I want.

 

My question is with the Oscommerce YMM option , when installed , do I need to point to categories to get it to work as in Zen Cart.

 

The Zen Cart YMM functions with Category - SubCategory - Subcategory and the YMM program needs to know what the assigned category number is to get it started.

 

I have OSC 2.3.3 installed on my computers localhost and YMM installed also but the selection box is not showing. I am assuming that because I have no product linked it will not display but I am probaby wrong so I need help.

Edited by jer37

Share this post


Link to post
Share on other sites

For catalog/admin/categories.php - removed the legacy mysql_query and used:

 

$product_ymm_query = tep_db_query("select id, products_id, products_car_make, products_car_model, products_car_year_bof, products_car_year_eof from " . TABLE_PRODUCTS_YMM . " where id = '" . (int)$id . "'");

            while ($product_ymm = tep_db_fetch_array($product_ymm_query)) {
              tep_db_query("insert into " . TABLE_PRODUCTS_YMM . " (id, products_id, products_car_make, products_car_model, products_car_year_bof, products_car_year_eof) values ('" . (int)$dup_products_id . "', '" . tep_db_input($product_ymm['products_car_make']) . "', '" . tep_db_input($product_ymm['products_car_model']) . "', '" . tep_db_input($product_ymm['products_car_year_bof']) . "','" . tep_db_input($product_ymm['products_car_year_eof']) . "')");
            }

Share this post


Link to post
Share on other sites

 

For catalog/admin/categories.php - removed the legacy mysql_query and used:

 

$product_ymm_query = tep_db_query("select id, products_id, products_car_make, products_car_model, products_car_year_bof, products_car_year_eof from " . TABLE_PRODUCTS_YMM . " where id = '" . (int)$id . "'");

            while ($product_ymm = tep_db_fetch_array($product_ymm_query)) {
              tep_db_query("insert into " . TABLE_PRODUCTS_YMM . " (id, products_id, products_car_make, products_car_model, products_car_year_bof, products_car_year_eof) values ('" . (int)$dup_products_id . "', '" . tep_db_input($product_ymm['products_car_make']) . "', '" . tep_db_input($product_ymm['products_car_model']) . "', '" . tep_db_input($product_ymm['products_car_year_bof']) . "','" . tep_db_input($product_ymm['products_car_year_eof']) . "')");
            }

 

Hi,

I don't see which code to replace with the one you give...

 

Have you been able to adapt the addon to v2.3.4 ?


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

Share this post


Link to post
Share on other sites

@@milerwan

 

Pupstar and myself tackled this for 2.3.4BS, not sure which version you are running but it's all here http://forums.oscommerce.com/topic/410373-year-make-model-for-bootstrap-edge/


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

Share this post


Link to post
Share on other sites

@@frankl
 

It is for 2.3.4 BS, of course. ;)
I have taken a look on the thread, for the moment it seems there is no addon competed available, isn't it ?


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

Share this post


Link to post
Share on other sites

@@milerwan

 

Not yet, I'm not sure if @@PupStar will package it up or not, but if you follow that thread closely it gives you everything you need. I know you are pretty handy putting things together :)


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

Share this post


Link to post
Share on other sites

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

×