Jump to content
Sign in to follow this  
euskopc

[CONTRIBUTION] Dropdownmenu

Recommended Posts

Pixelegg: By the momment I've no solution for this message. The contribution send info (manufacturer, category and subcategory) from SSL page to nonSSL pages, but the customers know that they have changed some items.

 

Rubygirl: I/we need more info (javascript errors, url of your webpage to see the problem...). Try to check the installations steps.

Share this post


Link to post
Share on other sites

I went through the install steps again and all seems right - i have zero java errors - even checked through firefox - no idea why nothing is populating - very odd....

 

any ideas of where to even start looking - like any known bugs with other contribs, etc...

Share this post


Link to post
Share on other sites

euskopc,

 

I think your contrib. is just great. I know you have mentioned many times that you do not have much time for suggestions so you can add this to your list for a later date...if at all. I may be the only one wanting this but I would like to be able to have the breadcrum listed as OSC does in its basic version. In connection to that I would also like to have the location of the user (category/subcategory) listed at the top of the page where the title "Products meeting the search criteria" is listed.

 

Other than that I think you directions were very straight forward and my install was a breeze!

 

Thanks!!! :thumbsup:

Share this post


Link to post
Share on other sites

finally - looks like i have a javascript error:

 

Error: dropdownmenu_path is not defined

Source File: http://domain.com/jsrsClient.js

Line: 266

 

here is around line 266

 

// get context

var rspage= dropdownmenu_path + rspage;

var contextObj = jsrsContextPool[ jsrsGetContextID() ];

contextObj.callback = callback;

 

any ideas?

 

 

thanks!

Share this post


Link to post
Share on other sites
Hello everyone

I want to make a change to this contribution

I would like to make it to show the products for a manufacturer and category instead of the subcategories

 

To be like:

 

Manufacturer

Category

Products

 

and when click search to go to the selected product info page

 

I really need this change so any help is very much apreciated

 

Thank you

 

 

did you ever make any headway on this change? would like to help out but don't know if you have already resolved this - think it is a very good idea ...

 

let me know

 

ps - by the way - resolved my issues with the blank fields - dns hadn't completely propagated on switch - now it works great! - i have also made a few changes to install file if you'd like it - if there is anything else to add - please PM me so that i can add them and you can submit the latest version of this great contribution!

Edited by rubygirl

Share this post


Link to post
Share on other sites
did you ever make any headway on this change? would like to help out but don't know if you have already resolved this - think it is a very good idea ...

 

let me know

 

ps - by the way - resolved my issues with the blank fields - dns hadn't completely propagated on switch - now it works great! - i have also made a few changes to install file if you'd like it - if there is anything else to add - please PM me so that i can add them and you can submit the latest version of this great contribution!

 

No, I didn't make any changes. This is what I would like to code when I've finish my actual obligations.

 

1.- Enable the use of dropdownmenu in SSL. In previous posts you can view a patch but probably need little modifications (ability of detect the SSL, the patch recommends changes in SSL and NOT_SSL).

 

2.- Simple link to advanced_search.php in the title of the box.

 

3.- Activate the breadcrumb again (previous version remove it).

 

4.- This is the hardest: Ability to control the dropdownmenu in the admin side. The admin section controls:

  1. Enable/disable dropdownmenu
  2. Order of the searches (manufacturers->categories->subcategories; categories->subcategories->manufacturers or manufacturers->categories->products)

5.- Hide categories and subcategories that are empty.

 

6.- Make translations of the statusbar messages.

 

 

If anyone wants to help, only post here the changes for not duplicate the work.

Edited by euskopc

Share this post


Link to post
Share on other sites

I'd try to post here all the changes that I'm doing for getting more stable version. Use this method if you want to collaborate.

 

***************************

DropDownMenu 2.7 Alpha 1

***************************

 

Disble manufacturers when they haven't products.

 

1.- Open catalog/select_rs.php and search this:

  return serializeSql("select manufacturers_id, manufacturers_name from manufacturers order by manufacturers_name");

 

