8 – Cart API doesn’t fire the “update cart” event

Following this documentation I have created a custom event subscriber for add, update and remove items from cart. It works good and events are fired in every case you add,update or remove items from the cart on the cart page or from the shop view.
I have installed Commerce Cart Fly Out, that uses Commerce Cart Api and a fly-out window to show the cart, and It uses REST to update and remove. If you remove an item, then my remove event is fired. But if you update the quantity, update event is not fired. I have followed, with xdebug, the execution progress until class CartUpdateItemsResource and its patch method, that save the order item. The line is updated well but my update event is not fired. I don’t know the reason.

This is my custom Event subscriber:

/**
 * Cart Event Subscriber.
 */
class MyCartEventSubscriber implements EventSubscriberInterface {

  protected $database;

  protected $messenger;

  protected $cartManager;

  public function __construct(MessengerInterface $messenger, CartManagerInterface $cart_manager) {
    $this->messenger = $messenger;
    $this->cartManager = $cart_manager;
    $this->database = Drupal::database();
  }

  public static function getSubscribedEvents() {
    return (
      CartEvents::CART_ENTITY_ADD => (('addToCart', 100)),
      CartEvents::CART_ORDER_ITEM_REMOVE => (('removeFromCart', 100)),
      CartEvents::CART_ORDER_ITEM_UPDATE => (('updateCart', 100)),
    );
  }

  public function addToCart(CartEntityAddEvent $event) {
    Drupal::logger('CartEvent')->notice('add to cart');
    // ... some code
  }

  public function removeFromCart(CartOrderItemRemoveEvent $event) {
    Drupal::logger('CartEvent')->notice('remove from cart');
    // ... some code
  }

  public function updateCart(CartOrderItemUpdateEvent $event) {
    Drupal::logger('CartEvent')->notice('update cart item');
    // ... some code
  }
}

hooks – woocommerce_order_status_changed doesn’t fire when I change Order Status from Woocommerce Dashboard

I updated Woocommerce to 4.7.0 and woocommerce_order_status_changed hook doesn’t fire anymore. It has been working before perfectly.

Now when I go to the Dashboard, Woocommerce -> Orders -> Select Order -> Change Status (dropdown) -> Save.
The hook doesn’t fire / run the necessary function at all.

We have many custom statuses, so we need to handle these from code by this hook.

How can I catch the status changes of an order from this version?

dnd 5e – Can two mages cast Wall of Fire in the same place?

Arguably, per PHB page 205 the wall of fires will not stack, although the following sentence about Combining magical effects gives an example about beneficial spells, not damage spells.

For example, if two clerics cast bless on the same target, that character gains the spell’s benefit only once; he or she doesn’t get to roll two bonus dice.

I think this is too vague to say whether or not the initial damage of the 2nd instance of wall of fire is or isn’t applied. However, if the caster of the first wall of fire ends concentration:

From the Sage Advice compendium:

Can a spellcaster dismiss a spell after casting it? You can’t normally dismiss a spell that you cast unless (a) its description
says you can or (b) it requires concentration and you decide to end
your concentration on it. Otherwise, a spell’s magic is unleashed on
the environment, and if you want to end it, you need to cast dispel
magic on it.

Also on page 203 of PHB:

You can end concentration at any time (no action required).

In either case, I would rule that the initial damage of both walls of fire applies, but the “additional damage at end of turn” is applied once.

However, if the two casters able to cast wall of fire coordinate their efforts, the first could end concentration right before the 2nd casting of the spell, so you could definitely get 2x applications of the initial damage, along with the damage to creatures ending their turn on that side of the wall.

However, you could easily fit a few walls of fire within the same 5′ x 5′ square if you lined them up properly, so if you had each wall pointing in opposite directions, you could get 2x initial burst (since the wall of fires would then not be in exactly the same location) and also cover both directions from the origin points, since the origin points are slightly different.

For purposes of combining magical effects, I tend to think that whether you are fully in one fire or the other, or half in each, the damage will still be the 5d8 at the end of your turn but your DM ruling may vary.

But certain vagaries can definitely be worked around via concentration!

dnd 5e – Can you fire a pre-loaded hand crossbow one-handed?

Pre-loaded crossbows do not exist

