vampirehunter Posted November 7, 2012 Posted November 7, 2012 I was wondering if any of you guys have installed this plugin? http://addons.oscommerce.com/info/7219 Its adding a dropdown box where you can select how many products to show on the page, ie 10,20,30 etc ive got it working to show the boxes. but as soon as you select one of the options and it does the auto submit, it simply goes back to the index.php page. it doesn't seem to pass the current page URL value along with the value of the dropdown box? only the value of the dropdown box is being submitted. if anyone has any ideas on why the current page is not being passed, please let me know. thanks 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 .= TEXT_PPP . 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>'; /* Customer Selected listing size */
vampirehunter Posted November 8, 2012 Author Posted November 8, 2012 bump up still dont know why the page URL is not being passed in the form,even though i can see the url if i view the pages HTML output the cpath is not being passed, meaning the dropdown cannot work properly. if anybody knows, feel free to share any info.
♥14steve14 Posted November 24, 2012 Posted November 24, 2012 Bumping wont help and is against forum rules. REMEMBER BACKUP, BACKUP AND BACKUP
vampirehunter Posted March 27, 2013 Author Posted March 27, 2013 i wish people would make plugins that work.
Bob Terveuren Posted March 27, 2013 Posted March 27, 2013 Hi Here's something you could try: Look at the HTML source of your product page and fine the point where this code is displayed/written $display_links_string .= TEXT_PPP . 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()"') ; He should be writing out an HTML form tag something like: <form action="product_info.php?products_id=999> If the action field has not got product_info in it then try changing the line of code to $display_links_string .= TEXT_PPP . tep_draw_form('prod_per_page', tep_href_link('product_info.php', $parameters), 'get'). tep_draw_pull_down_menu('ppp', $ppp_list, $products_per_search_page, 'class="smallText" onchange="this.form.submit()"') ; If the HTML looks OK then the chances are that there's something else tripping over and redirecting - grab Firefox and HTTPFox and follow what goes where.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.