Magento 2 – Order Item changes

I want to inform customers with email all details of their orders and i want to be able to show difference. For example:

Those items shipped: ... Those items canceled: ... Those items ... 

credit memo, hold, invoice, ship, reorder, create returns... There so many situations. What should be the best way to achieve this?

Still I tried to use events for invoices (sales_order_invoice_save_aftersales_order_invoice_register):

public function execute(\Magento\Framework\Event\Observer $  observer) {     $  order = $  observer->getEvent()->getOrder();     $  stateProcessing = $  order::STATE_PROCESSING;      $  collection = $  order->getItemsCollection();     foreach ($  collection as $  item) {         $  this->logger->info('item = '.$  item->getName());         $  this->logger->info('   qty_invoiced = '.$  item->getData('qty_invoiced'));         $  this->logger->info('   qty_invoicedorig = '.$  item->getOrigData('qty_invoiced'));     }      return $  this; } 

But quantities are same, couldn’t get the difference.

When using or crafting a Spellcasting item, do modifiers that apply to spellcasting apply?

Specifically, I am interested in if the Power Boost power (from the Prometheum Exxet) could interact with an item that has the Spellcasting power (though there may be other cases where interactions could occur). It is not immediately clear from the text.

There are two cases to consider:

  1. A spellcaster with the modifier uses the item.

  2. An item is created with the Spellcasting power and the other modifier.

I suspect there is no official ruling on this (as with most of my other questions, in fact), so I will accept subjective arguments.

Can a intelligent, legendary item use its own spell-like powers like a normal intelligent item can?

The Pathfinder Core book states that and intelligent item uses & maintains its powers… but the legendary items description states that the bearer is the one that uses it.

This seems like common sense to me since legendary items are more powerful than normal intelligent items, but some of my fellow players are stating that legendary items do not use their own spell casting powers. That seems rather silly to me unless this is something specific to the “spell casting” ability, but even then those legendary powers are just emulating the normal intelligent items abilities.

According to the rules on intelligent items:

Unlike most magic items, intelligent items can activate their own powers without waiting for a command word from their owner. Intelligent items act during their owner’s turn in the initiative order.

&

All powers function at the direction of the item, although intelligent items generally follow the wishes of their owner. Activating a power or concentrating on an active one is a standard action the item takes. The caster level for these effects is equal to the item’s caster level. Save DCs are based off the item’s highest mental ability score.

From the rules on legendary items:

Spellcasting: This item allows its bearer to cast a limited number of spells as spell-like abilities. This ability can be taken more than once. Each time it’s taken, the bonded creature gains 5 points to spend on selecting what spells the item can cast. A spell costs a number of points equal to its level (minimum 1). The bearer can then activate the item to use each spell-like ability once per day. By spending double the cost, the bearer can use each spell-like ability three times per day. All spells must come from the same class’s spell list. No spell can have a level higher than the bonded creature’s tier. The caster level for these spells is equal to double the bonded creature’s tier. The save DC for these spells is equal to 10 + the spell level + the bonded creature’s tier.

Efficient method to load/get and assign multiple custom attributes from quote item?

Is there a more efficient way to load and assign quote item custom attributes?

This is code in my Observer:

public function MyFunction(Varien_Event_Observer $  observer) { $  QuoteObject = Mage::getSingleton('checkout/session')->getQuote();         foreach ($  QuoteObject->getAllVisibleItems() as $  item) {             $  custom_attr1 = $  item->getData('custom1');             $  custom_attr2 = $  item->getData('custom2');             $  custom_attr3 = $  item->getData('custom3');             $  custom_attr4 = $  item->getData('custom4');             $  custom_attr5 = $  item->getData('custom5');            //do other stuff here         }   //do some other stuff here } 

Creating a body for the spirit of a magic item?

Okay so In the campaign I’m currently playing in the party found a magic sword (Sun Blade). The sword has it’s own personality, spirit or soul whatever you’d call it. Anyway the group didn’t really need the sword so we just kinda ended up talking to it a lot. In our last session we thought it would be an idea to try give this sword it’s own body.

I thought maybe with the clone spell we could create a body and then try transfer the soul of the sword in to it but I don’t believe this is possible.

My question is there a way we can achieve this with some sort of spell or other magic item maybe?

Unusual item was found in my bag at airport screening. Was it planted?

I went through security screening at Geneva airport recently, and they started searching my carry on. After a while, they found some cutter (knife) blade in an external pocket. I never saw those, the blade was old and rusty, I never had such a thing. And even less in my backpack water pocket, where it could cut my back eventually. Could have it been planted? That’s the only way I see, either to make me go through extra scrutiny, either to check the machine operator was correctly doing his job. Before going through the x-ray, a first guard handled shortly my backpack. The last option is my best guess, is it something common?

Thank you!

How to use SharePoint REST API to get newest list item?

Trying to get the newest item added to a list.

Get item by id, works:

$  .ajax({ url: xurl + "/_api/web/lists('" + xlist + "')/items/getById(123)",  type: "GET", headers: { "Accept": "application/json;odata=verbose", },   success: function (data) {     var xid = data.d.ID;     alert(xid);},   error: function (error) { alert(JSON.stringify(error)); } }); 

Get top item, doesn’t work, returns undefined:

$  .ajax({ url: xurl + "/_api/web/lists('" + xlist + "')/items?$  top=1&$  orderby=ID desc",  type: "GET", headers: { "Accept": "application/json;odata=verbose", },   success: function (data) {     var xid = data.d.ID;     alert(xid);},   error: function (error) { alert(JSON.stringify(error)); } }); 

Suggestions?