Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

X-Cart Order Status without logging in

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 04-24-2015, 07:46 AM
  mcanitano's Avatar 
mcanitano mcanitano is offline
 

eXpert
  
Join Date: Feb 2006
Location: Melbourne, FL
Posts: 216
 

Default X-Cart Order Status without logging in

We are wondering how to implement a way for customers to check their current order status without logging in. I know some customers either forget their passwords and don't reset it so they can login, and others aren't registered so they have no way of checking it if they delete their email we send them when it is updated.

Would any security issues arrive if we allowed customers to search through the order database by Order ID AND email (only showing results if the order ID corresponds to the input email address).

If not, where should we start? We're not really sure of the best method to do this.

We were thinking:

1. Create a PHP file that searches the entire order database using the two inputs from customer on our site (orderID & email)
2. find a match
3. return the results (limited results).
We wouldn't return valuable or secure information (we don't store CC data) such as any customer information, or anything that we might see as a security issue.
__________________
Marcello Canitano
New Site: X-Cart v4.5.5 GOLD
X-Cart Mobile v1.4.3
X-Payments v1.0.6
CDSEO Pro v2
Total Server Solutions xCDN

www.silverhorseracing.com
Reply With Quote
  #2  
Old 04-24-2015, 07:57 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: X-Cart Order Status without logging in

I have done this as a module to few clients. Check order status based on ordered and email. There are no security issues with this approach.
Just create a page with form to supply ordered and email, you can add date if you want to but you will have make sure there is only one way of customer to have the date entered or if any format is allowed your script has to be flexible at converting it to unix timestamp.
Make sure your script runs as part of XC - that way XC security will check for any issues with entries and strip out if anything.
Then check orders table for matching ordered and email (and date if needed). You should get only one or 0 results. Done.
And of course output only order status info - there is no need of what was ordered, price, etc.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
mcanitano (04-24-2015)
  #3  
Old 04-24-2015, 08:00 AM
  mcanitano's Avatar 
mcanitano mcanitano is offline
 

eXpert
  
Join Date: Feb 2006
Location: Melbourne, FL
Posts: 216
 

Default Re: X-Cart Order Status without logging in

Thanks Steve, that's the approach we were going to do. Just weren't sure if any security issues would appear.

Will be working on this next week
__________________
Marcello Canitano
New Site: X-Cart v4.5.5 GOLD
X-Cart Mobile v1.4.3
X-Payments v1.0.6
CDSEO Pro v2
Total Server Solutions xCDN

www.silverhorseracing.com
Reply With Quote
  #4  
Old 04-24-2015, 12:45 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: X-Cart Order Status without logging in

I can't see a security concern. Whenever you make a form anywhere on the web, always remember to sanitize your inputs.

As Steve said I would limit the results. I think you can use func_query_first_cell() to ensure only one result is returned, and it should pop out a simple variable rather than an array.

I wouldn't return anything besides the status and the original order id that was submitted. I'm sure you could figure out how to link that order id to the order itself, but they would need to login to view it.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #5  
Old 04-24-2015, 12:59 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: X-Cart Order Status without logging in

Quote:
Originally Posted by totaltec
I can't see a security concern. Whenever you make a form anywhere on the web, always remember to sanitize your inputs.

That's where the

"Make sure your script runs as part of XC - that way XC security will check for any issues with entries and strip out if anything."

comes to play. I think XC is as secure as possible so just let it do its work
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following 2 users thank cflsystems for this useful post:
mcanitano (04-28-2015), totaltec (04-24-2015)
  #6  
Old 04-28-2015, 06:25 AM
  mcanitano's Avatar 
mcanitano mcanitano is offline
 

eXpert
  
Join Date: Feb 2006
Location: Melbourne, FL
Posts: 216
 

Default Re: X-Cart Order Status without logging in

UPDATE:

Went ahead and did this, check it out let me know what you think!

https://www.silverhorseracing.com/order_status.php

Returns: Order ID, email submitted, tracking number (if available), and order status.
__________________
Marcello Canitano
New Site: X-Cart v4.5.5 GOLD
X-Cart Mobile v1.4.3
X-Payments v1.0.6
CDSEO Pro v2
Total Server Solutions xCDN

www.silverhorseracing.com
Reply With Quote

The following user thanks mcanitano for this useful post:
totaltec (04-29-2015)
  #7  
Old 05-07-2015, 12:23 PM
 
thebluedoorboutique thebluedoorboutique is offline
 

Senior Member
  
Join Date: May 2011
Posts: 168
 

Default Re: X-Cart Order Status without logging in

Quote:
Originally Posted by mcanitano
UPDATE:

Went ahead and did this, check it out let me know what you think!

https://www.silverhorseracing.com/order_status.php

Returns: Order ID, email submitted, tracking number (if available), and order status.

Looks good - have a test order ID and e-mail address we can use?
__________________
X-Cart Classic 4.4.X
Reply With Quote
  #8  
Old 05-08-2015, 05:10 AM
  mcanitano's Avatar 
mcanitano mcanitano is offline
 

eXpert
  
Join Date: Feb 2006
Location: Melbourne, FL
Posts: 216
 

Default Re: X-Cart Order Status without logging in

Quote:
Originally Posted by thebluedoorboutique
Looks good - have a test order ID and e-mail address we can use?

Thanks!

Ah whoops, forgot to include that! You can test with ...

Order ID: 34432
Email: test@silverhorseracing.com

Change the order number or email to view how it looks if incorrectly entered!
__________________
Marcello Canitano
New Site: X-Cart v4.5.5 GOLD
X-Cart Mobile v1.4.3
X-Payments v1.0.6
CDSEO Pro v2
Total Server Solutions xCDN

www.silverhorseracing.com
Reply With Quote
  #9  
Old 06-15-2015, 12:42 PM
 
thebluedoorboutique thebluedoorboutique is offline
 

Senior Member
  
Join Date: May 2011
Posts: 168
 

Default Re: X-Cart Order Status without logging in

Quote:
Originally Posted by cflsystems
I have done this as a module to few clients. Check order status based on ordered and email. There are no security issues with this approach.
Just create a page with form to supply ordered and email, you can add date if you want to but you will have make sure there is only one way of customer to have the date entered or if any format is allowed your script has to be flexible at converting it to unix timestamp.
Make sure your script runs as part of XC - that way XC security will check for any issues with entries and strip out if anything.
Then check orders table for matching ordered and email (and date if needed). You should get only one or 0 results. Done.
And of course output only order status info - there is no need of what was ordered, price, etc.

Steve, I'd be interested in seeing your implementation.
__________________
X-Cart Classic 4.4.X
Reply With Quote
  #10  
Old 06-15-2015, 01:03 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: X-Cart Order Status without logging in

Quote:
Originally Posted by thebluedoorboutique
Steve, I'd be interested in seeing your implementation.
I posted in the ticket for the ongoing project...
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:45 PM.

   

 
X-Cart forums © 2001-2020