If I create a custom shopping cart form view or shopping cart block view, I can't save the selection to my order type.

Steps to reproduce:
1. Duplicate Cart form (commerce_cart_form) view.
2. Duplicate Cart block (commerce_cart_block) view.
3. Edit an order type. (/admin/commerce/config/order-types/{order type}/edit)
4. Select new cart form view in "Shopping cart form view".
5. Select new cart block view in "Shopping cart block view".
6. Press "Save".
7. Edit the order type again.

"Shopping cart form view" and "Shopping cart block view" still show the original default values, not the values we just selected.

CommentFileSizeAuthor
#2 commerce_cart_cart_views_2882858-2.patch1023 bytesfranksj
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

franksj created an issue. See original summary.

franksj’s picture

In commerce_cart_order_type_form_submit(), there is a todo comment regarding this:
// @todo open follow up and fix cart_form_view, commerce_cart_block saving.

Attached patch saves settings for both cart_form_view and cart_block_view.

franksj’s picture

Status: Active » Needs review

Change status to Needs review.

bojanz’s picture

Title: Saving Shopping cart settings in Order Type config » Cart settings on the order type form are not saved
Category: Task » Bug report

Retitling.

  • bojanz committed 5429d41 on 8.x-2.x authored by franksj
    Issue #2882858 by franksj: Cart settings on the order type form are not...
bojanz’s picture

Status: Needs review » Fixed

Thanks! Crazy that this @todo survived for so long. I've cleaned up the code a bit to resemble commerce_checkout_order_type_form_submit(), and committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.