Strictly speaking, there is no way to pre-load a crossbow. The “Weapon Properties” rules state (emphasis mine):

(…) Ammunition. You can use a weapon that has the ammunition property to make a ranged attack only if you have ammunition to fire from the weapon. Each time you attack with the weapon, you expend one piece of ammunition. Drawing the ammunition from a quiver, case, or other container is part of the attack (…)

There simply is no way to draw the ammunition for an attack other than during the attack; thus crossbows cannot be pre-loaded as the only time they are loaded is immediately before being fired.

Of course, this is possible using a made up action as the rules on “Actions in Combat” state:

(…) When you describe an action not detailed elsewhere in the rules, the DM tells you whether that action is possible and what kind of roll you need to make, if any, to determine success or failure. (…)

So you could use your action on the non-detailed action of loading a crossbow, though whether this can happen is up to the GM; as are the results and ramifications of allowing such an action.


The bit about slings merely requires that you have ammunition available

(…) If you use a weapon that has the ammunition property to make a melee attack, you treat the weapon as an improvised weapon (see “Improvised Weapons” later in the section). A sling must be loaded to deal any damage when used in this way. (…)

This merely clarifies that in order to use a sling to make an improvised melee attack, it must be loaded; and we know from the previous bit that slings are loaded when you attack with them. Thus, this is just stating that for slings in particular, you must have ammunition (and a free hand) available in order to use them to make improvised melee attacks.


What I’d do at my tables

I would allow characters to pre-load crossbows by using their action, though I would not have this make them ignore the Loading property (they could not use Extra Attack to fire two pre-loaded crossbows). Thus it effectively just gives them an extra hand to do something with if they wanted. This is very similar to what I actually do at my tables which is to basically ignore the drawing/stowing rules altogether and allow characters to draw/stow any number of weapons with each of their attacks.

50 Pr9 + 25 Edu – Gov High Pr SEO Authority Backlinks – Fire Your Google Ranking for $5

50 Pr9 + 25 Edu – Gov High Pr SEO Authority Backlinks – Fire Your Google Ranking

20 Pr9 + 20 Edu – Gov High Pr SEO Authority Backlinks – Fire Your Google RankingFire the Google ranking with 20 Pr9 + 20 Edu-Gov SEO Authority Backlinks

24 HOURS EXPRESS DELIVERY

These are profile links, not blog comments or redirect

Whitehat SEO Service with exclusive BONUS

100% Penguin, Panda, Hummingbird, and Fred protected

Domain Authorities (DA) ranging from 100 – 80, Fire the Google ranking and page rank of your website

Links from brands such as – Sony, Microsoft, Amazon, Apache, Java, TED, Dell and many many more!

The only gig recommended by – Gregory Ortiz, Kotton Grammer and others.

WHAT WILL YOU GET FOR $5?

20 PR9-PR8 AUTHORITY backlinks ( DA100-DA80 )

20+ .EDU /.GOV backlinks

Detailed excel REPORT with login data

Add your URLs to premium indexing services

FEATURES:

Manual work, no software or bots used

We rotate IP for each account creation

Natural mix of nofollow and dofollow, naked and branded anchor

Authority unique domains only

These are from AUTHORITY domains such as TED, mit.edu , Cern, Nature, Disqus, academia.edu etc. If you are unsure about anything at all, please before ordering and I will do my very best to answer your questions.

Using my service is absolutely safe for your backlinks and sites! Yes, you heard it right!

WHAT DO I NEED FROM YOU?

1 URL

10 Keywords

F. A. Q.

Do you accept non-English Sites?

Yes, we can accept non-English websites, but we will use English content with the non-English anchor.

Do you accept porn, gambling, adult and illegal sites?

Sorry, we don’t accept porn, gambling, adult and illegal sites.

What type of links are these?

These are manually created profile backlinks, not blog comments or redirects.

Do you guarantee result with a money-back guarantee?

I wanted to make this section extremely clear. We are selling links here. We are not selling guarantees that you will hit #1. SEO should be treated as an investment. Whilst we want it to work out for you, you need to realize that sometimes it doesn’t always go that way. And nope, there is no refund after report delivery.

.(tagsToTranslate)Pr9(t)Edu(t)SEO(t)Highpr(t)Profile(t)Authority

