Magento 2, How to avoid the automatic update / recharge of the billing address, while adding information to the fields in the new billing address?

Magento 2, How to avoid the automatic update / recharge of the billing address, while adding information to the fields in the new billing address?

Magento 2.3.1 after adding watermark product image disappears

I am using Magento 2.3.1. After adding the watermark, the product images disappear.

magento2 – Magento + ElasticSearch does not show search results

Before enabling ElasticSearch, the search bar gave me a list of matching categories, products, and blog posts. And when I press enter, the search results page will contain the matching products.

After enabling ElasticSearch, search term suggestions are displayed, but the results page does not contain products. Interestingly if I do an "advanced search" (/ catalogsearch / advanced) I get the results I would expect.

I am using Magento 2.3.4 with ElasticSearch 6.8.7.

I have done the following on my test server to try to diagnose the problem:

  • Configured and configured ElasticSearch.
  • Configured Magento according to the Magento documentation, I get the message "Successful! Try again?" button
  • Run bin / magento indexer: reindex
  • I installed kibana to make sure I can see and search the data in ElasticSearch, yes I can.
  • Changed to the luma theme to remove the theme as the problem.
  • Log files were checked to see if there is a new error message (error, exception, system). No messages were generated by searching in addition to the access log messages.

If anyone has any suggestions or advice, I would really appreciate it.

Thank you,
Brian

cli – Magento 2 Missing required argument $ areaCode of Magento Framework App Area

I am using CLI to run a custom module, which generates a custom sales report.

It has been working fine, but suddenly failed with the error Missing required argument $areaCode of MagentoFrameworkAppArea for those orders that have the & # 39; closed & # 39; status.

How can I fix this error?

I am using Magento2.2.7

permissions – chcon -R -t httpd_sys_rw_content_t / var / www / html / magento / SAFE?

To fix a problem in Magento I found this solution here on Stackexchange:

Soltuin StackExchange

I used this command line in Putty:

chcon -R -t httpd_sys_rw_content_t /var/www/html/magento/

So after that, you could fix the problem.

But I'm a little worried since the command line changed a lot of permissions to 777, right?
Isn't this very insecure for hackers? Shouldn't I somehow undo this with the default permissions?

John

magento2.3 – magento 2 – email template store scope setting to & # 39; subscribe to newsletter & # 39;

I have a store with two websites and storeview. Let's say

Website = 1 and 2

Store view = 5 and 6

Storeview 6 is not directly visible and only registered customers will access it when they log in.
Customers use an option to register on website 2 and access storeview 6 on website 1 with storeview of 5.

In

customer/account/create/

I have a couple of additional fields and when the user completes them I will assign that user to website 2 and store view 6.

Users will receive related emails based on website and store view and everything works fine except Success email template for subscribe to the newsletter.
enter the image description here

the correct email template is always sent from website1 storeview5.
I checked the administrator settings and the templates are configured correctly in the store settings-> customer-> newsletter.

Additionally, the customer will receive the correct email template after registration if they subscribe by logging into their account.
enter the image description here

So it is not a problem with administrator settings.

I looked in the newsletter module archives and here

vendor/magento/module-newsletter/Model/Subscriber.php

in the method

public function sendConfirmationSuccessEmail ()

seems to be the one who sets up the store

        $this->_transportBuilder->setTemplateIdentifier(
        $this->_scopeConfig->getValue(
            self::XML_PATH_SUCCESS_EMAIL_TEMPLATE,
            MagentoStoreModelScopeInterface::SCOPE_STORE
        )
    )->setTemplateOptions(
        (
            'area' => MagentoFrameworkAppArea::AREA_FRONTEND,
            //'store' => $this->_storeManager->getStore()->getId(),
            'store' => 6,
        )
    )->setTemplateVars(
        ('subscriber' => $this)
    )->setFrom(
        $this->_scopeConfig->getValue(
            self::XML_PATH_SUCCESS_EMAIL_IDENTITY,
            MagentoStoreModelScopeInterface::SCOPE_STORE
        )
    )->addTo(
        $this->getEmail(),
        $this->getName()
    );

for tests purpose I manually commented the

& # 39; store & # 39; => $ this -> _ storeManager-> getStore () -> getId (),

and set id to 6. But it doesn't work. When I sign up, I keep getting 5 website templates and 5 store view.

BTW, the $ customer-> getStoreId () has the correct id of my desired site (2) and storeview (6). So it is not a problem with websiteId / StoreId of $ customer.

Does anyone have any idea why this happens? Is that identification established elsewhere?

magento2.3 – Magento 2: custom file attribute for the administrator user who does not save the file

I have created 2 attributes for the manager used 1: simple input 2: file upload.
simple input works fine, but for file one I cannot save the file in the folder where I can see the file name in the database

Below is the code from Main.php:

namespace VendorModulePluginBlockAdminhtmlUserEditTab;

use MagentoBackendBlockWidgetForm;

class Main extends MagentoUserBlockUserEditTabMain
{


    /**
     * Get form HTML
     *
     * @return string
     */
    public function aroundGetFormHtml(
        MagentoUserBlockUserEditTabMain $subject,
        Closure $proceed
    )
    {
        /** @var $model MagentoUserModelUser */
        $model = $this->_coreRegistry->registry('permissions_user');
        $form = $subject->getForm();
        if (is_object($form)) {
            $fieldset = $form->addFieldset('cus_fieldsetname_code', ('legend' => __('Authorization Code')));
            $fieldset->addField(
                'custom_column',
                'file',
                (
                    'name' => 'custom_column',
                    'label' => __('Custom Column'),
                    'id' => 'custom_column',
                    'title' => __('custom_column'),
                    'required' => false,
                    'note' => 'Custom column '
                )
            );


            $fieldset->addField(
                'bio',
                'textarea',
                (
                    'name' => 'bio',
                    'label' => __('Bio'),
                    'id' => 'bio',
                    'title' => __('bio'),
                    'required' => false,
                    'note' => 'Bio'
                )
            );





             $form->addValues(
                (
                    'bio' => $model->getData('bio'), 
                    'custom_column' => $model->getData('custom_column')
                )
            );
             $subject->setForm($form);
         }
         return $proceed();
    }
} 

One page payment: Magento 1.9 does not redirect customer to success page after successful order

I am facing a strange problem. I am working on magento 1.9.
Sometimes, after a successful order, the customer is not redirected to the success page, this happens not on all orders, maybe 1 out of 5.
after diagnosing the problem I discovered that in

core/Mage/Checkout/controllers/OnepageController.php

there seems to be no getLastSuccessQuoteId () as shown in the images below

I was thinking it might happen due to redis, but I'm not sure. Has anyone faced a similar problem before or have an idea on how I can solve this problem? Thank you 🙂
Screenshot 2020-03-31 at 22.05.47.png

strong textenter the image description here

How can I add my custom url to rewrite the url in Magento 2?

I have my controller https://local.mysite.com/brand/products/10 where 10 It is the brand identification, which works well.

How can I create a URL rewrite for the above for https://local.mysite.com/brand/products/mybrandcode.html?

How to filter magento 2 in the list of administrator invoices based on the customer's email?

enter the image description here

How to filter magento 2 in the list of administrator invoices based on the customer's email?
I try to run core modules but it doesn't work.