I am trying to make a pay now button for a registration form online. Each individual has two options for payment. If they are a member, they can pick and pay the member's rate for registering for this event. If they are not members, they will pick the public's rate option for it. That's fine. It works great and it will ask them to either pay the member rate or public rate.
My question is, I would like to add another drop down button which would allow them to change the quantity of tickets they buy to this event. So if they want to but 6 tickets, they select 6. And if they are not members, in the next drop down box, they select Public.
I can add the second drop down menu, but it doesn't affect pricing at all, doesn't change the quantity.
Any help?
If the price of each quantity is arbitrary, this can only be done with custom javascript.
Do your prices and quantities scale linearly? I.e. 1 for $10, 2 for $20, 3 for $30, 4 for $40 -- if so, you can use Add to Cart / Shopping Cart Buttons to handle the quantities.
Another potential hack is to multiply your current dropdown's number of entries with the number of your second menu.
General Public 1 ticket - $15
General PUblic 2 tickets - $25
Members Only 1 ticket - $10
Members Only 2 tickets - $20
Another way is to use 2 separate buttons, one listing the member rates and one listing the public rates. This might actually be the good-enough path of least resistance.
Related
i'm using Stripe Add-On over Gravity Forms to perform payments. A user can even use to pay one shot the whole amount or make it split down to 4 payments.
Let's say the form total amount is 1 000 $. We give the opportunity to the user to go on 4 payments of 250 $ instead. The whole thing is in place, we used Gravity Forms little code to stop Stripe subscription after 4 payment process. (https://docs.gravityforms.com/cancel-stripe-subscription-payments/).
I was able to put down a number type field to calculate the total amount (1000) divided by 4 (250)... but the Stripe feed only accept product field or Total Field as payment amount. And if I use product field to do the calculation, it simply add the calculated amount (250 $) to the form total (1000 $), so whe're now up to 1250 $.
Any Idea to tweak a little something by code or workaround using fields only ?
This is the last step to the whole project, ... ouff !Thank you.
Just got it.
Two ways :
1- By code using gform_submission_data_pre_process_payment.
- You could change the payment amount. https://docs.gravityforms.com/gform_submission_data_pre_process_payment/.
- Than work with number field (calculation) to show the amount to the end user.
2- Using Product field as Calculation (with CSS Trick).
- Do your math thing like : {Total} / 4
- Do NOT disable Qty option (otherwise it gonna add the amount to your total since he thinks Qty = 1).
- On the front end, you need to hide the qty since you don't want the end-user to change it (now the system thinks the qty = 0 and that's the trick) :
css trick (all forms within your site will be affected.You could go deeper within CSS to specify field with ID or even form_id=>field_id)
.ginput_quantity, .ginput_quantity_label {
display:none;
}
Stripe Feed - Subscription typeFront-end user form
I have a GF with 3 products at a set price. However, if the user purchases more than one, there's a $50 discount on each additional item.
EX: Product 1 = $500
User buys 2 items, $500 + $450 (total = $950). Is there a way to do this with native (or plugin) conditional logic?
The only way I know how to do this natively is to create an extra Product field that adds as a "base" fee. In your case, that fee would be $50. Then your product price would be $450 all the time. Use conditional logic to "show" the base fee when only 1 item is ordered and to "hide" the base fee when more than 1 item is ordered.
I'm making a form that is for a summer camp registration form where users will be registering. By the end of the form there is an option of paying in full or making a $50 deposit for each camp selected. I'm using hidden products to handle the total amount per week and adding their value into the total. My question comes if I can use formulas to count the number of checkboxes that have been selected and do the calculations.
Example:
Week 1:
Soccer camp
Week 2:
Computer camp
Total: $100 (Deposit)
I actually have a snippet for this:
https://gist.github.com/spivurno/077fd21a993e9b573d46
Updated: https://gist.github.com/spivurno/a14ef4a18f57d0c67811e1b4d8791781
The parameters are:
form_id the ID of the form for which you would like to count the checkboxes
count_field_id the ID of the field into which you would like to populate the checkbox count (you can then use this field's merge tag in a Calculation formula)
checkbox_field_ids an array of Checkbox field IDs whose checkboxes should count towards the checkbox count (when checked)
I currently have 6 items in cart, which cost £456. I'm trying to implement a custom payment system, so the customer can pay some now and some later. So i want the cost to be £400.
The only function i've found is set_total in WC_Abstract_Order but to use WC_Abstract Order you need the order id and the order hasn't been placed yet for an id to be generated.
Any idea how to solve?
Question has been asked with no answers over a month ago:
Shopping Cart reserve product
I have a shopping cart for my site in ASP.NET using SQL Server. When a user adds an item to the shopping cart I need to set a value in the product table to reserve the item (in order to avoid more people reserving the item, or buying it). Now, if the current user decides to abandon their cart by closing the browser, then how am I to restore the product record to being 'unreserved'?
Is there another way of reserving the item globally?
When a user "reserves" an item give the reservation an end date/time (e.g. DateTime.Now + 6 hrs, or whatever), by which they must have purchased the reserved item, otherwise after that date/time the reservation becomes void - I believe this is how the vast majority of bricks-and-mortar shops would work as well.
If you're worried about having a tbReservations table with loads of deprecated rows you can setup a SQL job to clear the table of old/invalid reservations each night or whenever is suitable for the business case.
Read the post by Benson Yu in this thread. In the Session_End method you can "unreserve" the products that were not checked out.