Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Dropdownmenu


euskopc

Recommended Posts

  • Replies 248
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

 

first i would like to thank all the authors working on this contrib, its just what i need .

 

When installing version 2.3 i get following error on my store :

Warning: main(includes/languages/dutch/FILENAME_DROPDOWNMENU): failed to open stream: No such file or directory in /home/httpd/vhosts/prof-its.be/httpdocs/WebShop/includes/boxes/categories_js.php on line 18

 

Fatal error: main(): Failed opening required 'includes/languages/dutch/FILENAME_DROPDOWNMENU' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/prof-its.be/httpdocs/WebShop/includes/boxes/categories_js.php on line 18

 

This after adding the line in column left .

 

I also want to make shure of following possible errors;

5. Open the select_rs.php and put there your database information.

 

function serializeSql( $sql ){

  $link = mysql_connect("http://www.prof-its.be/", "username", "password");

  mysql_select_db ("DATABASE_NAME");

  $result = mysql_query ($sql);

  $s = '';

  while ($row = mysql_fetch_row($result)) {

  $s .= join( $row, '~') . "|";

  }

  mysql_close($link);

  return $s;

}

 

?>

is this the correct way 2 do it ?

 

Also bit confusing :

 

After it paste this code ( BEFORE THE LAST } ):  ?

 

    if (tep_not_null($keywords)) {

      if (!tep_parse_search_string($keywords, $search_keywords)) {

        $error = true;

 

        $messageStack->add_session('search', ERROR_INVALID_KEYWORDS);

      }

    }

    if(!tep_not_null($keywords)) {

    $keywords="Empty";

    }

ok ?

 

Thx in advance,

 

chris

Link to comment
Share on other sites

Pardon but I have an error when upload de v2.3 contribution.

Download the DropDownMenu v2.4 and follow the instructions to upgrade from v2.2 to v2.4 (it's equal from v2.2 that from v2.3

 

Also bit confusing :

 

 

QUOTE 

After it paste this code ( BEFORE THE LAST } ):  ?

 

    if (tep_not_null($keywords)) {

      if (!tep_parse_search_string($keywords, $search_keywords)) {

        $error = true;

 

        $messageStack->add_session('search', ERROR_INVALID_KEYWORDS);

      }

    }

    if(!tep_not_null($keywords)) {

    $keywords="Empty";

    }

 

 

ok ?

OK.

My english is horrible, if anyone have enought time, please correct the install instructions :-D

Link to comment
Share on other sites

Previous problem solved with :

Installed version 2.4

 

everthing works, only few minors :

- i cannot replace the line in column_left.php

it works if i add the line in column_right.php

(but then i have 2 search boxes)

 

When the advanced_search_result.php loads, my layout screws up

HEADING_TITLE_2 

 

 

TABLE_HEADING_IMAGE  TABLE_HEADING_PRODUCTS+  TABLE_HEADING_MANUFACTURER  TABLE_HEADING_PRICE

note : i use the stylesheet center page contrib

 

this is what it looks like :fucked up layout

 

I'm quit shure someone knows the right answers :P

 

Thx in advance

Christophe

Link to comment
Share on other sites

could it also be possible to sort order the prices ?

If you browse trough categories on my shop the cheapest products are shown first .

this by changing my index.php :

    if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[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;

        }

*/

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

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

          $listing_sql .= " order by final_price";

          break;

        }

      }

    } else {

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

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

      $listing_sql .= ' order by ';

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

        case 'PRODUCT_LIST_MODEL':

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

          break;

        case 'PRODUCT_LIST_NAME':

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

          break;

        case 'PRODUCT_LIST_MANUFACTURER':

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

          break;

        case 'PRODUCT_LIST_QUANTITY':

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

          break;

        case 'PRODUCT_LIST_IMAGE':

          $listing_sql .= "pd.products_name";

          break;

        case 'PRODUCT_LIST_WEIGHT':

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

          break;

        case 'PRODUCT_LIST_PRICE':

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

          break;

      }

    }

