I am working on a project that someone already done in joomla. I have to fix some issues in there.
They have a place order component in joomla 3.0. There are two options in main page. One is placing a regular order and other is special order. They are given as radio buttons. On each button there is onclick function written as follows
onclick='window.location.href=("<?php echo JRoute::_('index.php?option=com_order'); ?>")'
onclick='window.location.href=("<?php echo JRoute::_('index.php?option=com_order&ordertype=2'); ?>")'
The first button will form url as follows.
index.php?option=com_order&view=form&layout=edit&Itemid=516&lang=en
but for second one the url is not correct and it gives some error.
index.php?ordertype=2&option=com_order&Itemid=516&lang=en
Note that second url is missing parameters view=form&layout=edit. How can I fix this? Should I add a new menu item. If yes what type? Or just hard code the url in window.location.href directly?