magento2.2 – M2.2CE – Different weights when ordering different quantities

We have a problem in which we have an item that originally weighed 3 pounds, but that falls into an 8-pound box due to size. This is fine, since we will then set the product to around 8 pounds and finish. However, when, for example, 5 of the same item is ordered in an order, we end up using a different box that essentially changes the weights again to return to around £ 3 per item instead of £ 8 per item when purchased separately. .


Order 1: 1 of Item X purchased, product weight comes as 8 pounds.

Order 2: 5 of Item X purchased, product weight should be 3 pounds each, 
totaling to 15 pounds, not 42 pounds.

Is there any way to attack this kind of problem in Magento?

Select query for group quantities per month and year (MySql)

I have a table name "transaction history" with columns

enter the description of the image here

and I would like to create a selection query where SUM the amounts per month and year

for example

Total_Amount | MONTH | YEAR
   100       |  01   | 2018
   110       |  02   | 2018

food and beverages – Customs of Portugal – goods in quantities greater than those allowed

I am Brazilian with a Portuguese residence permit.

I will visit my hometown in the state of Rio Grande do Sul and I would like to bring some kind of tea (Chimarrão tea) here. As I will have a lot of slots in my luggage, I would like to bring 12 kg of tea. I consume almost 2 kg per month, so I will drink tea for 6 months. Tea is not illegal and can be bought in Portugal, but it is very expensive.

I am reviewing this page and it says that I cannot bring products in quantities greater than those allowed. However, I didn't find what the allowable amounts are (I found only for alcohol). I know that in Brazil, the amount is usually 12.

What is the amount allowed in Portugal?

GUI design: why use a discrete representation for continuous quantities?

Is there any reason to use a discrete representation (such as the number of stars) for continuous quantities (such as a progress bar)? This means we don't want to show an exact number. (Yes, I understand that the values ​​in computers are not "truly" continuous, but for the purpose of this question, we will say that they are close enough)

This question comes from my car and its gas meter that induces stress. This is what it looks like when it's full:

Digital board - complete

The gas meter consists of 6 stacked bars, which light up when the gas tank is full. This is what it looks like when it is near the void:

Digital board - empty

Now this is where it gets worse. That bottom bar blinks approximately once per second any Time the meter is reduced to one bar. In other words, the last fuel bar flashes for ~ 17% of a full tank. As I drive mostly from full to empty, the car seems to tell me that it ran out of gas for 17% of the time I drive it (and it distracts me with a blinking light)

Now, some quick math to show how stress inducer this is:

The tank size is just over 6 gallons. However, the fuel efficiency is ~ 45mpg average (why I like the car). This means that in a full tank, I have a range of approximately 270 miles.

The last bar in the gas meter, therefore, represents ~ 45 miles of range. To put that in perspective, with the trip and everything, I drive approximately 20 miles per day. This means that I can drive for 2 full days while the car screams that it is about to dry. When I get in my car in the morning and the bar is blinking, can I play the fun game of "Can I get to work today?".

All comments aside, it seems that the obvious solution would be to have a meter closer to continuous. Even if there were only 10 bars instead of six, that gives the user a much closer idea of ​​the real value.

So, is there any reason UX to do something like this, or is it simply a bad design?

Force Mathematica to display the appropriate unit prefix and perform a numerical evaluation of the quantities?

I am experimenting with units:

UnitConvert(1/Quantity(2.0, "GHz"))

$ 5. For 10 – 10 s $

fs = Quantity(2,"GHz")

$ dfrac {1} {2000000} s $

Two questions:

  1. How to ask Mathematica to automatically show the result using the appropriate prefix ($ ms $, $ mu s $, $ ns $, …) instead of systematically using the SI base unit ($ s $)
  2. WhyIn the second example, the result is shown as a fraction while it was not in the first example? I know I can force numerical evolution using N(%), but I don't understand why I have to.

php – Group and Add Material Quantities by Name

I have a system where we store material names that are linked to a unique number. This is because each unique number is a part number and carries their respective materials to produce it, what I am looking to do is a summary of materials that I would carry in general. At the moment I list part number by part number describing the materials that each one carries, but instead, I seek to group all the materials that are called the same and add their respective quantities.

Currently I have the system like this:
As you can see each Unique Number (List on the right) contains a small list of materials, which are repeated in each plan, I seek to make a general list, where only all materials that are called the same are shown and add the amounts that There is in each unique number.
enter image description here

This is the code I have to generate the list of Materials:

query("SELECT planos_de_ot.*, AS nuevoid FROM planos_de_ot INNER JOIN lista_planos ON lista_planos.num_unico = planos_de_ot.plano WHERE planos_de_ot.id_ot = ".$id." ORDER BY id");


    query("SELECT * FROM materiales_planos WHERE id_plano = ".$lista('nuevoid').""); ?>
  • -

    Nombre Material Cantidad

These are the tables in my database:
-Table Work Orders
enter image description here

-Table where I keep the Unique Numbers that will be used for the Work Order
enter image description here

-Table where I keep the materials of each plane
enter image description here

do not save quantities after updating in li block gutenberg

I don't speak English well so
I have a problem with the quantities saved li (ul) in the edit gutenberg function.
please help me, how to save li amounts and not miss the update page


const {
Rich text,
} = wp.editor;
const {PanelBody, IconButton} = wp.components;
registerBlockType (& # 39; ha-accordion / ha-accordion-box & # 39 ;, {

//built-in attributes
title:'منو آکاردئون',
description:'منو آکاردئون توضیحات دوره و محصول',
//custom attributes




//custom function


    function onChangeAcc_Title(newAcc_title){
        setAttributes({acc_title: newAcc_title});
    function onChangeAcc_Des(newAcc_des){
        setAttributes({acc_des: newAcc_des});
    function onChangeAcc_List(nextAcclist){
    setAttributes({acclist: nextAcclist});
عنوان جلسه / دوره / فصل خود را وارد نمایید
توضیحات جلسه / دوره / فصل خود را وارد نمایید
عنواین / فهرست های هر جلسه / دوره / فصل خود را وارد نمایید
)); }, save(){ }

}); theory: some quantities associated with Hopf algebras of finite dimensions

leave $ (H, Δ, m, s) $ Be an algebra of Hopf. you this hopf algebra can be associated two obvious linear maps $ T_H, S_H: H a H $ with $ T_H = m circ Delta, S_H = s $.

Are there two Hopf algebras of finite dimensions? $ H, H & # 39; $ which are not isomorphic Hopf algebras but are equivalent in the following sense:

Each characteristic polynomial coefficient $ Det (T_H- lambda I) $ is equal to the corresponding coefficient of $ Det (T_ {H & # 39;} – lambda I) $. Similarly, each coefficient of $ Det (S_H- lambda I) $ is equal to the corresponding coefficients in $ Det (S_ {H & # 39;} – lambda I) $.

In other words, to what extent the set of these coefficients can determine the nature of Hopf algebras.

Are there two finite groups? $ G, G & # 39; $ of the same orders that are not isomorphic groups but their corresponding Hopf algebras $ CG, CG & # 39; $ Do you have the same amounts described above?

Printing – Small format printers in large quantities.

I am considering setting up my own photo printing application, I see a lack of competitive services that offer an API to use, so I am investigating doing it myself.
I have seen this printer: I am not sure what alternatives exist or even what should be looking for. Basically, I want a printer that can print large runs of good quality photos at a competitive price.

r – It is necessary to separate the records with a column of QUANTITIES in individual records where QUANTITY is always 1

I have a data set with 82147 obs and 36 variables and I need to find the 200 main levels of the "Description" column with the highest frequency, but there is a column of AMOUNTS in the data set, so even though I am finding the highest levels "Description:" I do not get a real image of the elements that are repeated more frequently, since each record also includes a QUANTITY that is not 1.

Top20InvDesc <- names (sort (summary (as.factor (Inventory $ Description)), decreasing = T)[1:20])

I have tried this and continue browsing the Internet to know how to do it, but I also do not know how to correctly formulate this question, so I am seeing many similar things, but none of that is what I need.

Top20InvDesc <- names (sort (summary (as.factor (Inventory $ Description)), decreasing = T)[1:20])


library (dplyr)
group_by (Description)%>%
top_n (5, quantity)

Let's say that a "syringe" is one of the levels in the "Description" column and is the most repeated level, but each record has a AMOUNT OF 5. There is also a level of "gloves" in the "Description" column and it is the fifth most repeated level, but the AMOUNT is 1000 for each one. I know that "gloves" should be the first item in the new data framework I'm trying to make, but I can not figure out how to get my code to do this. The easiest way that I can think of to solve my problem is to create a new data frame in which each item appears as QUANTITY 1 and only use the 20 main elements.

What I am receiving





What I want to get and the Armboard will now appear in the list 32 times.





My laptop has a 32 GB memory and a 180-watt power supply, so I thought I'll have to deal with the persistence processing time, but this will also make it much easier to work with the data.