?>

 

Thx & Greets

Chris

Link to comment
Share on other sites

After some testing i must say that i think there might be a bug when using subcategories

 

I don't get any errors, but it displays products that should not be displayd .

The reason i wanted this contrib is because i have 30.000 products in my oscommerce and needed something to easup the searching of products .

 

Grts,

Chris

Link to comment
Share on other sites

HEADING_TITLE_2

TABLE_HEADING_IMAGE

TABLE_HEADING_PRODUCTS

TABLE_HEADING_MANUFACTURER

TABLE_HEADING_PRICE

 

This names are defined in catalog/includes/laguages/YOUR_LANGUAGE/advanced_search.php

 

Please be sure that you have defined this names in the file.

Link to comment
Share on other sites

This names are defined in catalog/includes/laguages/YOUR_LANGUAGE/advanced_search.php

 

<?php

/*

  $Id: advanced_search_result.php,v 1.10 2002/11/19 01:48:08 dgw_ Exp $

 

  osCommerce, Open Source E-Commerce Solutions

  http://www.oscommerce.com

 

  Copyright © 2002 osCommerce

 

  Released under the GNU General Public License

*/

 

define('NAVBAR_TITLE1', 'Zoeken');

define('NAVBAR_TITLE2', 'Zoek Resultaten');

define('HEADING_TITLE', 'Producten die overeen komen met de zoek criteria');

define('TABLE_HEADING_IMAGE', '');

define('TABLE_HEADING_MODEL', 'Model');

define('TABLE_HEADING_PRODUCTS', 'Product Naam');

define('TABLE_HEADING_MANUFACTURER', 'Fabrikant');

define('TABLE_HEADING_QUANTITY', 'Aantal');

define('TABLE_HEADING_PRICE', 'Prijs');

define('TABLE_HEADING_WEIGHT', 'Gewicht');

define('TABLE_HEADING_BUY_NOW', 'Koop nu');

define('TEXT_NO_PRODUCTS', 'Er zijn geen producten die aan de zoek criteria voldoen.');

define('TEXT_NO_PRODUCTS2', 'Er zijn geen producten die aan de zoek criteria voldoen.');

define('TEXT_BUY', 'Koop 1 \'');

define('TEXT_NOW', '\' Nu');

?>

 

Grts

Chris

Link to comment
Share on other sites

Hi,

 

i have some problems with the performance (v 2.4). The script loads over 500kb with every site. ISDN users must waiting a lot of time.

 

With IE 6.1 the CPU go up to 100% for 8 seconds? This ist not with Mozilla Firefox 0.9.3.?

 

Please look and help me

 

www.pixeltoner.de/osc/catalog/

 

Thanks

Link to comment
Share on other sites

Hi,

 

i have some problems with the performance (v 2.4). The script loads over 500kb with every site.  ISDN users must waiting a lot of time.

 

With IE 6.1 the CPU go up to 100% for 8 seconds? This ist not with Mozilla Firefox 0.9.3.?

 

Please look and help me

 

www.pixeltoner.de/osc/catalog/

 

Thanks

 

Hello, I have some questions...

 

Error 404: www.pixeltoner.de/osc/catalog/

I make some tests in Eusko PC and my CPU goes OK.

How do you masured the weight of the page?

Link to comment
Share on other sites

pixelegg why not charge the categories when the page load?

 

the categories charge. but bevore you can choose a category you must first choose the manufactur and then you can choose the subcategory.

 

When you can choose the category without manufactur the result is not what i will see.

 

I have Categories like this

 

Apple - OEM number 1 - printer A - toner - produkt

Apple - OEM number 1 - printer A - zubeh?r - produkt

Apple - OEM number 1 - printer B - toner - produkt

Apple - OEM number 1 - printer B - zubeh?r - produkt

.....

In the box you see printers in category field and toner/zubeh?r in subcategory field. Thats ok. I think...

Edited by pixelegg
Link to comment
Share on other sites

