How to create a drop down selection menu
#61
Posted 12 September 2012 - 09:01 AM
does some1 has implemented in in version 2.33??
#62
Posted 07 November 2012 - 04:37 PM
this is still in 2.3.3 code
do i need to change this in order to make my dropdowns work?
#63 ONLINE
Posted 07 November 2012 - 07:53 PM
Regards
Jim
Banners Box 2.3.x Support
Categories Accordion Box 2.3.x Support
Categories Images Box 2.2x 2.3.x Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.x Support
Get 1 Free 2.2x Support
jQuery Banner Rotator 2.2x 2.3.x Support
Modular Front Page 2.3.x Support
Modular SEO Header Tags 2.3.x Support
MVS 2.2x Support
PDF Datasheet 2.3.x Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.x Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.x Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x Support
#64
Posted 08 November 2012 - 01:42 AM
im getting stuck on this code, i do not understand why the page URL is not being passed through the form??
tep_href_link(basename($PHP_SELF)
if i view the HTML source of this form, i can clearly see the full URL for the "action" option. But when the dropdown is selected, it just goes to the index.php page without the cpath after it. what could be preventing the cpath not to go through?
// Show Drop down menu in split_page_link :
// (You can move this part where ever you inside $display_links_string ) here it's a the very begining.
$display_links_string .= tep_draw_form('prod_per_page', tep_href_link(basename($PHP_SELF), $parameters), 'get'). tep_draw_pull_down_menu('ppp', $ppp_list, $products_per_search_page, 'class="smallText" onchange="this.form.submit()"') ;
$ignore = array('page', 'ppp');
if (is_array($HTTP_GET_VARS) && (sizeof($HTTP_GET_VARS) > 0)) {
reset($HTTP_GET_VARS);
while (list($key, $value) = each($HTTP_GET_VARS)) {
if ( (strlen($value) > 0) && ($key != tep_session_name()) && (!in_array($key, $ignore)) ) {
$display_links_string .= tep_draw_hidden_field($key, $value);
}
}
}
$display_links_string .= tep_hide_session_id() . '</form>';
}
#65 ONLINE
Posted 08 November 2012 - 01:50 AM
Regards
JIm
Banners Box 2.3.x Support
Categories Accordion Box 2.3.x Support
Categories Images Box 2.2x 2.3.x Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.x Support
Get 1 Free 2.2x Support
jQuery Banner Rotator 2.2x 2.3.x Support
Modular Front Page 2.3.x Support
Modular SEO Header Tags 2.3.x Support
MVS 2.2x Support
PDF Datasheet 2.3.x Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.x Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.x Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x Support
#66
Posted 08 November 2012 - 01:54 AM
i used this plugin here
http://addons.oscommerce.com/info/7219
the form is actually showing the cpath, but when it submits, it doesn't pass it through.
unless there is something to do with wamp settings?
so like my page is this URL: http://localhost/testsite/index.php?cPath=3&sort=0d&page=2
if i select the dropdown which allows you to select how many products to view, say i choose 20, then the form automatically submits.
and I should b getting this URL here: http://localhost/testsite/index.php?cPath=3&sort=0d&page=2&ppp=20
but at the moment i only get this: http://localhost/testsite/index.php?&ppp=20
It doesn't seem to want to submit the entire URL path.
It should work, because I got an example from someone else and they said it was working on theirs.
I can't see what could be wrong with it.
Unless the actual form isn't constructed correctly?
Edited by vampirehunter, 08 November 2012 - 01:57 AM.
#67
Posted 08 November 2012 - 02:01 PM
$parameters
It is supposed to say
tep_get_all_get_params()
Just a guess though
Edited by mattjt83, 08 November 2012 - 02:03 PM.
osCommerce Professional Services Page || Profile || osCommerce Addons || Google is your best resource for searching on the forums!
#68
Posted 08 November 2012 - 09:43 PM
mattjt83, on 08 November 2012 - 02:01 PM, said:
$parameters
It is supposed to say
tep_get_all_get_params()
Just a guess though
// display split-page-number-links
function display_links($max_page_links, $parameters = '') {
global $PHP_SELF, $prod_per_page, $request_type;
$display_links_string = '<ul>';
$class = 'class="navresults"';
if (tep_not_null($parameters) && (substr($parameters, -1) != '&')) $parameters .= '&';
/* Customer Selected listing size */
// if your MAX_DISPLAY_SEARCH_RESULTS = 10
// Drop down menu will be :
// 10
// 20
// 30
// 40
// 50
$ppp_list = array();
for ($i = 1; $i <= 5; $i += 1) {
$ppp = intval($i * MAX_DISPLAY_SEARCH_RESULTS);
$ppp_list[] = array('id' => $ppp, 'text' => $ppp);
}
// Show Drop down menu in split_page_link
// (You can move this part where ever you inside $display_links_string ) here it's a the very begining.
$display_links_string .= '<div style="float: left; display:inline;">'. tep_draw_form('prod_per_page', tep_href_link(basename($PHP_SELF), $parameters), 'get'). TEXT_PPP .':'. tep_draw_pull_down_menu('ppp', $ppp_list, $products_per_search_page, 'class="smallText" onchange="this.form.submit()"');
$ignore = array('page', 'ppp');
if (is_array($HTTP_GET_VARS) && (sizeof($HTTP_GET_VARS) > 0)) {
reset($HTTP_GET_VARS);
while (list($key, $value) = each($HTTP_GET_VARS)) {
if ( (strlen($value) > 0) && ($key != tep_session_name()) && (!in_array($key, $ignore)) ) {
$display_links_string .= tep_draw_hidden_field($key, $value);
}
}
}
$display_links_string .= tep_hide_session_id() . '</form>';
this is the code.
still can't workout why this form is not passing the full url of the current page in the form.
if i view the html source of the current page, it clearly shows the full URL in the action path, yet it isn't being passed through the form.
completely stuck on this one.
the fact that several others have used this as it is, i seriously have no clue as to why its not working.
everything seems right.
#69
Posted 06 March 2013 - 05:55 PM
#70
Posted 06 March 2013 - 07:56 PM
You can pretty much take a bit of code from somewhere else in the files and
This will give you a dropdown in the same width/style as the ones you already have
<?php ////////////////////////////////////////////////
$manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");
$content='<div style=" height:20px; width:190px; border:0px solid #cacaca; float:left; padding:3px; margin-bottom:5px; margin-right:2px;">';
$content.='<span style="font-weight:bold; text-transform:uppercase; margin-right:4px;">Your title</span>';
$content.='<select style="width:120px;">
<option>(select)</option>';
while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
$content .= '<option>'.$manufacturers['manufacturers_name'].'</option>';
}
$content.='</select></div>';
echo $content;
///////////////////////////////////////////////////
?>
#71
Posted 06 March 2013 - 07:58 PM
You can pretty much take a bit of code from somewhere else in the files and
This will give you a dropdown in the same width/style as the ones you already have
<?php ////////////////////////////////////////////////
$manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");
$content='<div style=" height:20px; width:190px; border:0px solid #cacaca; float:left; padding:3px; margin-bottom:5px; margin-right:2px;">';
$content.='<span style="font-weight:bold; text-transform:uppercase; margin-right:4px;">Your title</span>';
$content.='<select style="width:120px;">
<option>(select)</option>';
while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
$content .= '<option>'.$manufacturers['manufacturers_name'].'</option>';
}
$content.='</select></div>';
echo $content;
///////////////////////////////////////////////////
?>
the dropdown you mention can be found in the index.php file in the /catalog/ folder
#72
Posted 04 May 2013 - 02:57 PM
#73
Posted 08 May 2013 - 01:34 PM
#74
Posted Today, 01:36 PM









