Thank you. I have added some suggestions:


+++ b/modules/dc_ajax_add_cart_po...

Contribution Date
Technology
Contribution Project
Contribution Details

Thank you. I have added some suggestions:

  1. +++ b/modules/dc_ajax_add_cart_popup/src/EventSubscriber/AjaxAddToCartPopupSubscriber.php @@ -31,6 +31,20 @@ class AjaxAddToCartPopupSubscriber implements EventSubscriberInterface { + * @var float

    Use @var float|null

  2. +++ b/modules/dc_ajax_add_cart_popup/src/EventSubscriber/AjaxAddToCartPopupSubscriber.php @@ -68,6 +82,10 @@ class AjaxAddToCartPopupSubscriber implements EventSubscriberInterface { + '#checkout_url' => Url::fromRoute('commerce_checkout.form',

    Update this, so that #checkout_url is added only if cart property is not null.

  3. +++ b/modules/dc_ajax_add_cart_popup/src/EventSubscriber/AjaxAddToCartPopupSubscriber.php @@ -68,6 +82,10 @@ class AjaxAddToCartPopupSubscriber implements EventSubscriberInterface { + '#quantity_added' => $this->quantity,

    `#quantity_added` should be added only if `quantity` property is not null.

  4. +++ b/modules/dc_ajax_add_cart_popup/templates/dc-ajax-add-cart-popup.html.twig @@ -15,18 +15,30 @@ + {{ quantity_added }} {{ ' items added to your cart'|t }}

    Use {% trans %}{{ quantity_added }} items added to your cart{% endtrans %} for better translation support

Contribution Author
Files count
0
Patches count
0