2

I'm using Drupal Commerce and I want a quote button on some product (node) page so that a potential buyer can enter some brief information and click to send a Quote Request for the item that they are viewing.

I have a product type called "Premium products", and I want this Quote Request button instead of price to be on some page.

On clicking the Quote Request button and asking a quote to the seller, the seller may respond to the query and tell the proposal amount for the product which user can accept or reject. Once accepted by user, the product should be added to the user's cart with the purposed price.

closed as unclear what you're asking by kiamlaluno Jun 3 '16 at 5:45

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What have you tried already to solve this? Are you stuck with something in particular? – Aram Boyajyan Feb 19 '16 at 12:03
  • I added request quote button on some products after clicking on button a webform opens which will send to quote request message to seller – Vikram fz16 Feb 19 '16 at 12:06
  • is any module is available for this functionality – Vikram fz16 Feb 19 '16 at 12:08
  • Hey @vicky8888 I'm not sure about the seller side, but I did request a quote functionality on product pages at floorsofstone.com using Webform module. I'm sure you could set it to send an email or alike to the seller. – Scott Lawrence Feb 19 '16 at 16:37
  • how u did it at floorsofstone.com – Vikram fz16 Feb 22 '16 at 7:58
2

Have a look at the feature request "Let customers build a 'quote' cart and request a quote instead of checkout". Even though it has status "postponed", it has some interesting comments, such as the very first one, which includes this (I added the bold markup):

You probably don't need any specific module to do a majority of this. All you'd have to do is add $0.00 prices to all your products and then just don't display those prices anywhere. You don't have to show product price fields in your display nodes, and you can edit your cart Views so they don't include prices any more. The only thing you'd really have to change is the text pertaining to the shopping cart. You could do this with a module like String Overrides or just alter the various places directly with a hook in a site customizations module.

When it comes time to submit the quote, I suppose you may want a custom button on the Cart form that changes the status of the order to "Needs quote" or something - if that's true, then that's all your custom module should really be responsible for ...

Also, the comment #7 in that same issue seems worth considering, this is part of what it says (I added the bold markup):

I got this working quite easily! As Ryan said, make all product prices $0. Use String Override module and override a couple of the basic syntaxes. Edit a couple of Views where certain terms/words still creeped through. When you see syntax that needs to be changed on a view and you've already used String Override for it but it's not overriding it, just click on the right corner of the view on the gear to edit view. Then change the wording on there. I also had to remove or change some of the text that were on some views but under the "FOOTER" section (middle section of view). I had to do this a lot for the cart and checkout views.

I added another checkout rule under Store>Configuration>Checkout Settings under "Send Request"-section to email me when the person places a request.

Maybe not a complete solution / answer to your question, but at least a partial answer to think about ...

1

You could use hook_form_alter to change the button text and submit function. This would allow you to, perhaps, create a checkbox called "Request a Quote" and replace the "Add to Cart" button with a link to a webform.

<?php

/**
 * Implements hook_form_FORM_ID_alter().
 */
function MODULE_form_commerce_cart_add_to_cart_form_alter(&$form, &$form_state, $form_id) {
  $product = $form_state['default_product'];
  $product_wrapper = entity_metadata_wrapper("commerce_product",$product);
  if ($product_wrapper->__isset('field_request_quote') &&
      $product_wrapper->field_request_quote->value() == true) {
    // Hide "add to cart"
    $form['submit']['#access'] = false;

    // Add a link instead
    // could be a separate field as well
    $form['quote'] = array(
      '#weight' => 999,
      '#markup' => l('Request Quote','node/4'),
    );
  }
}

?>

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