Pixellegg, I've created DropDownMenu for work only with:

Manufacturer-> category -> subcategory

 

If you want to add new category level you'll need to code a little :-(, I think that you have 2 options:

 

1.-New select box for the new level

2.-In the categories selection, add a subcategory:

 

*Manufacturer: Agfa

*Categories:

CB740

->X38

CB743

->X55

->X800

->X805

->X88

*Subcategories: Depends of categories selection

 

________________

 

You know that my english is one of the worst of the world, ;-) for this reason explain me more if you are talkink about another thing.

Link to comment
Share on other sites

Pixellegg, I've created DropDownMenu for work only with:

Manufacturer-> category -> subcategory

 

If you want to add new category level you'll need to code a little :-(, I think that you have 2 options:

 

1.-New select box for the new level

2.-In the categories selection, add a subcategory:

 

*Manufacturer: Agfa

*Categories:

CB740

->X38

CB743

->X55

->X800

->X805

->X88

*Subcategories: Depends of categories selection

 

Thank you for answer,

 

the dropdownmenu works fine and do exactly what i want.  Thats not the problem.  The problem is that it loads over 500kb.  Without the dropdownmenu it loads < 100kb. I don't know what ist the reason for this. Do you think that my categories are the reason?

 

*Manufacturer: Agfa

*Categories:

Agfa (no product in there) -> OEM number (no product in there) -> printer (no product in ther)

*Subcategories

Toner (with product)

Zubeh?r (with product)

 

Without the three categories i lose the overview in the admin modul.

 

Thank you for any idea what can i do.

Martin

 

________________

 

You know that my english is one of the worst of the world, ;-) for this reason explain me more if you are talkink about another thing.

Link to comment
Share on other sites

Arg!! I think that its a stupid error:

 

Open catalog/includes/languages/categories_js.php:

 

Search this line:

tep_draw_pull_down_menu("manufacturers_id",
          tep_get_manufacturers(array(array(
     "id" => "",
     "text" => TEXT_ALL_MANUFACTURERS))),$preseleccion1)

 

Replace with this:

 

tep_draw_pull_down_menu("manufacturers_id","")

 

Search this line:

 

tep_draw_pull_down_menu("categories_id", tep_get_categories(array(array(
     "id" => "",
     "text" => TEXT_ALL_CATEGORIES))))

 

Replace with this:

 

tep_draw_pull_down_menu("categories_id", "")

 

Search this:

 

tep_draw_pull_down_menu("subcategories_id", tep_get_categories(array(array(
     "id" => "",
     "text" => TEXT_ALL_CATEGORIES))))

 

Replace with this:

 

tep_draw_pull_down_menu("subcategories_id", "")

 

 

I can't probe it in my server, please tell me if this fixes solve your problems:

Link to comment
Share on other sites

Arg!! I think that its a stupid error:

 

Open catalog/includes/languages/categories_js.php:

 

Search this line:

tep_draw_pull_down_menu("manufacturers_id",
          tep_get_manufacturers(array(array(
     "id" => "",
     "text" => TEXT_ALL_MANUFACTURERS))),$preseleccion1)

 

Replace with this:

 

tep_draw_pull_down_menu("manufacturers_id","")

 

Search this line:

 

tep_draw_pull_down_menu("categories_id", tep_get_categories(array(array(
     "id" => "",
     "text" => TEXT_ALL_CATEGORIES))))

 

Replace with this:

 

tep_draw_pull_down_menu("categories_id", "")

 

Search this:

 

tep_draw_pull_down_menu("subcategories_id", tep_get_categories(array(array(
     "id" => "",
     "text" => TEXT_ALL_CATEGORIES))))

 

Replace with this:

 

tep_draw_pull_down_menu("subcategories_id", "")

I can't probe it in my server, please tell me if this fixes solve your problems:

 

 

Hi,

 

you can see the result under www.tonermodule.de/osc/catalog/

 

Thousend thanks for Help

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...