how to get quote id before ordering M2

Am I struggling to find what event should I use to get the appointment ID?
I want to save some data in db, do I want to save the client session ID and the quote ID before placing an order?

Can anyone suggest which one should I use?

magento 1.9 – An efficient method to load / obtain and assign multiple options / custom attributes from the quote element?

Is there a more efficient way to load and assign custom options / attributes of quote elements?

This is the code in my observer:

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

magento2.2 – Get quotes and quote items using Magento 2 SOAP API

I'm working with Magento 2 Rest API (for an abundant cart) and I have problems with quotes, I can get all the quotes (with the desired filters, is_active = 1, items_count> 0)
using API:

/ rest / V1 / cars / search

and its articles

/ rest / V1 / carts /: quoteId / items

Now, the problem is in certain quotes that no items return, although when I check the quote_item table I could see that there are items there.

And when I check the total quote using:

/ rest / V1 / carts /: quoteId / totals

returns the desired results.

Now I am a little confused about how appointments work and I have the following questions:

1 – Why the Quotation elements returned through the API are different from the elements in the Database.

2 – Why do some quotes return items using / rest / V1 / cars / search and some appointments, no?

3 – A strange case that I have found is that, a quote has 4 articles 3 articles converted to order and 1 article does not convert. However, when I see the contribution totals, it gives value to the 4 items.

android – Identify error "E / MediaPlayer: error" generated by VideoView

I'm working with a VideoView in a Fragment that plays a list of IP channels. I would like to know if I can identify the errors that generate the VideoView As seen in the Log:

enter the description of the image here

Is there any way to identify or capture them to be able to take action when they appear?

So I am using the VideoView:

VideoView videoView = (VideoView) view.findViewById (R.id.videoViewTV);
videoView.setVideoURI (Uri.parse (url));
videoView.requestFocus ();
videoView.start ();

Can anyone give me a single quote from Representative Ilhan Omar who has explicitly attacked Jews, Judaism or where he said Israel does?

Just read their tweets. She clearly hates Israel. She calls Israel an apartheid regime, and says things like this:

"Israel has hypnotized the world, may Allah awaken people and help them see the evil deeds of Israel. #Gaza #Palestine #Israel"

https: //twitter.com/ilhanmn/status/10022 …

Virtually every Tweet sounds as if you are gathering your followers and trying to ask for a Jihad! And then he has the nerve to say: "Attacking Israel (a Jewish state) is not attacking the Jews." Really? Because everyone is Jewish there, and she was clearly making a religious attack by her own religious reference to "Allah" against them in her Tweet.

In fact, the name of the country, "Israel" means the Jewish people, or the descendants or followers of Jacob. The patriarch Jacob was given the name of Israel after he "fought with the angel." The descendants of Jacob became known as the Israelites, eventually forming the tribes of Israel and, ultimately, the kingdom of Israel, whence came the modern state name of Israel.

Go, look at all the anti-Semites here tonight.

Unfortunately, I'm not so surprised. Shalom Aleichem

.

Web application: Is XSS possible within the value field of the input label when the double quote is filtered?

Is it possible to get XSS in the value field of the input tag when the application filters two quotes?


the entry of the request goes into the value field, so I tried to close it with " and give a charge like "accesskey =" X "onclick =" alert (1) " but " it is filtered

So, any possible XSS vector in this scenario?

Quote from the software library attributable to Michael A Jackson?

While discussing modular software, a colleague recently suggested that the following quote (or similar words) is attributable to computer scientist Michael A Jackson. However, I can not find any reference to him on the Internet and I was wondering if anyone could point me to any of Jackson's works that contain it.

A library of software modules is the only type of library in which
Everyone wants to put something, and nobody wants to take something.
outside.

mysql – How to escape from a single quote within a string of double quotes in the bash script?

I am trying to execute the following bash code:

#! / bin / bash
export DEBIAN_FRONTEND = non-interactive

DB_USER = & # 39; abc & # 39;
DB_USER_PASSWORD = & # 39; 123 & # 39;
DB_MAGENTO = & # 39; db_magento & # 39;

sudo apt-get update
echo debconf mysql-server / root_password password $ DB_USER_PASSWORD | sudo debconf-set-selections
echo debconf mysql-server / root_password_again password $ DB_USER_PASSWORD | sudo debconf-set-selections
sudo apt-get -qq install mysql-server> / dev / null # Install MySQL silently
sudo mysql -uroot -p123 -e "CREATE SCHEMA $ {DB_MAGENTO} CONFIGURATION OF DEFAULT CHARACTERS utf8; SHOW DATABASES; * TO  & # 39; $ {DB_USER}  & # 39; @ & # 39; localhost & # 39 ;; FLUSH PRIVILEGES; SELECT Host, User, Password FROM mysql.user; "

The error that I am receiving is ERROR on line 1: unknown command & # 39; & # 39; & # 39;
It seems to be related to & # 39; $ {DB_USER} & # 39; .

How to escape from these simple quotes correctly?

Magento1 Add new comuns in the quote table

I have added 4 new columns of product attributes in my sales_flat_quote_item now if I add product, the value in this column will be according to the attribute of the product, how I achieve that with good code practice.

magento2 – quote getAllItems returns an empty array

    public function getItems () {
$ a = array ();
$ customerId = null;
$ userType = GroupInterface :: NOT_LOGGED_IN_ID;
$ isGuest = true;
$ quote = null;
if ($ this-> isLoggedIn ()) {
$ customerId = $ this-> userContext-> getUserId ();
$ isGuest = false;
$ quote = $ this-> cartObj-> getQuote () -> loadByCustomer ($ customerId);

}
plus{
$ quote = $ this-> cartObj-> getQuote ();
$ quote-> setCustomerGroupId (GroupInterface :: NOT_LOGGED_IN_ID);
}
$ quote-> setCustomerIsGuest ($ isGuest);
$ items = $ quote-> getAllItems ();
foreach ($ items as $ item) {
array_push ($ a, $ item-> getData ());
/ * $ a[$i]['ProductId']    = $ item-> getProductId (); * /
}
// array_push ($ a, $ items);
returns $ a;
}

this code returns the empty result, even the cart is not empty and when I call

        $ quote-> getItemsCount ();

it gives me back 4

Why does this happen