It is about having "Commerce Cart Form Checkout Pane" as alternative to the Cart page for updating the Cart content.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | commerce_cart_form_checkout_pane-n2153785-9.patch | 9.22 KB | damienmckenna |
It is about having "Commerce Cart Form Checkout Pane" as alternative to the Cart page for updating the Cart content.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | commerce_cart_form_checkout_pane-n2153785-9.patch | 9.22 KB | damienmckenna |
Comments
Comment #1
vasikehere is patch that propose a solution for this feature request:
- adds a new checkout setting for disabling the cart page
- use hook_menu_alter for a custom callback for redirection
- use hook_form_FORM_ID_alter for hiding the cancel (back to cart) button.
Comment #2
vasikethe previous patch seems to have a bug for a module_load_include() call - wrong file name.
there is a new one that should fix it.
Comment #3
dwkitchen commentedI was thinking the setting would be on the pane's setting page
admin/commerce/config/checkout/form/pane/cart_contents_form
rather than on the checkout settings page.
Comment #4
vasikei didn't use the pane settings as it deals with checkout pages and it "affects" the checkout process.
it doesn't seems "right" to be "hidden" in a Checkout pane setting.
Comment #5
damienmckennaThere was a small flaw - when the setting is changed it doesn't trigger the necessary menu rebuild. This patch triggers a menu rebuild if the setting changes, and adds a note to the checkbox explaining that this will happen.
Comment #6
damienmckennaThere's a problem with redirecting to the checkout page if there's no cart - the visitor will automatically be redirected to the homepage (or wherever the variable commerce_checkout_empty_redirect defines). So this version adds a new option to control that. It also hides this new option if the main "Disable the cart page" option is disabled.
Comment #7
damienmckennaThis adds hook_uninstall() for the two new variables.
Comment #8
damienmckennaThe last patch missed a change to commerce_cart_form_checkout_pane_cart_view().
This patch adds an option to select a default product which will be added to the cart should it be empty upon arriving at the checkout page; without this option, if someone loads the cart page they will be automatically redirected to the homepage.
I've also added commerce_product and commerce_line_item as dependencies, just because those are specifically used on the cart page callback.
Comment #9
damienmckennaWhoops, the last one was missing some things.
Comment #10
damienmckennaBecause this new code is 100% new and doesn't affect the existing module, I decided to spin it off as a separate module:
https://www.drupal.org/project/commerce_auto_checkout
I've also made vasike a co-maintainer.
Marking this fixed.