dnd 5e – Can you warm yourself up with Fire Bolt?

It’s up to the DM.

In general, spells only do what they say they do. In the introduction to the section “Casting a Spell”, the Player’s Handbook states:

Each spell description in Chapter 11 begins with a block of information, including the spell’s name, level, school of magic, casting time, range, components, and duration. The rest of a spell entry describes the spell’s effect.

The description of firebolt (which is its effect) mentions nothing about the mote itself being a reliable source of warmth, and the rules are pretty unclear about what exactly it means to “hold its energy“.

In the absence of clear guidance from the rules, this is a DM judgment call.

This Q&A has some helpful guidance for creative uses for spells: Is there a rule for how to handle creative use of spells?. NautArch writes:

Generally, The Rule of Cool* should encourage creative solutions, as long as they fall within agreement of the rules. Ultimately, there is no real guidance as to how to handle this as DM other than 5e giving the DM ability to adjudicate decisions. You’ve got the freedom, you’ve got the power, just come up with something reasonable that is fun for everyone.

Fire bolt may still be able to save you here.

There’s an important phrase in the description of fire bolt that may give you a strictly rules as written solution:

A flammable object hit by this spell ignites if it isn’t being worn or carried.

While holding the spell for warmth is up to the DM’s call, the rules are very explicit that a fire bolt can ignite objects, thus providing you with a fire for warmth.

dnd 5e – Does the metal construct summoned from Summon Construct also cause fire damage when using Slam?

The Summoned Construct’s Heated Body ability is the same wording as the Remorhaz’ (though it does less damage).

Construct Spirit:

Heated Body (Metal Only). A creature that touches the construct or hits it with a melee attack while within 5 feet of it takes 1d10 fire damage.

Remorhaz:

Heated Body. A creature that touches the remorhaz or hits it with a melee attack while within 5 feet of it takes 10 (3d6) fire damage.

but unlike the Remorhaz’ Bite, the construct’s description does not have a clause that it also deals additional (fire) damage on a hit with its Slam.

Construct

Slam. Melee Weapon Attack: your spell attack modifier to hit, reach 5 ft., one target. Hit: 1d8 + 4 + the spell’s level bludgeoning damage.

Remorhaz

Bite. Melee Weapon Attack: +11 to hit, reach 10 ft., one target. Hit: 40 (6d10 + 7) piercing damage plus 10 (3d6) fire damage. If the target is a creature, it is grappled (escape DC 17). Until this grapple ends, the target is restrained, and the remorhaz can’t bite another target.

Does a creature count as touching the construct (and get fire damage) if they are hit by its slam attack?


Info on the Summoned Construct is from Tasha’s Cauldron of everything. Info on Rhemoraz is from Monster Manual

The blaster class service up 2020 5 million gsa backlink on fire for $20

The service on fire 5 million backlink baster service The hot topic on the SEO clerks
what are you waiting for
get fire now
get the guaranteed result

thank you

by: sulius68
Created: —
Category: Link Building
Viewed: 150


.

javascript – Fire Amasty Mega Menu on page load

I am updating a Magento2.3.5-p1 site and I am required to use the Amasty Mega Menu extension. I have managed to install the Mega Menu and I can dislay a category menu as a “hamburger” menu as the design I have requires. I need the “hamburger” menu to open in an expanded view rather than see the “hamburger” icons and then having to click on the icons to open the Mega Menu.

In the code

<div class="header-content"> 
    <span data-ammenu-js="menu-toggle" class="ammenu-menu-toggle -hamburger -active">
        <span class="ammenu-icon"></span>
        <span class="ammenu-icon"></span>
        <span class="ammenu-icon"></span>
</span>

I can see where the Mega Menu icons are rendered. I can also see where the menu-toggle function is called, I assume this is in an “onclick”.

In ammenu.js I can see there is code

$('(data-ammenu-js="menu-toggle")').off('click').on('click', function () {
    self.toggleMenu();
});

Which appears to be where the menu toggle functionality seems to happen.

What I need to do is call this menu toggle fucntion when the page is loaded rather than wait for a user to click on the “hamburger” icon. I have thought I could use a

