How to register the client address identifier at the client level If an address is deleted on Magento2?

I do not know how to implement this task. I need to save the customer address identifier at the customer level if an address is deleted on Magento2. Could you help me please?

magento2 – Magento 2 | add terms and conditions to customer registration

I am currently trying to add terms and conditions to customer registration.
I thought it would be best to simply update the layout.

So I just extended customer_account_create.xml in my theme:




    
        
            
        
    

However, it does not show any check boxes.

Any idea why?

Thanks in advance!

magento2 – I created a data fix, configuration: the upgrade never ends

I created a data fix after running the installation: the upgrade does the job but never completes the installation upgrade command.

View post on imgur.com

View post on imgur.com



the Data patch itself looks like this

setAreaCode('frontend') ;
        $this->searchCriteriaBuilder = $searchCriteriaBuilder;
        $this->_productRepositoryInterface = $productRepositoryInterface;
        $this->attributeRepository = $attributeRepository;
        $this->collectionFactory = $collectionFactory;
    }

    /**
     * @inheritDoc
     */
    public static function getDependencies()
    {
        return ();
    }

    /**
     * @inheritDoc
     */
    public function getAliases()
    {
        return ();
    }
    public function apply()
    {
          //$searchCriteria = $this->searchCriteriaBuilder->addFilter('manufacturer','LG')->create();





        $productcollection = $this->collectionFactory->create()->addAttributeToSelect('manufacturer','LG')->load();
        foreach ($productcollection as $product) {
            try {
                $this->_productRepositoryInterface->delete($product);
            } catch (StateException $e) {
            }
        }

    }

}

I tried to use return after the end of foreach but nothing happened.

magento2 – Free method is not displayed for personalized discount

I have developed a personalized discount module on the M2 payment page. It works well, but when the grand total equals 0, I cannot place an order. All methods display "This payment method is not available". The free payment option is also not displayed. In response to the final point of the payment information, I do not receive a free method. Please help me, I want to display the free method if the grand total is 0. For the free method of the magento coupon, but only for my personalized discount module, it does not display . Please help me resolve this issue.

Thanks and greetings,
Mousam

How to implement Cloudways CDN on Magento2

I have a website hosted on Amazon AWS EC2 and the domain is activated 123-reg, I pointed the domain via AMAZON Elastic IP, please see the attached image, now I want to configure CDN only for static files.
How do you do that? Should I point an entire DNS on Cloudways?

enter description of image here

magento2 – An error occurred while running the application. See the exception log for more details. during deployment

I hope you can help me!

Best regards

Joost

(2020-03-28 19:24:43) main.CRITICAL: The Magento Framework Session Config ConfigInterface Proxy class does not exist {"exception": "(object) (ReflectionException (code: – 1): Class Magento Framework Session Config ConfigInterface Proxy does not exist in /home/admin/domains/aquariumvissenwinkel.nl/public_html/dev/vendor/magento/framework/Code/Reader/ClassReader.php : 26) "} ()
(2020-03-28 19:24:44) main.CRITICAL: The Magento Framework Session Config ConfigInterface Proxy class does not exist {"exception": "(object) (ReflectionException (code: – 1): Class Magento Framework Session Config ConfigInterface Proxy does not exist in /home/admin/domains/aquariumvissenwinkel.nl/public_html/dev/vendor/magento/framework/Code/Reader/ClassReader.php : 26) "} ()
(2020-03-28 19:26:19) main.CRITICAL: The Magento Framework Session Config ConfigInterface Proxy class does not exist {"exception": "(object) (ReflectionException (code: – 1): Class Magento Framework Session Config ConfigInterface Proxy does not exist in /home/admin/domains/aquariumvissenwinkel.nl/public_html/dev/vendor/magento/framework/Code/Reader/ClassReader.php : 26) "} ()
(2020-03-28 19:26:19) main.CRITICAL: The Magento Framework Session Config ConfigInterface Proxy class does not exist {"exception": "(object) (ReflectionException (code: – 1): Class Magento Framework Session Config ConfigInterface Proxy does not exist in /home/admin/domains/aquariumvissenwinkel.nl/public_html/dev/vendor/magento/framework/Code/Reader/ClassReader.php : 26) "} ()

Magento2: How to delete products with an attribute via a mysql query

I want to remove products from the catalog with the attribute name: website1

via this request I have deleted all products:

delete from catalog_product_entity;

How to delete only the products affected with the attribute: product_from_website: website1

Anyone have a proven solution?

magento2 – Can I deactivate the Magento inventory modules?

