0


I'm developing a website for a courier service, that has service quotation filling at the front end.
I did all form things working, a quotation will output variable with the cost of service in PHP.

After filling the form there will be checkout button, with that checkout button i need to save the details of the user, and that price to the woo commerce page to check-out/or fill further details.

I searched throughout the google and got 1 solution to create a product with these values in front end. But its became very difficult to figuring out signing in, saving values, keep details in specific formate etc... for me as a beginner in PHP.
Can anyone help me with this?.

i just need woo commerce to make checkout with user entered details in the form....
.

EDIT & Updated :
Thanks for reply LoicTheAztec, I have gone through quick toure now

About code : I'm sending the values calculated in form to the page called buy-now using URL using javascript window.location.href=.
like http://example.com/buy-now?price=120&weight=80&location=000001
And also I'm able to fetch the value using
if (isset($wp_query->query_vars['pricef']))
in page template. (with StackOverflow help) and I'm checking user is logged in? using
if(!is_user_logged_in())
and showing login form, After login also i can get the variables.

Now I need to create a transaction using this. Saving data like a product or post and proceed for payment, I don't need to use woocommerce to do this but need some sort of idea to make it work.
Thank you.

ltsharma
  • 73
  • 8
  • Updated description with details and progress as well... – ltsharma Jul 23 '16 at 17:02
  • Using GET method at this point (with price, weight, location) is not secure and a bad idea as anyone can change this values in url. You are using Woocommerce plugin, but finally you are not using WooCommerce processes: 1) custom form out of woocommerce. 2) custom checkout out of WooCommerce orders process 3) payment without WooCommerce… May be the best thing for you Is not using WooCommerce at all and in this case, this has nothing to do with a WooCommerce tagged question… Sorry but I only answer real WooCommerce questions. – LoicTheAztec Jul 23 '16 at 18:50
  • Thanks so that, I have changed my way of using plugins, I'm not using woo-commerce now. But you have said GET is not a good method, Then which can I use to send the variables from one page to another, I dint find any other method in WordPress. Please let me know this... – ltsharma Jul 27 '16 at 07:14
  • And what about session or post methods… combined with cookies or local storage. If not using woocommerce, don't tag your question woocommerce and hook-woocommerce please. – LoicTheAztec Jul 27 '16 at 08:57
  • I tried POST, Im using POST to get value from the form it worked in first function. But i cant able to access same POST values in next function called by the last function (next page as well). Now trying $_SESSION by using session manager plugin, http://stackoverflow.com/questions/6249707/check-if-php-session-has-already-started , Here is my question/problem with $_SESSION also :) . – ltsharma Jul 27 '16 at 09:51

0 Answers0