$("document").ready(function() {

}

but I cannot work out how to target the menu tocggle inside this “document ready”

I would appreciate help in resolving this issue

javascript – inner onClick doesn’t fire

I have a problem in my React project,

I have a menu which has a sub-menu which has a sub-menu
this is the code

<ul
          id="main-menu-navigation"
          data-menu="menu-navigation"
          className="navigation navigation-main"
        >
          <li id="nav-analytics" className="nav-item has-sub">
            <a>
              <i className="icon-home3" />
              <span className="menu-title menu-title-main">{translation.SIDEBAR.ANALYTICS}</span>
            </a>
            <ul className="menu-content">
              {listDashboards && listDashboards.length > 0 ? (
                listDashboards.map((site, index) => (
                  <li key={index} className={privileges.isUser() ? '' : 'has-sub'}>
                    <a className="menu-item">
                      {privileges.isUser() ? '' : <i className="icon-dashboard" />}
                      {site.nom} dd
                    </a>
                    <ul className="menu-content dashboard-link">
                      {site.dashboards
                        ? site?.dashboards.map((dashboard, index) => (
                            <li key={index}>
                              <a
                                className="menu-item test-class"
                                onClick={(e) => onSelectDashboard(e, dashboard)}
                              >
                                {dashboard.nom}66
                              </a>
                            </li>
                          ))
                        : ''}
                    </ul>
                  </li>
                ))
              ) : (
                <li className="no-dashboards-sidebar">
                  <a>{translation.SIDEBAR.NO_DASHBOARDS}</a>
                </li>
              )}
            </ul>
            <ul className="menu-content" />
          </li>

          {userEnterprise && (privileges.isAdmin() || privileges.isUser()) && (
            <li className="nav-item">
              <Link to={`/protected/edit-enterprise/${userEnterprise.id}`}>
                <i className="icon-office" />
                <span data-i18n="nav.content.main" className="menu-title">
                  {translation.SIDEBAR.YOUR_ENTERPRISE}
                </span>
              </Link>
            </li>
          )}

          <li className="nav-item">
            <a>
              <i className="icon-thumbs-o-up" />
              <span data-i18n="nav.content.main" className="menu-title">
                {translation.SIDEBAR.RECOMMENDATION}
              </span>
            </a>
          </li>
          <li className="nav-item">
            <a>
              <i className="icon-bell-o" />
              <span data-i18n="nav.content.main" className="menu-title">
                {translation.SIDEBAR.NOTIFICATIONS}
              </span>
            </a>
          </li>
          <li className="nav-item">
            <a>
              <i className="icon-star-o" />
              <span data-i18n="nav.content.main" className="menu-title">
                {translation.SIDEBAR.FAVORITES}
              </span>
            </a>
          </li>
        </ul>

the problem is the onClick in the inner “li” element doesn’t fire due to jquery event listeners in the template scripts.

this code:

<li key={index}>
                              <a
                                className="menu-item test-class"
                                onClick={(e) => onSelectDashboard(e, dashboard)}
                              >
                                {dashboard.nom}66
                              </a>
                            </li>

the app-menu file which contains the jquery code

    bind_events: function () {
      var menuObj = this;

      $('.navigation-main')
        .on('mouseenter.app.menu', 'li', function () {
          var $this = $(this);
          $('.hover', '.navigation-main').removeClass('hover');
          if (
            $body.hasClass('menu-collapsed') ||
            ($body.data('menu') == 'vertical-compact-menu' &&
              !$body.hasClass('vertical-overlay-menu'))
          ) {
            $('.main-menu-content').children('span.menu-title').remove();
            $('.main-menu-content').children('a.menu-title').remove();
            $('.main-menu-content').children('ul.menu-content').remove();

            // Title
            var menuTitle = $this.find('span.menu-title-main').clone(),
              tempTitle,
              tempLink;
            if (!$this.hasClass('has-sub')) {
              tempTitle = $this.find('span.menu-title').text();
              tempLink = $this.children('a').attr('href');
              if (tempTitle !== '') {
                menuTitle = $('<a>');
                menuTitle.attr('href', tempLink);
                menuTitle.attr('title', tempTitle);
                menuTitle.text(tempTitle);
                menuTitle.addClass('menu-title');
              }
            }
            // menu_header_height = ($('.main-menu-header').length) ? $('.main-menu-header').height() : 0,
            // fromTop = menu_header_height + $this.position().top + parseInt($this.css( "border-top" ),10);
            var fromTop;
            if ($this.css('border-top')) {
              fromTop = $this.position().top + parseInt($this.css('border-top'), 10);
            } else {
              fromTop = $this.position().top;
            }
            if ($body.data('menu') !== 'vertical-compact-menu') {
              menuTitle.appendTo('.main-menu-content').css({
                position: 'fixed',
                top: fromTop,
              });
            }

            // Content
            if ($this.hasClass('has-sub') && $this.hasClass('nav-item')) {
              var menuContent = $this.children('ul:first');
              menuObj.adjustSubmenu($this);
            }
          }
          $this.addClass('hover');
        })
        .on('mouseleave.app.menu', 'li', function () {
          // $(this).removeClass('hover');
        })
        .on('active.app.menu', 'li', function (e) {
          $(this).addClass('active');
          e.stopPropagation();
        })
        .on('deactive.app.menu', 'li.active', function (e) {
          $(this).removeClass('active');
          e.stopPropagation();
        })
        .on('open.app.menu', 'li', function (e) {
          var $listItem = $(this);
          $listItem.addClass('open');

          menuObj.expand($listItem);

          // If menu collapsible then do not take any action
          if ($('.main-menu').hasClass('menu-collapsible')) {
            return false;
          }
          // If menu accordion then close all except clicked once
          else {
            $listItem.siblings('.open').find('li.open').trigger('close.app.menu');
            $listItem.siblings('.open').trigger('close.app.menu');
          }

          e.stopPropagation();
        })
        .on('close.app.menu', 'li.open', function (e) {
          var $listItem = $(this);

          $listItem.removeClass('open');
          menuObj.collapse($listItem);

          e.stopPropagation();
        })
        .on('click.app.menu', 'li', function (e) {
          var $listItem = $(this);
          if ($listItem.is('.disabled')) {
            e.preventDefault();
          } else {
            if (
              $body.hasClass('menu-collapsed') ||
              ($body.data('menu') == 'vertical-compact-menu' &&
                $listItem.is('.has-sub') &&
                !$body.hasClass('vertical-overlay-menu'))
            ) {
              e.preventDefault();
            } else {
              if ($listItem.has('ul')) {
                if ($listItem.is('.open')) {
                  $listItem.trigger('close.app.menu');
                } else {
                  $listItem.trigger('open.app.menu');
                }
              } else {
                if (!$listItem.is('.active')) {
                  $listItem.siblings('.active').trigger('deactive.app.menu');
                  $listItem.trigger('active.app.menu');
                }
              }
            }
          }

          e.stopPropagation();
        });

      $('.main-menu-content').on('mouseleave', function () {
        if ($body.hasClass('menu-collapsed') || $body.data('menu') == 'vertical-compact-menu') {
          $('.main-menu-content').children('span.menu-title').remove();
          $('.main-menu-content').children('a.menu-title').remove();
          $('.main-menu-content').children('ul.menu-content').remove();
        }
        $('.hover', '.navigation-main').removeClass('hover');
      });

      // If list item has sub menu items then prevent redirection.
      $('.navigation-main li.has-sub > a').on('click', function (e) {
        e.preventDefault();
      });

      $('ul.menu-content').on('click', 'li', function (e) {
        var $listItem = $(this);
        if ($listItem.is('.disabled')) {
          e.preventDefault();
        } else {
          if ($listItem.has('ul')) {
            if ($listItem.is('.open')) {
              $listItem.removeClass('open');
              menuObj.collapse($listItem);
            } else {
              $listItem.addClass('open');

              menuObj.expand($listItem);

              // If menu collapsible then do not take any action
              if ($('.main-menu').hasClass('menu-collapsible')) {
                return false;
              }
              // If menu accordion then close all except clicked once
              else {
                $listItem.siblings('.open').find('li.open').trigger('close.app.menu');
                $listItem.siblings('.open').trigger('close.app.menu');
              }

              e.stopPropagation();
            }
          } else {
            if (!$listItem.is('.active')) {
              $listItem.siblings('.active').trigger('deactive.app.menu');
              $listItem.trigger('active.app.menu');
            }
          }
        }

        e.stopPropagation();
      });
    }

I didn’t found the solution, i hope that you can help me and thanks