Forums

change url through inputed ids

skhn123 13 Mar, 2014
Hello BOB!!

i Know the given subject does not clarify my need. but here is details of what i want to do.

i want a simple form which will will have twn inputs 1: order ID and 2: order password,
and i have this url : http://www.mysite.com/index.php?option=com_virtuemart&view=orders&layout=details&order_number=694707&order_pass=p_04081
where order no. is order ID and order password is order password. so all i want with my form is to when someone fill it and submit, it will redirect him to that url but change the Order ID and Password with submitted data. so that he/she can see his order status directly without login.

can it be possible to do that. please help me.
Thanks. (sorry for bad english.)
GreyHead 13 Mar, 2014
Hi skhn123,

I would create a form with two inputs called order_number and order_pass and then use a Custom Code action and the Redirect URL and Redirect User actions in the form On Submit event.

In the Custom Code action put:
<?php
$form->data['option'] = 'com_virtuemart';
$form->data['view'] = 'orders';
$form->data['layout'] = 'details';
?>

In the Redirect URL action put http://www.mysite.com/index.php in the Target URL and in the fields/params box:
option=option
view=view
layout=layout
order_number=order_number
order_pass=order_pass

Bob
skhn123 13 Mar, 2014
Hey Bob thanks for such quick reply.
i did what you said but its not getting the parameter niether from custom code nor from param.

this is link it currently generating.
www.mysite.com/index.php?option=option&view=view&layout=layout&order_number=order_number&order_pass=order_pass
skhn123 13 Mar, 2014
and one more thing what to do with redirect user action.
GreyHead 13 Mar, 2014
Hi skhn123,

Sorry that's probably my mistake. Please try removing the Custom Code action and add this to the ReDirect URL action
option=option
view=view
layout=layout
order_number={order_number}
order_pass={order_pass}


Bob
skhn123 19 Mar, 2014
Answer
Hey Bob sorry for this late reply.
thanks your solution simply worked i removed the custom code and simply put this code in redirect url params.
option=com_virtuemart
view=orders
layout=details
order_number={order_number}
order_pass={order_pass}
This topic is locked and no more replies can be posted.