2.- Replace with this:

  return serializeSql("select distinct m.manufacturers_id, m.manufacturers_name from manufacturers m, products p where p.manufacturers_id=m.manufacturers_id order by m.manufacturers_name");

Share this post


Link to post
Share on other sites

***************************

DropDownMenu 2.7 Alpha 2

***************************

 

Allow the use of DropDownMenu in SSL and NON_SSL pages.

 

1.-Create a file named blank.php (nothing in this file) and copy it in the catalog directory.

 

2.-Open catalog/jsrsclient.js:

case 'IE':
document.body.insertAdjacentHTML( "afterBegin", '<span id="SPAN' + containerName + '"></span>' );
var span = document.all( "SPAN" + containerName );
var html = '<iframe name="' + containerName + '" src=""></iframe>';
span.innerHTML = html;
span.style.display = 'none';
container = window.frames[ containerName ];
break;

 

Change it with this:

case 'IE':
document.body.insertAdjacentHTML( "afterBegin", '<span id="SPAN' + containerName + '"></span>' );
var span = document.all( "SPAN" + containerName );
var html = '<iframe name="' + containerName + '" src="blank.php"></iframe>';
span.innerHTML = html;
span.style.display = 'none';
container = window.frames[ containerName ];
break;

 

3.-Open catalog/includes/boxes/categories_js.php and search this:

var dropdownmenu_path = "<?php echo DIR_WS_HTTP_CATALOG ?>";

Replace with this:
[CODE]var dropdownmenu_path = "<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_HTTPS_CATALOG ?>";

 

*******************************

 

Mozilla advertise that we are sending information from SSL page to NON_SSL, the posible fix to this isue is change this line:

 

tep_draw_form("QForm", tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, "", "NONSSL", false), "get") .

 

With this one:

tep_draw_form("QForm", tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, "", $request_type, false), "get") .

 

I don't like the fix because the search show the results in a SSL page, I prefer the advertise.

Share this post


Link to post
Share on other sites

WOW!!

I like a lot your webpage!!

I'll try today find a solution for you. Do you have messenger for speed up the tests?

Share this post


Link to post
Share on other sites

I?m sorry to disturb this tread. But I really need some help to change my currency dropdown menu.

I do only export, therefore will I use my local currency as the default currency, but I don?t like to show it in the shop.

Dos you know how to do that? I think there are tow ways either selects USD, AUD?????.. OR make at table in the database ?currencies_disable_currency? and 1 for enabled 0 for disabled, than the dropdown only select the enabled currencies.

If anybody knows how to do that I will be very happy, have been looking for this for long time.

Share this post


Link to post
Share on other sites
I?m sorry to disturb this tread. But I really need some help to change my currency dropdown menu.

I do only export, therefore will I use my local currency as the default currency, but I don?t like to show it in the shop.

Dos you know how to do that? I think there are tow ways either selects USD, AUD?????.. OR make at table in the database ?currencies_disable_currency? and 1 for enabled 0 for disabled, than the dropdown only select the enabled currencies.

If anybody knows how to do that I will be very happy, have been looking for this for long time.

 

 

this thread is about the advanced search drop down - you might want to post under General Support instead - might have more people looking at it ... also, when you repost somewhere else - try to explain a little more - cant understand what you are looking to do....

Share this post


Link to post
Share on other sites
***************************

DropDownMenu 2.7 Alpha 2

***************************

 

Allow the use of DropDownMenu in SSL and NON_SSL pages.

 

1.-Create a file named blank.php (nothing in this file) and copy it in the catalog directory.

 

2.-Open catalog/jsrsclient.js:

case 'IE':
document.body.insertAdjacentHTML( "afterBegin", '<span id="SPAN' + containerName + '"></span>' );
var span = document.all( "SPAN" + containerName );
var html = '<iframe name="' + containerName + '" src=""></iframe>';
span.innerHTML = html;
span.style.display = 'none';
container = window.frames[ containerName ];
break;

 

Change it with this:

case 'IE':
document.body.insertAdjacentHTML( "afterBegin", '<span id="SPAN' + containerName + '"></span>' );
var span = document.all( "SPAN" + containerName );
var html = '<iframe name="' + containerName + '" src="blank.php"></iframe>';
span.innerHTML = html;
span.style.display = 'none';
container = window.frames[ containerName ];
break;

 

3.-Open catalog/includes/boxes/categories_js.php and search this:

var dropdownmenu_path = "<?php echo DIR_WS_HTTP_CATALOG ?>";[code]

Replace with this:
[CODE]var dropdownmenu_path = "<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_HTTPS_CATALOG ?>";

 

*******************************

 

Mozilla advertise that we are sending information from SSL page to NON_SSL, the posible fix to this isue is change this line:

 

tep_draw_form("QForm", tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, "", "NONSSL", false), "get") .

 

With this one:

tep_draw_form("QForm", tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, "", $request_type, false), "get") .

 

I don't like the fix because the search show the results in a SSL page, I prefer the advertise.

 

Little changes to DropDownMenu 2.7 Alpha 2

 

***************************

DropDownMenu 2.7 Alpha 3

***************************

Change this:

var dropdownmenu_path = "<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_HTTPS_CATALOG ?>";

 

With this:

var dropdownmenu_path = "<?php echo (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_HTTP_CATALOG) ?>";

Edited by euskopc

Share this post


Link to post
Share on other sites

dropdown is up and working well - with exception of delay in manufacturer dropdown but i also noticed that if i go to www.domain.com it's fine, if is go to domain.com the dropdown is greyed out...

 

how can i fix?

Share this post


Link to post
Share on other sites

Another modification to this line to solve the problem reported by rubygirl:

 

Change the line:

var dropdownmenu_path = "<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_HTTPS_CATALOG ?>";

 

With this one:

var dropdownmenu_path = "<?php echo (($request_type == 'SSL') ? 'https://' . $_SERVER['HTTP_HOST'] . DIR_WS_HTTPS_CATALOG: 'http://' . $_SERVER['HTTP_HOST'] . DIR_WS_HTTP_CATALOG) ?>";

 

 

Thanks Rubygirl

Edited by euskopc

Share this post


Link to post
Share on other sites
Another modification to this line to solve the problem reported by rubygirl:

 

Change the line:

var dropdownmenu_path = "<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_HTTPS_CATALOG ?>";

 

With this one:

var dropdownmenu_path = "<?php echo (($request_type == 'SSL') ? 'https://' . $_SERVER['HTTP_HOST'] . DIR_WS_HTTPS_CATALOG: 'http://' . $_SERVER['HTTP_HOST'] . DIR_WS_HTTP_CATALOG) ?>";

Thanks Rubygirl

 

 

unfortunately now we are having the trouble again with the menu being greyed out again when i redirect to https://..... help????

 

and have a happy holiday!!!

Share this post


Link to post
Share on other sites
unfortunately now we are having the trouble again with the menu being greyed out again when i redirect to https://..... help????

 

and have a happy holiday!!!

 

 

okay so i changed categories_js.php to read:

 

var dropdownmenu_path = "<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>";

 

 

and this works great regarding the SSL or NON_SSL dropdown menu issues - either way the menu works fine - shared ssl or not. however with the above code, we loose the function of the htttp://www.domain.com vs http://domain.com again ...

any ideas?

Share this post


Link to post
Share on other sites
Is there a way to use this in the actual body of the page instead of in an infobox?  I would like to have a drop down menu like this for my sub catagories.  Any sugestions on this is greatly appreciated.

 

Jason

Share this post


Link to post
Share on other sites

Hi,

 

First, I will thanks a lot for this genious contribution. Unfortanely, the entries /catehories/subcats, manufacturers) don't appears in Apple's Safari Browser within the dropdowns. I tested al lot of Plattform / Browser combination - all works fine except Safari. Successful tests, which I made:

 

-Firefox on Win 2000 / XP -> well!

-Iexplorer 5.5 / 6 on Win 2000 / XP -> well

