0

I would like to add a global gift wrap option to our checkout pane on Ubercart 3 (running on Drupal 7).

It is an option that can apply to any product and has a fixed price no matter how many products are purchased.

I do not want to add it as an attribute to individual products or product classes, but would like to add a simple yes/no radio button to all checkouts. If yes is selected, the fixed amount is added to the order.

What is the simplest/best way to implement this?

1

Another approach would be to create a Gift Wrap product class. Create a node of this custom type with the price of your gift wrap option. Then create a view of the custom Gift Wrap entity and display it prominently as a block on your cart and checkout pages.

| improve this answer | |
0

You can achieve this using following way,

  1. You can use hook_checkout_pane() to create your 'simple yes/no radio button' to all checkouts

  2. If yes is selected, the fixed amount can be added to the order as line_item

A working example can find here, which will give you idea to proceed

Also Creating line items in Ubercart 3 , check this similar question

| improve this answer | |
0

The easiest way I've found is to install Ubercart Webform and
Ubercart Webform Checkout Pane. Create a Gift Wrap product and add it as a Form component to your form. Then under Form settings, check 'Generate a checkout pane'.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.