Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm selling a medal and allowing user to enter their own text for the engraving.
On a product page.
User enter 5 for the quantity and click Add to Cart.
The problem.
I then need to show a custom page with 5 textfields attribute for user to enter. (If the user enter 2 for the quantity, then the system will show 2 custom textfields etc)
How can I achieve this? Can ubercart do this? How should I approach this problem?
api.ubercart.me and ubercart.org are inaccessible. Can someone point me to a right direction? Module, code, anything.
Thanks
Comments
Comment #2
TR CreditAttribution: TR commentedYou're thinking about it wrong. Items with different inscriptions are different items - your customer is not ordering 5 of the same item, they're ordering 5 different things. Setting quantity to 5 should mean that you want 5 with the same inscription (a team award, for instance).
If you want to provide a means for your customer to more easily customize and order your products in your specific case, then simply create a Drupal multi-step form where you gather information from your customer, then the form submit button can be a Cart Link which adds the requested products to the cart.
Comment #3
slashsharp CreditAttribution: slashsharp as a volunteer commentedCan you give me an example on how to do this?
Should I use Drupal webform?
Or can you guide me on how to load product form programatically?
Comment #4
TR CreditAttribution: TR commentedIf you know how to write Drupal modules and create Drupal forms, this is easy. If you don't, then no, I can't help you here in the Ubercart issue queue. But there are literally thousands of websites, videos, and documentation pages (for example https://www.drupal.org/docs/8/creating-custom-modules and https://www.drupal.org/docs/8/api/form-api) that you can use to learn how to do this. The only Ubercart-specific part is the Cart Links, and for that you can enable uc_cart_links and look at the help page. The form submit button action URL should be a Cart Link, in the scenario I describe above.
Of course, there are many ways to do this, depending on your specific needs, but this issue queue is not a place for getting detailed help in designing or implementing a web site.