X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Simple Order Status input box (https://forum.x-cart.com/showthread.php?t=37760)

jasonroy 02-21-2008 01:00 PM

Simple Order Status input box
 
I want to make a very simple order status box on my main page.

Basically I want to have one little input box where anyone can put in their order number and click submit. In this I want the submit button to open a url like this:

http://www.rjroffroad.com/order.php?status&orderid=#####

And I want it to use the data input into the box to complete the link.

I haven't the first clue how to do that. Any simple html methods to do that?

balinor 02-21-2008 01:01 PM

Re: Simple Order Status input box
 
The problem with this is, what's stopping people from putting others order numbers in? Major security risk here IMHO and I don't recommend it.

jasonroy 02-21-2008 01:16 PM

Re: Simple Order Status input box
 
Quote:

Originally Posted by balinor
The problem with this is, what's stopping people from putting others order numbers in? Major security risk here IMHO and I don't recommend it.


First thing it does it take you to a login screen. If you don't have their login and password, you can't view it.

I thought that too, but created an order with a login I use alot, and then logged in with a test account, and it gives me an access denied screen. So you can't have just the order #, you have to have the login too.

Holub 02-22-2008 04:34 AM

Re: Simple Order Status input box
 
Insert this into any tpl you want.

Code:

{if $login}
<form method="GET" action="order.php?">
<input type="text" name="orderid">
<input type="submit" value="View my order">
</form>
{/if}


or create new /skin1/order.tpl with code

Code:

{if $login}
{capture name=menu}
<form method="GET" action="order.php?">
<input type="text" name="orderid">
<input type="submit" value="View my order">
</form>
{/capture}
{ include file="menu.tpl" dingbats="dingbats_help.gif" menu_title=$lng.lbl_help menu_content=$smarty.capture.menu link_href="help.php"}
{/if}


and insert into home.tpl (or another) to left column this include

Code:

{include file="order.tpl"}

Comfortable thing! Enjoy!


All times are GMT -8. The time now is 03:29 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.