Booking system - WP - wordpress

I need to do a reservation for 3 restaurants- in each there are 12 tables. Some of the reservations have to be paid before, the rest of them not at all.
Also, there is a need to identify if in the particular restaurant there is a reservation for different events- then the functionality of not-paid reservation must be switch off.
Ideally, if mails with reservations should be delivered to various email addresses - based on the name of the restaurant.
Everything must run on WP.
Can you please assist me with that?

For this system, I suggest you this solution.
I should say that using this answer requires average knowledge of PHP and WordPress functions.
Create a custom post type for Restaurants.
Information such as not-paid reservation, paid reservation, and events can be saved as meta values.
To save meta values for your custom post type, you can use the "advanced custom fields" plugin or just code them using add_meta_box().
For the reservations, you should make a form and in the form, users can select their reservation table, date, and time.
if the reservation requires payment, you should check the gateway documentation and use their script.
here you need to create a table in the database for payments.
after the form submits and before payment, add your user info to the database and give the payment status "pending" value.
after the successful or unsuccessful payment, the gateway will return the payment status and with that, you can save the reservation status.
For sending an email to the restaurant manager, after the successful payment, use wp_mail().
I tried to explain the whole project to you in 12 lines so, after reading this answer you may get confused.
If you have more questions, just ask.

Related

Add user on UrBackup server after order on Woocommerce site

I have wordpress site with woocommerce shop and I’m selling among others UrBackup client accounts on my server.
Do you have any idea how to automatically add UrBackup user after order in woocommerce?
Or maybe easier will be create shop based on different engine?
Any advice, tips? :)
After poking around a bit, it looks like UrBackup has an API you can use, that most likely has a 'create account' endpoint. I didn't see it immediately in their not-so-great documentation, but you'd think it'd HAVE to be there somewhere! There's also a PHP API kit you could integrate into your WordPress site here:
https://bitbucket.org/opensaucesystemsdevelopment/urbackup-api.git
So, you could load in this class, and after a WooCommerce order is placed, call the API endpoint to create a user. To do this with WooCommerce, you'd need to create a function on the "woocommerce_order_status_completed" hook.
http://hookr.io/actions/woocommerce_order_status_completed/
This would let you run any custom code you'd like after an order's payment has completed. Thus, you could check an order for if it contains the UrBackup product, and if so call the UrBackup API to create an account based on the current user's data.
Should work!

Shopify checkout process

Shopify used to allow you to style the checkout process through a CSS file. However, they have now removed this option.
I've developed a Shopify App for a customer that requires that ALL customers digitally sign a form before payment. The form asks specific questions, and must be presented in a specific way, with a specific font. In their country it is illegal to sell online without sending your customers through this process. Everything is sent over TLS etc.
On the form, a customer is asked their name, delivery address, billing address, etc. The products are listed and followed by a ton of legal text.
The difficulty is, as soon as the customer goes to checkout - they are then able to change their delivery and billing address, thus rendering the form null and void.
My initial thought was to simply hide the customer billing and delivery information from the checkout using CSS. However, I'm unable to do this because Shopify no longer grant access to the style sheet.
Does anyone know of a way around this?

PayPal Failure notification

I have an asp.net application
The User can purchase items and/or upgrade an existing service. I use PayPal to handle payments.
When the order is placed I put the order details into a table as a record. I also do this so that if the User revisits my page I check a flag in that table to tell them whether payment has been received.
If not received then I display a message on my web page telling them they have requested and upgrade and that we are currently waiting for payment.
I also disable any future purchases for that User so that they do not upgrade twice (or more).
Now, it occurs to me that when the User is redirected to PayPal to make that purchase that a payment could fail or they could close the web page.
In that case then the User would not be able to ever upgrade unless they send me a support email.
What is best practice? Wait for a time period to elapse and if no payment then allow User to try again or stick with the support email route?
If it is best to wait for a period of time what is an acceptable period of time to wait for?
I am using the post back of Form values method to imitate payment to PayPal:
https://www.paypal.com/cgi-bin/webscr
What you can do.
Each time the user is ready to leave your page and move to paypal to pay, you create
Clone of their order
A new unique ID connected with that cloned order.
So, if one order if fail, at any time the user come back is find a new set "Order"+"Unique ID". With that 2 elements can make a final payment.
You may end up with two or tree or more cloned orders, but from my experience because this is what I really do, is rare, and its safe for your customer and you.
Also please note that paypal is accept only one unique id for each order. If one ID is fail, then you must create a new one anyway.
The unique id you send to paypal go to the invoice parametre.
The manual for all parametres is this pdf - PayPal Payments Standard Intergration Guide... and there are more pdf for paypal...

Tridion profiling/tracking

We're looking at a requirement to track a users journey through a Tridion-managed website, then be able identify this user as a "prospect" based on this behaviour and then trigger an email to this user if they dont return after X number of days.
Can SmartTarget "track" a user journey between pages out-the-box or would it require some sort of custom Ambient Data Framework cartridge?
The older P&P module did this kind of tracking but I don't recall there being away to use that data in an Outbound Email triggered mail - so send an email when a tracking count for user got above a certain figure?
Cheers
SmartTarget nor P&P is not going to help you here.
Because your requirement is sending an email you need you user to be an audience manager user,
you could do the tracking in ADF and then have that update an extended detail for the user when the threshold is reached,
Create a Dynamic Distribution list on the ext. detail en create a triggered mailing on that list
To do this "out of the box" is a long standing wish of mine, might be possible in the future :)

Online Payments Using Paypal NVP Api

I am developing a website with online payment.
Payment is done using Paypal NVP Api.
There is need of a facility to store customers credit card details(not in database) once they register to Website.There onwards whenever they order these details will be fetched, Customer need not enter their card details for every order.
So is there any facility to create a profile n store credit card details of customer, as it is there for recurring payments?
This is not the idea of paypal, you are not allowed to store the customer credit cart and use them later by your self - if you do that, paypal see its and block your account in no time.
The paypal offer recurring payments, so you only need to initialize correct the paypal options and you have your solution.
Or get permission from visa, or master-cart to have the ability to keep local the credit cart informations. I must say that is very dangerous and if your system is not well protected you put your clients and your business in a big risk to lose the credit cart data and have real problems.
to store customers credit card details(not in database)
Where to you wish to store it ? in the paper :)?
Customer need not enter their card details for every order.
This is something that paypal take care of. You do not have to do something about.
You may want to check Recurly.com
they are providing support for Paypal and other gateways too. Plus great API documentation.
using it and definitely recommend it. 10 out of 10

Resources