Create Two different Checkout form woocommerce - wordpress

I want to create two diff, checkout form
For Users
Advertiser
Both checkout form contain diff. option. but I can't figure out how to make a separate checkout form for both.
I need solution please if any one have. (Also you can suggest that direct payment to getway skipping checkout it self for specific product)

Related

WooCommerce Multi-Step Checkout (Billing/Shipping Address and Payment Methods on different pages)

I'm currently working on a multi STRIPE checkout for different STRIPE accounts based on the shipping country.
So far everything works smoothly by using the wc_stripe_params, wc_stripe_payment_request_params and woocommerce_stripe_request_headers filters and overloading the respective classes for the webhooks. There is one problem though.
Upon checkout page load, where the payment methods are, STRIPE renders CDATA values for their JS files.
When the initial shipping country guess through geoip database was correct and the customer doesnt change the shipping country, everything works fine, since the correct public keys were inserted into the JS of STRIPE. When the customer changes the shipping country there is no way to manipulate the already processed JS variables. This is why I want to split up the checkout process so that the last page is just for payment options based upon the before selected shipping country.
I know that there are multiple plugins for multi-step checkout available, but all use ajax for a smooth rendering, which results in the same error. I understand the way how to customize different processes in WP or WC, but I don't know how to really tackle this one since the formon the checkout page is posted to the wc_get_checkout_url() which needs payments selected and done - it doesnt look like there is a real multi step without ajax planned?
Thanks in advance for any help or thoughts
Problem solved by splitting up the checkout process into multiple forms and posting the data as one to the woocommerce checkout controller

How to use Gravity Form to validate customer's information from .csv

I am trying to use Gravity Forms to make a payment page in WordPress. The first three fields are customers name, order number and postcode and the last one is eway payment. I want to check the customer's name, order number and postcode through an Excel form before make payment. If the validation is successful, the last section will be active. Are there any add_ons or do I need to change the code? I actually have the code but I do not know where to put it. Thanks.
Gravity Forms does have a couple of hooks you can use in your theme functions file or a custom functionality plugin to perform your own validation.
The gform_field_validation filter can be used to perform custom validation of a specific field.
The gform_validation filter can be used to validate the entire form.

How to force addition of Product B in order to add product A in Drupal 7?

I am looking for an easy way to associate two products with each other on checkout while at the same time forcing the user to create the association if it doesn't exist yet. Basically, a user can by hosting, but in order to complete the checkout, they also need a domain name. I have classes for each, but I am trying to think of ways to solve two problems:
On checkout, display that two products are associated
Force the user to create the association
Any ideas on what I can use to do that?
UPDATE
What I did was:
Created two separate products
If you add the one, it does a check to see if this item has been linked to another product
If not, it takes you to a custom page forcing you to add and assign the other product
This works, but it's not very elegant. Any better suggestions would be much appreciated.
Use Rules to display messages to the user. Use the event on "add to cart", check the type of product, then check to see if the associated product is added to the cart, if not show message saying you also need to add a hosting package and auto redirect them there. Then upon checkout, check to see if one of those products exist, does the other exist in the cart? Throw same message and auto redirect them to the missing one.
You may need to use components with your rules to get the full effect. But that is what I would do.

WooCommerce: Override product info before adding to cart

I've found the following example (WooCommerce: Add product to cart with price override?) which lets the user add a product to the cart. However, it hard codes the prices directly on the cart itself.
Is there a way to make adjustments to a product instance i.e. costs, append additional user input, etc. and then add the product to the cart?
Thank you very much for everyones help.
Edit:
Having another crack at explaining, as doublesharp has pointed out it's not quite clear.
Joe clicks on a product, he then chooses various options on the product form which then calculates a custom cost after the 'add to cart' button is clicked but before it is added to the cart.
These options need to be completely custom as the calculations involved are outside of scope of a woocommerce 'variable product'. What I'm trying to achieve is the customer being able to add multiple instances of the same product with various costs and info associated with it.
With regards to the first part of your question where you want to add multiple instances of a product with various costs, you can have a look at the following plugins to achieve that objective
Dynamic Pricing
Pricing Deals for WooCommerce
As for the second part of your question where you want to append additional user input to the cart. This can be done using the following steps
Create a custom session and add the custom data to this session.
Add the data from the custom session to the WooCommerce session.
Extract custom data from WooCommerce session and insert it into cart
object.
Display custom data in Cart and Checkout page.
Add custom data as metadata to the order items.
Remove the associated custom data if an item is removed from the
cart.
For a more detailed on the above steps you have a look at the following link,
How to Add Custom Data to WooCommerce Order

WooCommerce: Add meta on checkout (for the product)

I have a question regarding WooCommerce.
In the last step of the checkout, I want to add some meta information to the product. Basically, at the end of the checkout process the user can choose to offer the product to a friend. He will enter fields such as friend's email, name...
I want to be able to retrieve this information in the admin panel when I click on the details of the order, in the "product" block.
... And I have to idea how to do that. I found some information on how to add custom fields to the order, but how do I add information to the product in the order and not the order itself?
Thank you. I'm in a bit of a blur right now.
Mike Jolley posted the complete code you can insert in your theme's functions.php
I recently used it and works like a charm.
https://gist.github.com/mikejolley/1604009
I think the Woothemes Product Add-ons plugin may be exactly what you are looking for. You can use it to add custom fields of nearly any type to your individual products. It will display them on the cart page and save them in your admin.
Woocommerce allow some hooks and filters to add fields on checkout pag, but yes it requires strong php knowleget. However there is plugin available here: Checkout option manager plugin

Resources