-Firefox on Suse Linux 9.2 -> well!

-Mozilla, 1.6 on Sun Solaris 9 -> well

-NS 7.1 on Sun Solaris 9 -> well!

-Mozilla 1.3, 1.6 on Apple OSX -> well!

-Iexplorer 5.2 on Apple OSX -> well

 

...and the bad news:

 

-Konqueror on Suse Linux 9.2 -> bad!

-Safari on Apple OSX -> bad!

 

O.K. - Ithink Konqueror is not that important for me, but the Safari is meanwhile the No.1 - Browsersuite for Apple users. I installed for testing a "naked" oscommerce-Suite, only with this contribution. So I can ensure, that no other contrib's provocated this malfunctions. Has anybody an Idea or workaround?

 

Thanks a lot for your help!

 

outdoor

Share this post


Link to post
Share on other sites

I'm trying to configure this contrib on the admin side for use with a set of dropdowns that consist of manufacturer, vehicle models and vehicle sub models.

i have the tables set up and, individually, they all work fine. I installed the files as suggested with some porting, since this is on the admin side. when the first call is made to tep_draw_pull_down_menu [tep_draw_pull_down_menu("manufacturers",""), I get this:

Fatal error: Cannot use string offset as an array in /home/wwwsite/ezone/admin/includes/functions/html_output.php on line 298

 

I know that the author had expressed interest in making this contrib for the admin side, and I'd be happy to work this out with the author, as well as provide some assistance on documentation and upgrades (I'm a data architect with lots of experience at technical documentation)...

 

I need to get this working, so I'm happy to trade the time with you to get it right.

 

Look forward to a reply.

 

Regards

 

JD

Share this post


Link to post
Share on other sites

Pardon to all the community members that would like use this contribution, or others that need modifications for their sites... but, because of changes in my job I could not support this contrib for a long period of time (probably never :( )

 

I hope that the most experienced users could make the changes and fixes that this contribution needs (mainly compatability with the browsers).

 

Sorry.

Share this post


Link to post
Share on other sites

Hi, i'm a beginner.

I don't understand instructions install.

Can you help me ?

What is class tableBox and where can i find it ?

Thank you.

 

----

/**********2**********/

*This code and the instructions are adapted from another Oscommerce contribution, for this reason many thanks for COOLMENU creators!!!

If you have installed coolmenu in your webshop go directly to step 3

 

2A) in class tableBox

After line 20 between

var $table_data_parameters = '';

and

// class constructor

add the line

var $table_string = '';

so that it looks like:

var $table_data_parameters = '';

var $table_string = '';

 

// class constructor

 

2B) in class tableBox

After around line 72 before

return $tableBox_string;

add the line

$this->table_string = $tableBox_string;

so that it looks like

if ($direct_output == true) echo $tableBox_string;

$this->table_string = $tableBox_string;

return $tableBox_string;

 

2C) in class infoBox

At around line 78 change the constructor from originally

function infoBox($contents) {

to

function infoBox($contents, $direct_output = true) {

 

2D) class infoBox

Around line 83 at the end of the constructor change from

$this->tableBox($info_box_contents, true);

}

to

$this->tableBox($info_box_contents, $direct_output);

}

 

2E) in class infoBoxHeading

At around line 103 change the constructor from originally

function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {

to

function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false, $direct_output = true) {

 

2F) in class infoBoxHeading

Around line 130 at the end of the constructor change from

$this->tableBox($info_box_contents, true);

}

to

$this->tableBox($info_box_contents, $direct_output);

}

 

 

/**********3**********/

Share this post


Link to post
Share on other sites

First of all thanx so much for this contribution :) It solve my life :D

Maybe i have not read all the posts of the thread......my question is:

 

With the predefined module we have 3 box:

- manufactures

- categories

- subcategories

 

eh....how can i add a subcategory more? Or more and more? :D

 

- manufactures

- categories

- subcategories (1)

...

- subcategories (n)

 

Thanx in advance for every answer :)

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
Sign in to follow this  

×