I am having problems with the quantity of inventory compared to the salable quantity, I will not use multi-source inventory in this project, can I deactivate all Magento_Inventory modules and have no problems?

    'Magento_Inventory' => 1,
    'Magento_InventoryAdminUi' => 1,
    'Magento_InventoryAdvancedCheckout' => 1,
    'Magento_InventoryApi' => 1,
    'Magento_InventoryBundleProduct' => 1,
    'Magento_InventoryBundleProductAdminUi' => 1,
    'Magento_InventoryCatalog' => 1,
    'Magento_InventorySales' => 1,
    'Magento_InventoryCatalogAdminUi' => 1,
    'Magento_InventoryCatalogApi' => 1,
    'Magento_InventoryCatalogSearch' => 1,
    'Magento_InventoryConfigurableProduct' => 1,
    'Magento_InventoryConfigurableProductAdminUi' => 1,
    'Magento_InventoryConfigurableProductIndexer' => 1,
    'Magento_InventoryConfiguration' => 1,
    'Magento_InventoryConfigurationApi' => 1,
    'Magento_InventoryDistanceBasedSourceSelection' => 1,
    'Magento_InventoryDistanceBasedSourceSelectionAdminUi' => 1,
    'Magento_InventoryDistanceBasedSourceSelectionApi' => 1,
    'Magento_InventoryElasticsearch' => 1,
    'Magento_InventoryExportStockApi' => 1,
    'Magento_InventoryIndexer' => 1,
    'Magento_InventorySalesApi' => 1,
    'Magento_InventoryGroupedProduct' => 1,
    'Magento_InventoryGroupedProductAdminUi' => 1,
    'Magento_InventoryGroupedProductIndexer' => 1,
    'Magento_InventoryImportExport' => 1,
    'Magento_InventoryCache' => 1,
    'Magento_InventoryLowQuantityNotification' => 1,
    'Magento_InventoryLowQuantityNotificationAdminUi' => 1,
    'Magento_InventoryLowQuantityNotificationApi' => 1,
    'Magento_InventoryMultiDimensionalIndexerApi' => 1,
    'Magento_InventoryProductAlert' => 1,
    'Magento_InventoryRequisitionList' => 1,
    'Magento_InventoryReservations' => 1,
    'Magento_InventoryReservationCli' => 1,
    'Magento_InventoryReservationsApi' => 1,
    'Magento_InventoryExportStock' => 1,
    'Magento_InventorySalesAdminUi' => 1,
    'Magento_InventoryGraphQl' => 1,
    'Magento_InventorySalesFrontendUi' => 1,
    'Magento_InventorySetupFixtureGenerator' => 1,
    'Magento_InventoryShipping' => 1,
    'Magento_InventorySourceDeductionApi' => 1,
    'Magento_InventorySourceSelection' => 1,
    'Magento_InventorySourceSelectionApi' => 1,
    'Magento_SalesInventory' => 1,
    'Magento_ScalableInventory' => 1,
    'Magento_InventoryShippingAdminUi' => 1,
    'Magento_CatalogInventoryStaging' => 1,

magento2 – Magento 2 Show text with shipping option

I have created a shipping option and I would like the text to indicate if this option has been selected. Right now, it shows up under all shipping options and I want it to show up with method (not below all) if that method is selected.

enter description of image here

frontend / layout / checkout_index_index.xml



    
        
            
                uiComponent
                shippingAdditional
                
                    
                        My_Module/js/view/customjs
                        checkoutProvider
                        0
                    
                
            
        
    

js / view / customjs

define((
'uiComponent',
'ko',
'Magento_Checkout/js/model/quote'

), function (Component, ko, quote) {
"Use strictly";

return Component.extend({
    defaults: {
        template: 'My_Module/customtemp'
    },

    initObservable: function () {
        var self = this._super();
        this.showFreeShippingInfo = ko.computed(function() {
            var method = quote.shippingMethod();

            if(method && method('carrier_code') !== undefined) {
                if(method('carrier_code') === 'freeshipping') {
                    return true;
                }
            }

            return false;

        }, this);

        this.showPickUpShippingInfo = ko.computed(function() {
            var method = quote.shippingMethod();

            if(method && method('carrier_code') !== undefined) {
                if(method('carrier_code') === 'instorepickup') {
                    return true;
                }
            }

            return false;

        }, this);

        return this;
    }
});

});

web / template / customtemp.html

How can I display the information with the option when selected?

Thank you!

magento2 – Magento 2 plugins (interceptor) beforeCancel () making the order cancellation bug

I have created a plugin that intercepts the interface cancel function Magento Sales Api OrderManagementInterface, interception of the plugin before the cancel function is called.

My problem is that when my module is activated, I cannot cancel any order, nor from the page admin / sales / order / view / order_id / 10 or from the list of commands.

For example, when I click on the Cancel button, the text "You have canceled the order". is displayed but in fact the order is not canceled and always has the status "waiting".

I have a custom table that refers to sales_order table, but the attribute referencing the table has action on the delete cascade

->addColumn(
                    'sales_order_id',
                    Table::TYPE_INTEGER,
                    10,
                    ('nullable' => false,
                    'unsigned' => true),
                    'Reference to entity_id of table sales_order'
                )
->addForeignKey(
                    $installer->getFkName('my_custom_table', 'sales_order_id', 'sales_order', 'entity_id'),
                    'sales_order_id',
                    $installer->getTable('sales_order'), /* main table name */
                    'entity_id',
                    MagentoFrameworkDBDdlTable::ACTION_CASCADE
                )

But even with the action on removing cascade, before canceling an order, I delete the record that refers to the canceled order.

After canceling an order, the order is not deleted from the database and its status is canceled, so I don't understand how my module can make the function bug work 39; cancellation.

The purpose of my beforeCancel function is only to delete the record with a particular identifier from the table referencing the sales_order table and to add it to another table without reference.