how to update quantity of products in the cart via javascript?

I have the module that changes the quantity of products inside the card via ajax but I need to change it also outside, as on the picture, enter image description here

the code that changes the quantity after reload of the page are as follows

$  variables = array(         'order' => $  order,         'contents_view' => commerce_embed_view('commerce_cart_block', 'defaults', array($  order->order_id), $  _GET['q']),       );       $  count = commerce_line_items_quantity($  wrapper->commerce_line_items, commerce_product_line_item_types());        $  quantity = 0;        foreach ($  wrapper->commerce_line_items as $  line_item) {         if (!$  line_item instanceof EntityMetadataWrapper) {           $  line_item = entity_metadata_wrapper('commerce_line_item', $  line_item);         }         $  types = array('product');          if (empty($  types) || in_array($  line_item->type->value(), $  types)) {           $  quantity = $  quantity + $  line_item->quantity->value();          }       }        $  prod_count = t($  quantity);          if ($  prod_count > 0){          $  icon = '<div class="cart-icon"></div><span class="cart_popup_count">'. $  count . '</span>';         $  content = '<div id="cart-popup" style="display:none;">' . theme('commerce_cart_block', $  variables) . '<div class="popup-arrow"></div></div>';         $  content = '<div class="wrapper">' . $  icon . $  content . '</div>';         }elseif (variable_get('commerce_popup_cart_show_empty_cart', 0) == 1){         $  content = commerce_popup_cart_block_view_get_empty_cart($  variables);       } 

The problem is that I don’t know how to changes this numbers simultaneously inside and outside the card.

This is the code that changes quantity inside the card

  function _commerce_popup_cart_add_to_cart_ajax_callback($  form, $  form_state) {   commerce_cart_add_to_cart_form_submit($  form, $  form_state); //Call the add to cart form to actually add the product   $  res = _commerce_popup_cart_ajax_cart_reload(); //Retrieve the new cart view    $  commands = array();   $  commands[] = ajax_command_replace("#block-commerce-popup-cart-commerce-popup-cart .cart-empty-block", "<div class='cart-contents'></div>");   $  commands[] = ajax_command_html('#block-commerce-popup-cart-commerce-popup-cart .cart-contents', $  res);   return array('#type' => 'ajax', '#commands' => $  commands);  }  function _commerce_popup_cart_ajax_cart_reload() {   global $  user;   $  view_name = 'commerce_cart_block'; // The name of the view we are going to load commerce_cart_block   $  args = array(commerce_cart_order_id($  user->uid));  // Array of arguments we set for the view. Only one argument in our example. your actual view may require additional     //arguments which you may need to set      $  displayId = 'default'; // The display id of for the view.   // Call the views_embed_view function to returned themed view output   $  res = views_embed_view($  view_name, $  displayId, $  args);   return $  res; } 

Invalid response line returned from server: HTTP/2 200 – message after update to 2.1.7

I seem to be getting this message after i updated to Magento 2.1.7 – it only displays on the contact page when someone submits the form.

Invalid response line returned from server: HTTP/2 200

I see this in the magento log file:

main.CRITICAL: Notice: Array to string conversion in /home/xxx/public_html/vendor/magento/module-catalog/Block/Product/View/Attributes.php on line 83 [] []

mac OS Installer lingers after failed Mojave 10.14.3 to 10.14.4 update

I’ve worked this problem w Apple Mac L2 across two phone calls lasting a total of 5 hours and escalation to L3 without a possible resolution, hence opening up my search to the world.

Ultra condensed sequence of events starting Wed, Apr 17:

  1. The 14.3 to 14.4 upgrade is supported through multiple reboot sequences, and between reboots 1 and 2, the update became irrevocably damaged (long unresolved story w L2 and L3 as to how they believe it happened based on my step by step explanation of how this occurred).
  2. The result is a lingering disk image called “mac OS Installer” that’s only visible when booting w Startup Manager. This means that (Mojave) Disk Utility, “About this Mac – Storage”, Recovery OS, and Internet Recovery OS cannot see my main “Macintosh HD” as they all permanently hang on “Locating Disks”.

Current status and how I worked around the problem:

  1. I can boot my partially updated and totally unreliable 14.3 image using Startup Manager, however it’s no longer a production environment.
  2. I bought another 1 TB SSD and replaced my existing optical drive in my Mid 2012 MBP w a Data Doubler (DD). The new SSD went into the main drive bay and the now damaged original SSD is in the DD in the optical bay (both the main and optical bay’s SATA are 6G, and both SSDs are identical 6G’s).
  3. Installed a fresh 14.4 on the new SSD and recovered my data from my cloud based backup service – thankfully, no issues

  4. Because of what I explained in #2, I cannot reformat my original SSD that contains the “mac OS Installer” image that now resides in my DD in the optical bay as I plan on using the second SSD for backup and other dev/test work.

My ask: What are the step by step instructions to delete a disk imaged called “mac OS Installer” that was left during a irrevocably failed 14.3 to 14.4 upgrade?

Thank you

Per Steve’s request, here’s the diskutil list enter image description here

here’s the permanent hang on Disk Utility from the fresh 10.14.4 in the main drive bay enter image description here

Ubuntu not booting after BIOS update boot-repair disk fail

complete Linux noob here.

I’ve been struggling with getting my Ubuntu boot up and running after a bios update.

After the update when booting windows i got the error message INACCESSIBLE_BOOT_DRIVE which somehow resolved it self through the windows recovery tools.

When booting Ubuntu I get dropping to shell message, along with error message telling me that the UUID of my boot doesn’t exist.

I just tried to use the boot-repair disk however it doesn’t show the recommended repair option for me hence I took a log http://paste.ubuntu.com/p/NCVjn5g9jp.

I read on a forum (cant find the link right now, I’ve read so many posts this week) that this might be related to the storage controller settings in BIOS. A user found a solution changing this setting to AHCI. Mine is set to RST right now although when trying to change it i’m prompted with a warning that it will delete all my data.

Any help would be very appreciated!

Powershell update existing user in the people or group field

I want to update the user of a people or group field. The property allow multiple users to set for this field. How can I keep the users who are already present in this field and update the existing user using Powershell script?

For e.g I have user1,user2,user3 in the people or group field. Now I want to update user1 to user4.

How can I achieve this?

Any help would be appreciated

Thanks.

Kubuntu Keyboard layout stuck into CZ_german no english layout after update, restore into original EN_us and EL_Gr ones

After Update on Kubuntu 16.04LTS the keyboard layout has changed into CZ_german without any english layout. Thus I want to restore it into US,GR variant.

Due to unexpected keyboard layout change I find it hard to login either via shell or Xorg. Thus the only option is to use either the recovery mode or a live USB.

Thus how I can revocer the keyboard layout into English and Greek one?

Update editor of published version without affecting version number – CSOM

I am trying to copy files from one site collection to another including their version history and preserve the metadata using CSOM. I am almost there using the below logic for each version of the file. However I am not able to get this to work for major/published/X.0 versions.

1) Check out existing file (If not first version uploaded)

2) Upload the file version

3) Assign the document metadata and perform a checkin (either major or minor to match original files version history).

4) Use ValidateUpdateListItem to set the Editor and Modified values as they were overwritten by the checkin in step 3

This works in most scenarios and keeps the modified date. However if the version was a published version and minor versions are enabled this creates a new X.1 version.

Does anyone have a way of updating the Editor for a published version with minor versions enabled on the list that does not affect the version number? The only solutions I have found require server side code or temporarily disabling versioning which I cannot do!

Requirements:

CSOM only – this is client side C# code.

I cannot temporarily enable/disable versioning or minor versions on the library.