Drupal Commerce support

Created on 21 April 2023, over 1 year ago
Updated 15 May 2023, over 1 year ago

Problem/Motivation

Most of the templates provided by Drupal commerce are ok out of the box.

But some need overrides for proper Bootstrap integration.

Feature request
Status

Fixed

Version

5.0

Component

User interface

Created by

🇫🇷France Grimreaper France 🇫🇷

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Grimreaper
  • @grimreaper opened merge request.
  • Status changed to Needs work over 1 year ago
  • 🇫🇷France Grimreaper France 🇫🇷

    Not merging yet.

    I need to test with multiple coupons.

    Also fieldset/details theming is already in a dedicated details and fieldsets form elements Fixed .

  • 🇫🇷France Grimreaper France 🇫🇷

    CSS needed on the login/register step for checkboxes.

  • 🇫🇷France Grimreaper France 🇫🇷

    Checkout progress:

    Before:

    After:

  • 🇫🇷France Grimreaper France 🇫🇷

    To update if Pattern: list group missing variants Fixed is merged.

  • Assigned to pdureau
  • Status changed to Needs review over 1 year ago
  • 🇫🇷France Grimreaper France 🇫🇷

    Cart block:

    Empty cart message:

    Checkout layout, especially sidebar with card and coupons:

    In addition to my comment https://git.drupalcode.org/project/ui_suite_bootstrap/-/merge_requests/8....

    To add 2 classes to the "Go back" link in the checkout. I had to override a plugin, and so to put it in a module, so not possible to contrib it back... Here is the code for the record/example:

    
    declare(strict_types = 1);
    
    namespace Drupal\rockinghop_commerce\Plugin\Commerce\CheckoutFlow;
    
    use Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\MultistepDefault as CommerceMultistepDefault;
    use Drupal\Core\Form\FormStateInterface;
    use Drupal\Core\Link;
    
    /**
     * Add classes to previous link.
     *
     * As this is a plugin and the link is rendered early, not possible to alter it
     * in the theme.
     *
     * @CommerceCheckoutFlow(
     *     id = "multistep_default",
     *     label = "Multistep - Default",
     * )
     */
    class MultistepDefault extends CommerceMultistepDefault {
    
      /**
       * {@inheritdoc}
       */
      protected function actions(array $form, FormStateInterface $form_state): array {
        $actions = parent::actions($form, $form_state);
    
        $steps = $this->getSteps();
        $next_step_id = $this->getNextStepId($form['#step_id']);
        $previous_step_id = $this->getPreviousStepId($form['#step_id']);
        $has_next_step = $next_step_id && isset($steps[$next_step_id]['next_label']);
        $has_previous_step = $previous_step_id && isset($steps[$previous_step_id]['previous_label']);
    
        if ($has_next_step && $has_previous_step) {
          $label = $steps[$previous_step_id]['previous_label'];
          $options = [
            'attributes' => [
              'class' => [
                'link--previous',
                'btn',
                'btn-link',
              ],
            ],
          ];
          $actions['next']['#suffix'] = Link::createFromRoute($label, 'commerce_checkout.form', [
            'commerce_order' => $this->order->id(),
            'step' => $previous_step_id,
          ], $options)->toString();
        }
    
        return $actions;
      }
    
    }
    
    
  • 🇫🇷France Grimreaper France 🇫🇷

    Also, details and fieldsets, will have to be handled in the dedicated issue.

  • Assigned to Grimreaper
  • Status changed to RTBC over 1 year ago
  • 🇫🇷France pdureau Paris

    I didn't test with local instance, but the live demo you showed me today was OK.

  • Issue was unassigned.
  • Status changed to Fixed over 1 year ago
  • 🇫🇷France Grimreaper France 🇫🇷

    Thanks!

    Merged.

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

Production build 0.71.5 2024