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

How to access admin area php functions from customer side

 
Closed Thread
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 03-28-2017, 08:02 AM
 
Joe Thompson Joe Thompson is offline
 

Newbie
  
Join Date: Oct 2016
Posts: 7
 

Default How to access admin area php functions from customer side

We have a moderately customized store that utilizes a unique ordering function. All of the set-up that takes place prior to allowing customers access to their "area" to order is done on the admin side by someone with an administrator account. One piece of this process is inputting a name and email address, which is then fed through a few different functions that add this information to other options/settings that gets the system ready to take orders.

So right now, someone with an administrator's login is responsible for inputting all this information. What I'd like to have happen is allow our customers to be able to provide their name and email address themselves in a form (from within our site, so they'd be logged in under a customer account) - and then their information is then passed to the admin side where all the necessary functions are that will manipulate and do what they need to.

I have a form on the cart.tpl page that collects the name and email address, and then actions are taken in cart.php on the data. I'm running into issues when trying to require the admin files that are necessary to process the data that is being submitted.

I'd like to find a clean (and safe) way to send the information to the right files for processing, but I think I'm running into user account issues. I don't want to permit customers to login as an administrator in order to have access to the files in the admin area.

Any idea on how to get input from the customers passed into a few functions that are housed on the admin side, and then eventually saved into the db?
__________________
4.7.3
  #2  
Old 03-31-2017, 03:54 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: How to access admin area php functions from customer side

I think you should provide more information as at the moment it is unclear what files you want to use.
Perhaps, an easier way will be creating a new script in the storefront "area" and copy-pasting some code from the "admin" script(s).
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
  #3  
Old 05-03-2017, 08:51 AM
 
Joe Thompson Joe Thompson is offline
 

Newbie
  
Join Date: Oct 2016
Posts: 7
 

Default Re: How to access admin area php functions from customer side

Moving some of the scripts to the storefront area was a good suggestion - I did so and am now able to complete the solution. Thank you for the suggestion!
__________________
4.7.3

The following user thanks Joe Thompson for this useful post:
qualiteam (05-03-2017)
Closed Thread
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 11:07 AM.

   

 
X-Cart forums © 2001-2020