magento2 – custom attribute on the product The filtered result is always one in magento 2

I added a custom attribute to the product, this for learning purposes, so I added it with the name "brand2".

I just updated the value of 4 brand2 products for Adidas:

But unfortunately, in the main store, he only shows one product for Adidas:

enter the description of the image here

A displayed after clicking on Brand2-> Adidas:
enter the description of the image here

My question is how to display 4 adidas shorts on the result of the search done in a store.

magento2 – Impossible for Magento 2.3 to send mail server configuration

I'm using Magento 2.3, I'm trying to send a mail but unfortunately I can not send mail. An error has occurred.

Can not send mail: unknown error to
/home/public_html/proj/vendor/zendframework/zend-mail/src/Transport/Sendmail.php:305) "}
[]

then I use Hostgator Server. Is there anything configured on the server side? because I've tried mageplaza smtp module, he says that the mail was sent successfully, but I did not receive any mail

How can I fix that?

magento2 – Note: undefined index: magento_eav_attribute_set in / vendor / magento / framework / Setup / Declaration / Schema / Db / SchemaBuilder.php at line 152

bin / magento configuration: upgrade


Notice: Undefined index: magento_eav_attribute_set in /vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php on line 152.

If I understand correctly, it is a question of missing a table in the database, but how to check if an application can use it, because, honestly, I do not know how to look for it or what this table should look like.

Oh yes, we did it configuration: di: compile and reindex, nothing makes it

which is the xampp compatible version of this magento-CE-2.3.1 magento

which is the xampp compatible version of this magento version Magento-CE-2.3.1-2019-03-18-06-24-49 (1)

magento2 – Magento 2 – Calling a member function getId () on null, admin user ID

I have a custom module and it works perfectly in the past, and now I have it installed on a new Magento 2 project.

and then I add the data module example, and then configuration: upgrade I receive this error:

Calling a member function getId () on null

and exactly on this line:

$ this-> session-> getUser () -> getId ()

session is a variable of Magento Backend Model Auth Session

is there a solution?

Magento 2, Get the invoice identifier in shipping conditions DHL Carrier model

I have the obligation to attach the ID and the invoice date to the ShipmentRequest (xml) located in /magento/dhl/model/Carrier.php.

Is there a way to recover the invoice ID associated with this shipping request?

magento 1.9 – Problem of editing static blocks during the recording

I have 1.9.0.3 Magento website, everything was fine, website has not been changed in a year and when I tried to edit an existing static block and save or save and continue editing, I am returned to the CMS / Static Blocks panel and no changes are made.
This allows me to create a new static block, but the same thing happened when copying the paste code from an old existing block.
What I noticed when I play with blocks when I copy / paste the code of an existing block into a new block, for example:

 

Can not save the newly created block. When I delete the word "style", everything is ok and the lock is saved. This happens with all lines with "style". The code is not correct without "style" but the lock is saved.
I've emptied everything, deleted cache, the same thing happened.
In system.log, I found an error that repeats 20 times a day in the last 12 months:

2019-05-20T16: 27: 25 + 00: 00 ERR (3): Warning: Invalid argument provided for foreach () in / home / fedorsoaps / public_html / app / code / local / Smartwave / Socialfeeds / Helper / Data. php at line 79

And, line 79 in Data.php is:

    79 for each ($ doc-> getElementsByTagName (&) -> item (0) -> childNodes as $ child) {
$ raw = $ doc-> saveXML ($ child);
$ li = preg_replace ("/]+ > / i "," ", $ raw);
$ peopleList[$i] = preg_replace ("// i "," ", $ li);
$ i ++;

In the meantime, the website is functioning normally but I can not make any changes.
I'm not an encoder, just a basic Magento installer, thanks for any help.

price – Magento 2 Assign the client group name to an externally calling JavaScript file variable

Preconditions:

  • MageVersion – Magento 2.3.x
  • External JavaScript – http://domain.com/external-js.js

    var mage_customer_group = & # 39 ;;
    // other code related to the customer group

  • Pages – Category Page and Custom Product Listing Page (External JavaScript manages the product list with simple AJAX help)

Get the name of the customer group by replacing customer section updates and save to the mage-cache-storage (localstorage).

https://devdocs.magento.com/guides/v2.3/extension-dev-guide/cache/page-caching/private-content.html

Customer Data Management in Magento 2

In external-js.js file, the third-party provider has the logic of sending prices and other information based on the name of the customer group.
For now, the product name, image, link and price of the product are correct.
The problem occurs only when the product or category list page custom loads the value of mage_customer_group becomes empty value.

When you look at the network console, first call external JavaScript (http://domain.com/external-js.js), and then update the client section.

Is there a way in KnockOut to link client properties to an external JS?

How to choose between Magento, Salesforce, Hybris and Shopify?

You have the choice of many e-commerce platforms tailored to your specific needs. So, how to choose the right platform? Read a comparison of the most popular – Magento vs Shopify vs. SAP Hybris Commerce vs Salesforce and make your choice!

Magento Commerce
There is a lot of advantages use Magento.
And the first is Flexibility. It offers more flexibility in terms of offering products in several colors, …

How to choose between Magento, Salesforce, Hybris and Shopify?

magento2 – matrix converted to Magento 2 collection

I have 2 collection 1 is $ bestsalecollection that shows in the dashboard. the second is the collection of products.
After collecting the filter when I return, generates an error Calling a member function isLoaded () on array

Please, help me to tell how to convert an array of filters into a magento collection?

Thank you

    $ bestsalecollection = $ this -> _ collectionFactory-> create () -> setModel (
 Magento  Catalog  Model  Product :: class
) -> addStoreFilter (
$ storeId
)
$ productCollection = $ this-> productcollectionFactory-> create ();
$ sellercollection = $ productCollection-> addFieldToFilter (& # 39; current_user_id & # 39 ;, array (& # 39; eq = 1));
$ filter_product =[];

foreach ($ sellercollection as $ allProduct) {
foreach ($ bestsalecollection as $ bestSale) {
if ($ allProduct-> getEntityId () == $ bestSale-> getProductId ()) {
$ filter_product[]= $ bestSale;
}
}
}
$ this-> setCollection ($ filter_product);
return parent :: _ prepareCollection ();