Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Any php guru?


jhdesign

Recommended Posts

Posted

I'm using the category dropdown list contribution.

 

I'm trying to add "&langauge=XX" to the generated URL.

 

Links are created here:

 

$info_box_contents[] = array('form' => '<form action="' . tep_href_link(FILENAME_DEFAULT) . '" method="get">' . tep_hide_session_id(),

'align' => 'left',

'text' => tep_draw_pull_down_menu('cPath', tep_get_paths(array(array('id' => '', 'text' => PULL_DOWN_DEFAULT))), $cPath,'onchange="this.form.submit();"')

);

 

I tried adding the code in various parts but it doesnt work. closest I got was to put it in the 'text' line in 'cPath' but the & and ? come up as % codes and not actual letters.

 

Been at this for 2 days now any help is appreciated!

 

Jacob

Posted

try this:

 

$info_box_contents[] = array('form' => '<form action="' . tep_href_link(FILENAME_DEFAULT . '?language=' . $language) . '" method="get">' . tep_hide_session_id(),
'align' => 'left',
'text' => tep_draw_pull_down_menu('cPath', tep_get_paths(array(array('id' => '', 'text' => PULL_DOWN_DEFAULT))), $cPath,'onchange="this.form.submit();"')
);

 

let me know what you get!

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted

$info_box_contents[] = array('form' => '<form action="' . tep_href_link(FILENAME_DEFAULT . '?language=' . $language) . '" method="get">' . tep_hide_session_id(),
'align' => 'left',
'text' => tep_draw_pull_down_menu('cPath', tep_get_paths(array(array('id' => '', 'text' => PULL_DOWN_DEFAULT))), $cPath,'onchange="this.form.submit();"')
);

 

Almost but try this

 

$info_box_contents[] = array('form' => '<form action="' . tep_href_link(FILENAME_DEFAULT, 'language=' . $language) . '" method="get">' . tep_hide_session_id(),
'align' => 'left',
'text' => tep_draw_pull_down_menu('cPath', tep_get_paths(array(array('id' => '', 'text' => PULL_DOWN_DEFAULT))), $cPath,'onchange="this.form.submit();"')
);

 

The ? and params get put on by tep_href_link() so you cant append in the function.

Posted

Hmmm

 

I guess thats why tep_hide_session_id() is in there. So try putting it as a hidden field.

 

$info_box_contents[] = array('form' => '<form action="' . tep_href_link(FILENAME_DEFAULT) . '" method="get">' . tep_hide_session_id() . tep_draw_hidden_field('language', $language),

'align' => 'left',

'text' => tep_draw_pull_down_menu('cPath', tep_get_paths(array(array('id' => '', 'text' => PULL_DOWN_DEFAULT))), $cPath,'onchange="this.form.submit();"')

);

Posted
That worked! Thank you.

 

Can you tell me how you figured it out? or how it works?

 

 

Nope I really cant.

 

Can you tell me why you need to do that because the language is set to the default and stored in the session and the only time a language=xxx is needed is when you want to change it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...