magento2.3 – getList method of repository and CollectionProcessor

I am working on Magento 2.3 and I am struggling with implementing getList () method, specifically with collectionProcessor.

I have read devdocs (https://devdocs.magento.com/guides/v2.3/extension-dev-guide/searching-with-repositories.html) but I have found little of the code base that follows the documentation.

Explain collectionProcessor and how it should be implemented in the getList () method for a custom model. Code examples a bonus.

magento2.3: the module to show the shipping fee on the product page only works after adding the product for the first time

I am developing a module to show the shipping fee on the product page, I followed this link: https://magento.stackexchange.com/a/299107/85869.

(Short question)
When I request a quote for the first time, it doesn't work as expected, but when I add any product to the cart, it works normally!

First request in anonymous session

After adding any product to the cart:

Second request after adding any product

(What I tried πŸ™‚
In postman (same behavior)
If I use the header cookie with value PHPSESSID (only PHPSESSID no other cookie value is needed anymore), of course it doesn't work the first time, if I keep it as is and go to browser and add product to cart it works too in postman.

I am using a Third Party Module to calculate shipping to Brazil (the only one I will use in the store, once it is only sold to Brazil):
https://bitbucket.org/imagination-media/correios/wiki/Home
IDK, this problem only occurs with that module

Cookies in the browser:
First request:
Firefox, first request

Second request: (from now on, using PHPSESSID value, it works even in Postman)
Firefox, second request

I can put my module on github, someone what to test it (just let me know)

magento2.3 – Magento 2.3 and pwa studio: How can I access another store to update data or get data other than the default store?

The store is made up of different websites with multiple stores and multiple store views.

I'm developing a functionality to get the view of the particular store depending on the customer's location and get their product catalog with prices.

But when I am going to get the current store info, I am always in the default store using GraphQL query,

  • How could I get the information from any other store or set values ​​in a different store?

  • Is there a GraphQl query or can I make a request to the Rest API to change the store to get the products of a store using the store id or store code?

How to get the customer's address in formatted form and print it – Magento2.3

enter the image description here

How to get the customer address as above format and how to print it, if there is more than one customer address, how to get the particular customer address.

Thanks in advance :]

magento2.3 – Free shipping for specific weight calculation categories

I am using Magento v2.3.4 and trying to create a free shipping shopping cart rule that will grant free shipping for products in specific categories if the order amount exceeds $ 75.00.

The rule is working, but when I add a product from a category that shouldn't receive free shipping, it is calculating the shipping cost based on the weight of all the products in the cart (including those that should receive free shipping) and I would just like will charge shipping based on the weight of products that do not belong to the free shipping categories.

I have the rule settings as follows

In the conditions tab:

If ANY  of these conditions are TRUE :

    Subtotal (Excl. Tax)  equals or greater than  75.00

Under the actions tab

If ALL  of these conditions are TRUE :

    Category  is one of  82,84

Free Shipping: For Matching Items Only 

magento2.3 – Query at Inventory_stock_1 incredibly slows down the catalog and product page

In a store running magento 2.3.1 with 30k products, we found this query which incredibly slows down the catalog and the product page:

487.85ms    SELECT `inventory_stock_1`.`quantity`, `inventory_stock_1`.`is_salable` FROM `inventory_stock_1` WHERE (sku = 'XXX-YYY-ZZZ')

if we execute the query directly in the database, it takes 0.x seconds!

How to avoid this problem?

magento2.3 – Allow small text in db_schema.xml magento 2

I am doing a custom migration from Magento 1.9 to Magento 2.3.4, in one of the custom modules in Magento 1.9 it uses tinytext as the table column type, therefore I tried to recreate this module using tinytext also to successfully migrate the data without causing an incompatible database table column type.


but I always got an error like this:

Element & # 39; column & # 39 ;, attribute
& # 39; {http://www.w3.org/2001/XMLSchema-instance} type & # 39 ;: the QName value
& # 39; tinytext & # 39; the xsi: type attribute does not resolve to a type
definition.

magento2.3 – Magento2 shipment is not created after successful Paypal payment

In our magento 2.3.3 after the order paid and paid through Paypal.
The order has a status of Complete.
The invoice has the status Paid automatically.
But the submission is not created, error in the log file:
(2020-03-25 07:19:47) main.ERROR: SQLSTATE (23000): Integrity constraint violation: 1452 Unable to add or update a secondary row: a foreign key constraint fails (tuerenmeile2.sales_shipment, RESTRICTION SALES_SHIPMENT_ORDER_ID_SALES_ORDER_ENTITY_ID EXTERNAL KEY (order_id) REFERENCES sales_order (entity_id) WHEN ELIMINATING A WATERFALL), the query was: INSERT IN sales_shipment (store_id, total_qty, customer_id, shipping_address_id, billing_address_id, increment_id, packages) VALUES (?, ?, ?, ?, ?, ?, ?) () ()

What does that mean?

magento2.3: all buttons in a store redirect to the page not found

I am using a multiple store.

The first store works perfectly but the second one has a problem.

when we click a button (add to cart, create account, contact)
redirect to page & # 39; error 404 & # 39; Not found.)

It is not the first time that I create a multiple store, but I never had this error.

I specify that I am using magento 2.3.2 (it was 1.9 before migration), php 7

Please help

magento2.3: SQL error when changing page number to large number

I have a strange problem. Every time I change the page number to some non-existent page number, the system throws sql error.

For example http://domain.com/category.html?p=1 works as expected but when I change it to http://domain.com/category.html?p=100 then it throws under the error. Only in that category 1-5 Available pages.

SQLSTATE (42000): Syntax Error or Access Violation: 1064 Has a
error in your SQL syntax; consult the manual that corresponds to your
MySQL server version for correct syntax to use near & # 39;) ASC & # 39; online
4, the query was: SELECT e. *, price_index.price,
price_index.tax_class_id, price_index.final_price,
IF (price_index.tier_price IS NOT NULL, LESS (price_index.min_price,
price_index.tier_price), price_index.min_price) AS minimal_price,
price_index.min_price, price_index.max_price,
price_index.tier_price, IFNULL (review_summary.reviews_count, 0) AS
reviews_count, IFNULL (review_summary.rating_summary, 0) AS
rating_summary, stock_status_index.stock_status HOW is_salable
SINCE catalog_product_entity HOW e UNITE INTERNALLY
catalog_product_index_price HOW price_index IN
price_index.entity_id = e.entity_id AND price_index.website_id = & # 39; 1 & # 39;
And price_index.customer_group_id = 0 LEFT JOIN
review_entity_summary HOW review_summary ON e.entity_id =
review_summary.entity_pk_value AND review_summary.store_id = 1 AND
review_summary.entity_type = (SELECT review_entity.entity_id SINCE
review_entity WHERE (entity_code = & # 39; product & # 39;)) INNER JOIN
cataloginventory_stock_status HOW stock_status_index ON e.entity_id
= stock_status_index.product_id WHERE ((stock_status_index.stock_status = 1) AND (e.entity_id IN (NULL)))
And (e.created_in <= 1) AND (e.updated_in > 1) SORT BY
FIELD (e.entity_id,) ASC

As you can see some SQL missing later FIELD(e.entity_id,. This is how it should be:

SELECT e. *, price_index.price, price_index.tax_class_id,
price_index.final_price, IF (price_index.tier_price IS NOT NULL,
LESS (price_index.min_price, price_index.tier_price),
price_index.min_price) AS minimal_price, price_index.min_price,
price_index.max_price, price_index.tier_price,
IFNULL (review_summary.reviews_count, 0) AS reviews_count,
IFNULL (review_summary.rating_summary, 0) AS rating_summary,
stock_status_index.stock_status HOW is_salable SINCE
catalog_product_entity HOW e UNITE INTERNALLY
catalog_product_index_price HOW price_index IN
price_index.entity_id = e.entity_id AND price_index.website_id = & # 39; 1 & # 39;
And price_index.customer_group_id = 0 LEFT JOIN
review_entity_summary HOW review_summary ON e.entity_id =
review_summary.entity_pk_value AND review_summary.store_id = 1 AND
review_summary.entity_type = (SELECT review_entity.entity_id SINCE
review_entity WHERE (entity_code = & # 39; product & # 39;)) INNER JOIN
cataloginventory_stock_status HOW stock_status_index ON e.entity_id
= stock_status_index.product_id WHERE ((stock_status_index.stock_status = 1) AND (e.entity_id IN (NULL)))
And (e.created_in <= 1) AND (e.updated_in > 1) SORT BY
FIELD (e.entity_id, NULL) ASC

It seems NULL He is lost.

Deferred image: enter the image description here

Magento 2.3.3 with elasticsearch 6+

Any ideas why this happens? What section should I check to fix this?