Skip Navigation

[Resolved] How to do a quote hotel project ?

This support ticket is created 7 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 3 replies, has 2 voices.

Last updated by Nigel 7 years, 11 months ago.

Assisted by: Nigel.

Author
Posts
#396003
quote.jpg

Hello,

Do you have an idea if we can do this challenging project with Toolset plugin ?

Be able to generate a quote based on prices in the attached document
I simplify the prices to see how you can do it ?

Thank you in advance

#396366

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

I could give you a long answer about how you might go about creating such a booking quote generator using Toolset, about the different post types to create and how to link them, about the custom code you will require for your CRED forms that create a quote to update the cost accordingly, and so on.

But the short answer is that Toolset is not a bookings or events manager, and that there are purpose-built solutions that will serve you better and save you considerable time, and you might be advised to consider using one of those instead.

Without meaning to endorse any particular product, in your case you might consider a specialised hotel reservations style plugin along the lines of hidden link

#396409

Hello,
Thank you for your reply
Just for your information, i don"t need any booking system, i need a cost estimator system.
Thank you

#396723

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Sorry if I misunderstood your requirements.

Toolset can be of some help for this, but any solution is going to require a fair amount of custom code (JavaScript and some PHP) to achieve what you want. CRED forms don't have any in-built data processing.

You will need to decide whether the CRED forms are sufficiently useful for your particular case to merit building your workflow on them, or whether to go with a fully custom solution.

That will partly depend on what you want to do with the quotes. If you want to store the quotes then you might create a custom post type for the quotes and use a CRED form to generate and post each quote. The quotes may or may not be attached to a user account, or you may just store contact data about the customer directly in the quote.

Your form will have fields to select the room type, to enter dates, possibly to enter the number of adults, teens, and children, as well as the customer info.

When the form is complete you can either have the user submit it, do the quote calculation on the backend in PHP and then return the result, or perform the calculation on the front end in JavaScript before submission.

How are you going to store the pricing information that is used to calculate the quote based upon the data entered in the form? For JavaScript to be able to calculate the quote it needs access to that pricing information. You could store it hard-coded in a JS object that ships with your form, but that is not easily maintained or edited.

You could design your pricing data in such a way that it is stored as meta data using custom fields for a custom post type for your rooms, which you could manage in the WordPress back-end, or create additional CRED forms for maintaining the pricing data.

If you calculate the quote in the back end then you can use the CRED API hook cred_before_save_data. If you want to calculate the quote in the front end then you would probably be to trigger an AJAX call to a PHP function that returns a JSON object with the pricing information to your form to perform the calculation.

As you can see, any solution is quite involved, but I hope the above gives you some ideas to get you started if you want to use Toolset as a solution.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.