magento2 – Magento 2 recommends an approach to apply patches

Until now you had to apply patches through the command line. It bothers me that there is no version control for this, since in some cases the content of the provider's folder is changed, which is ignored. More for the responsibility with the time and date of the change instead of the ability to reverse. But then I came across this article.

https://support.magento.com/hc/en-us/articles/360005484154-Create-a-patch-for-a-Magento-2-Composer-installation-from-a-GitHub-commit

It is difficult to calibrate from this article. Is this the recommended approach to apply patches? Or is there another method?

magento2 – Magento 2 passes data from the html template to the phtml file

file So far I have created MyModule / ProductAlert / view / frontend / email / stock.html






{{template config_path = "design / email / header_template"}}

{{var alertGrid | raw}

{{template config_path = "design / email / footer_template"}}

And I would like to transmit my variables email a .phtml file in
MyModule / ProductAlert / view / frontend / templates / email / stock.phtml and call it there

    

    getProducts ()):?>
        
            

Your e-mail: getData (& # 39; email & # 39;)?>

// Email should be here

Currently, he returns nothing to me. How can I achieve that? Thank you!

magento2 – Magento 2 product alert Cancel subscription url does not work

I have extended Magento_ProductAlert Module so that users can subscribe to the product by email (this means that also the invited users can subscribe). Until everything works. And now I have problem with Drop out url, when you click on it – nothing happens. After checking the code in /vendor/magento/module-product-alert/Controller/Unsubscribe/Stock.php it gets it based on the customer's identification, but in my case I do not have the customer's identification, I only have email, since the guests can also subscribe to the product.

How can I get the user's email in Cancel subscription to the URL? Currently add the product ID in url, you want to add the user's email also there and then get it by getParam and check if that email exists in the database and if it exists for the current product, then delete it from the table. Or maybe there is some better solution?

magento2 – Magento 2 delete specific product categories

How can I delete specific categories for a product in Magento 2.Forex: do I have a product with categories a, b, c? I have some conditions if the conditions meet my categories remain the same, but if those conditions fail, I must remove b the category only not a, c categories. How can I achieve that?

magento 2.1 – How can I send the data of my form in the personalized table magento2?

Stack exchange network

The Stack Exchange network consists of 175 question and answer communities including Stack Overflow, the largest and most reliable online community for developers to learn, share their knowledge and develop their careers.

Visit Stack Exchange

magento2 – How did you resolve this error during installation magento 2?

[ERROR] Magento Framework Setup Exception: the state for the same indexer already exists. in C: xampp htdocs magento vendor magento framework Setup Patch PatchApplier.php: 167 Tracking the stack: # 0 C: xampp htdocs magento setup src Magento Setup Model Installer .php (1002): Magento Framework Setup Patch PatchApplier-> applyDataPatch (& # 39; Magento_Indexer & # 39;) # 1 C: xampp htdocs magento setup src Magento Setup Model Installer.php (874): Magento Setup Model Installer-> handleDBSchemaData (Object (Magento Setup Module DataSetup), & # 39; data & # 39 ;, Array) # 2 [internal function]: Magento Setup Model Installer-> installDataFixtures (Array) # 3 C: xampp htdocs magento setup src Magento Setup Model Installer.php (367): call_user_func_array (Array, Array) # 4 C: xampp htdocs magento setup src Magento Setup Controller Install.php (109): Magento Setup Model Installer-> install (Array) # 5 C: xampp htdocs magento provider zendframework zend-mvc src Controller AbstractActionController.php (84): Magento Setup Controller Install-> startAction () # 6 [internal function]: Zend Mvc Controller AbstractActionController-> onDispatch (Object (Zend Mvc MvcEvent)) # 7 C: xampp htdocs magento vendor zendframework zend-eventmanager src EventManager.php (490): call_user_func (Matrix, Object (Zend Mvc MvcEvent)) # 8 C: xampp htdocs magento vendor zendframework zend-eventmanager src EventManager.php (260): Zend EventManager EventManager-> triggerListeners (& # 39; dispatch & # 39 ;, Object (Zend Mvc MvcEvent), Object (Closure)) # 9 C: xampp htdocs magento vendor zendframework zend-mvc src Controller AbstractController.php ( 118): Zend EventManager EventManager-> triggerEventUntil (Object (Closure), Object (Zend Mvc MvcEvent)) # 10 C: xampp htdocs magento vendor zendframework zend-mvc src DispatchListener.php (118): Zend Mvc Controller AbstractController-> dispatch (Object (Zend Http PhpEnvironment Request), Object (Zend Http PhpEnvironment Response)) # 11 [internal function]: Zend Mvc DispatchListener-> onDispatch (Object (Zend Mvc MvcEvent)) # 12 C: xampp htdocs magento vendor zendframework zend-eventmanager src EventManager.php (490): call_user_func (Array ), Object (Zend Mvc MvcEvent) # 13 C: xampp htdocs magento vendor zendframework zend-eventmanager src EventManager.php (260): Zend EventManager EventManager-> triggerListeners (& # 39 ; dispatch & # 39; Object (Zend Mvc MvcEvent), Object (Closure) # 14 C: xampp htdocs magento vendor zendframework zend-mvc src Application.php (340): Zend EventManager EventManager-> triggerEventUntil (Object (Closure), Object (Zend Mvc MvcEvent)) # 15 C: xampp htdocs magento setup index.php (39): Zend Mvc Application-> run () # 16 {main}

magento2 – Magento 2: How to view / implement the Magento icons from the font family & # 39; icons-blank-theme & # 39;

I am currently developing a custom theme using Magento 2.3.

I'm modifying the sidebar menu, so that its top-level elements are collapsible and an arrow appears next to them when clicked, just like in the top menu. The difference here is that, when the menu item is active and your children are visible, the arrow should point down. When it is not visible, the arrow should point to the left.

I've used grep, search and locate to try to find something related to the icons, but I have not been able to locate the set of icons that Magento uses here, so I'm not sure which code I should enter as a value in the content: field to display the left arrow.

I can see that the following style rules apply to achieve the arrows that point downwards in the top menu:

        -webkit-font-smoothing: smoothing;
-moz-osx-font-smoothing: grayscale;
Font size: 12px;
height of the line: 20px;
color: inherit;
content: & # 39;  e622 & # 39 ;;
font family: & # 39; icons-blank-theme & # 39 ;;
vertical alignment: medium;
screen: online block;
source-weight: normal;
overflow: hidden;
talk: none;
text-align: center;

I applied this style to all the elements of the sidebar that have my active class and it works. I just need to know where the file is icons-theme-white resides

EDIT:

I have found a very long-winded solution. The level1 + elements within the top menu use an arrow pointing to the right. I double checked that the arrow codes pointing to the right and down were relatively close to each other ( e608 Y e622). Then I modified the CSS value on the web page using the code inspector function of my browser and searched manually on e608-22 until I discovered the arrow code pointing to the left e617. To clarify, I do not require the code, I simply request instructions explaining how to determine what icons are available and what codes belong to them.

magento2 – Cancel shipping fees when paying

I am simply looking to get the shipping rates of the current quote and cancel them through a plugin / interceptor, but I have no idea where I am wrong here:

_logger = $ logger;
$ this -> _ customerSession = $ customerSession;
}

public function beforeSetPrice ($ subject, $ price)
{
$ this -> _ logger-> debug ("The current price is". $ price);

returns $ price;
}

public function afterSetPrice ($ subject, $ price)
{
$ price = 3.33;
$ this -> _ logger-> debug ("New price is". $ price);

returns $ price;
}
}

My thought was that the beforeSetPrice () method would record the current price (which it does) and the afterSetPrice () The method would record the new price (what it does) and update the price shown in the shipping rates in the payment process (which it does not)

Magento2 requires tage breaks list.phtml page

I'm trying to make jquery work in the list.phtml file. I have jquery working on the product details page within this same tag that requires jquery. However, when I put it in the list.phtml file, it causes the whole page to load with all the misaligned problems and full of other problems in the console.

magento2 – Hide the price of the product for specific products

I am using an extension to enable the "Add to budget" option instead of "Add to cart" for some specific products.

How can I hide the price of the products "Add to quote" (attribute ves_enable_quote) and display the text "Price on request"? (according to the image below)

enter the description of the image here