View Single Post
Old 03-28-2017, 08:02 AM
Joe Thompson Joe Thompson is offline

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?