Skip Navigation

[Resolved] Drupal Sample Requests on WordPress.

This support ticket is created 4 years 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
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 1 reply, has 2 voices.

Last updated by Jamal 4 years ago.

Assisted by: Jamal.

Author
Posts
#1914689

Tell us what you are trying to do?
We're building a sample request functionality on our WordPress website. Previously this was powered by the Drupal flag module, and we've imported all of the product data along with their relations over to Toolset on WP. The import worked perfectly.
The individual sample requests are powered right now by the Gravity form on the post page, but we need to have the multiple requests at once.

The main concern there is right now is choosing the path for creating the cart functionality that'll allow requesting multiple samples. The principle is the customer is adding the products(colorways) to the cart and then proceeds to request samples form, requesting all of the samples added in the cart.
Can you suggest any ideas to build this functionality on WordPress based on the Toolset?

Is there a similar example that we can see?
You can check the Drupal website frontend to get a sense of what it should look like. The goal is to build it as close to possible functionality vise over on WordPress.

What is the link to your site?
hidden link - WordPress
hidden link - Drupal

Let me know if anything should be further explained.

#1915069

Hello and thank you for contacting the Toolset support.

I tried to look for this Drupal module to understand your request, but I could only find this one and I am not sure how is this related to a request samples process. hidden link
It seems to me that this module offers similar features to bookmarking or like/dislike, etc.

But, I understood that you want the user to send a request sample of the products on the cart, right? I mean, the shop administrator should receive a request from the user with the list of products + quantities that the user has added to the cart, right?
If that's the case, I would suggest, that you:
- Create a custom post type(Request), and a custom post type(Request Items).
- Create a One-to-many relationship from Request to Request Items.
- Create a form to add new Requests.
- Then, you need to add some custom code, hooked to the cred_sava_data hook, that will pull the cart items and create a Request Item for each one, and then link them to the parent Request post using the relationships API:
- https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
- https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_connect_posts

Read more about the relationships on our documentation page:
- https://toolset.com/course-lesson/?wpv-related-lesson=post-relationships&wpv_view_count=1599013

You may also consider using a 3rd party plugin(free or premium) but I am not sure which one would allow you to request a sample for the whole cart:
- https://wordpress.org/plugins/woo-free-product-sample/
- https://woocommerce.com/products/request-a-quote-plugin-for-woocommerce/
- https://wordpress.org/plugins/yith-woocommerce-request-a-quote/

I hope this helps. Let me know if you have any questions.