How to add a "Express Checkout" button next to "Add to Cart"
Hello,
I'm a new user of Drupal Commerce and Drupal itself, and it's been quite the transition for me as opposed to using other CMS. I have been trying to achieve the following with very little knowledge of the API:
- Add both "Add to Cart" and "Express Checkout" or "Buy Now" options (two buttons) to each product/product-reference display page
I am aware of the rule that makes it possible to change the behavior of the Add to Cart button to a Checkout button, but what I want is to have both options available on the product page. Since the product page includes a quantity box, it would also be able to add the quantity desired for a product on the express checkout option.
Is there a simple way to do this, or do I have to replicate the module and behavior for Add to Cart, then create new rules, and essentially end up creating a custom checkout module based on the add to cart module?
I've been trying to find a simple answer for this or workaround and I can't come up with much. Since my products have variations in color, I can't even use redundancy to seemingly show two options to the end user (even though that'd be just me assigning to product reference fields to the same product).
Could anyone point in the right direction as to where to search or develop for a possible/simple solution for this?
Thank you,
Missy.
Comments
Same problem
Same problem.
How to solve this question?
I need new text instead old "Add to cart"?
With best regards, Alex
RE: new text instead of old "Add to cart"
Hi Alex,
This is not so much to the problem I posted about, but to change "Add to cart" to a different text, you can download Commerce Examples module, which is a great module showing how to use code to override some of the commerce settings.
After installing the examples, go to the modules folder you installed the module from (usually sites/all/modules), then commerce examples, line item example, and the file line_item_example.module. This module is a template showing how to use the API to change/create line items. You can either create a custom module based on this one or just modify the example module to see how it works.
Within the module, if you go to line 54, you will see the following code:
'add_form_submit_value' => t('Add product'),
Just change Add product to the text you'd like to display, eg "Buy it now"
If I find an answer to my question before anyone else posts, I'll post it here.
Cheers!
nice article
check this nice article about express checkout:
http://atendesigngroup.com/blog/express-checkout-drupal-commerce
The Express Checkout Article
I have seen that article before... it allows me to change the behavior of Add to Cart into an Express Checkout button, but I'm failing to see how I can have BOTH "Add to Cart" and "Express Checkout" on the same product page through the add to cart form field.
I do not want this as the only option: "There! Now your users will go directly to checkout *instead* of hassling with the pesky shopping cart page."
Same requirement
I have the same need...
2 buttons:
1) Add to Cart (default behavior)
2) Express Checkout (adds item to cart and redirects to checkout page)
Does anyone know how to accomplish this?
Hi!
Hi!
Has anyone found a solution for this?
Thanks!
Anton