magento2 – Changing the minimum length of the administrator password

I put my minimum password to 6 from the backend via

Store> Configuration> Clients> Client Configuration> Minimum Password Length

But I can not find a parameter to manage the length of the main administrator password for each configuration. I want to change the length of the main administrator password to 8.

How to call the observer before the payment page in magento2

I am working with magento2 and I now want to open the open modal box when the user clicks on the payment link.
Instead of the open payment page, it should open my custom pop box with module in magento2.
Anyone know about this please give me a suggestion.

magento2 – How is the order number wrong in ShipWorks?

I have followed this quality assurance method to customize the order number on my recent migration of Magento 2.3.1. But when ShipWorks downloads the commands, they always start 1.

The ShipWorks support team called back and she grabbed the order number field for order numbers and not increment_id, which, as we all know, is the order number in human language. Once I tested the effectiveness of updating the sales_order The primary key auto_increment of the table, I will post an answer.

magento2 – Magento 2 connection to Shipworks failed

Magento 2.3.1 can not connect to Shipworks via the REST API. The error that this gives is

The remote server returned an error: (401) not allowed.

When traced with Fiddler, the result is

{"message": "The consumer is not allowed to access% resources.", "settings": {"resources": "Magento_Sales :: actions_view"}, "trace": "# 0 / home / buyglasswoodstov / public_html / provider / magento / module-webapi / Controller / Rest / RequestValidator.php (68):

I've tried reading Magento Docs but I'm not very familiar with the REST API. Any help would be appreciated. Thank you!

magento2 – Best practices / methods to add 100,000 products in Magento 2?

I must add 100,000 products by the end of this week. Most of them are simple products, but 30% are configurable and each have 8 single products, for a total of 100,000 units.

I used Magmi (in Mage 1), which worked pretty well to import CSV files, but without an updated version for Mage 2, it seems like most people use the default import feature of the administrator. But is there a better extension that shop owners use? I have done unsuccessful research in the hope of finding a direction.

Finally, is it recommended to add products programmatically? I would prefer to go this route because I know PHP well but I'm still a little new to Magento. Can experienced store owners / developers give me advice on how best to add 100,000 products with best practices in mind? Thank you

magento2 – Triggering a text message on sales_order_shipment_track_save_after via Shipstation

I'm trying to configure a custom trigger so that when Shipstation writes, it sends a text message via Twilio. I make it work when adding a tracking number to the administrator side, but does not seem to work when adding the tracking number via Shipstation (I guess it's using the Magentos API). Is there another event that I should listen to for this?

etc / events.xml

    

    

namespace MyWebsite  Customizations  Model  Observer;

use Magento  Framework  Event  Observer;
use Magento  Framework  Event  ObserverInterface;
use Magento  Sales  Api  Data  ShipmentInterface;
use Magento  Sales  Api  Data  ShipmentTrackInterface;
use Magento  Framework  Exception  CouldNotSaveException;
use Magento  Framework  Exception  NoSuchEntityException;
use Twilio  Rest  Client;

/ **
* Sending in class
* /
The TextShipment class implements ObserverInterface
{
protected $ _logger;

public function __construct ( Psr  Log  LoggerInterface $ logger) {
$ this -> _ logger = $ logger;
}

/ **
*
* @param Observer $ observer
* @return void
* /
public service execute (Observer $ observer)
{
$ track = $ observer-> getTrack ();
$ shipping = $ track-> getShipment ();
$ order = $ shipping-> getOrder ();
$ shippingAddress = $ order-> getShippingAddress ();
$ telephone = $ this-> makePhoneNumberValid ($ shippingAddress-> getTelephone ());
$ trackUrl = $ this-> getTrackingUrl ($ track);
$ countryId = $ shippingAddress-> getCountryId ();
$ firstName = $ shippingAddress-> getFirstname ();

$ initialGreeting = & # 39;

if ($ firstName == & # 39 ;||| $ firstName == null) {
$ initialGreeting = Hello  Customer of the year! & # 39 ;;
}other{
$ initialGreeting = "Hi". $ firstName. & # 39 ;! & # 39 ;;
}

$ objectManager =  Magento  Framework  App  ObjectManager :: getInstance ();
// $ notify = $ objectManager-> create (Magento  Shipping  Model  ShipmentNotifier & # 39;);
// $ notify-> notify ($ shipping);


if ($ countryId == "US" && $ phone! = null && $ trackUrl! = & # 39;) {
// Your account and your authentication token at https://www.twilio.com/console
$ accountSid = "";
$ authToken = "";

$ serviceSid = "";

// Initialize the client
$ customer = new customer ($ accountSid, $ authToken);

// $ this -> _ logger-> debug ($ telephone. telenumber & # 39;);


// Create a notification
$ client-> messages-> create (
// the number to which you want to send the message
& # 39; + 1 & # 39 ;. Phone,
board (
// A Twilio phone number you bought on twilio.com/console
& # 39; from & # 39; => +& # 39 ;,
// the body of the text message you want to send
& # 39; body & # 39; => $ initialGreeting. & # 39; Your MyWebsite order has been shipped !! You can follow him via the following link, & # 39 ;. $ trackUrl. & # 39 ;. It was a pleasure to serve you and we look forward to your return. With love, my website & # 39;
)
)
}

}

public service getTrackingUrl ($ track) {

$ trackurl = & # 39;
if ($ track-> getCarrierCode () === & # 39; fedex & # 39;) {
$ trackurl = "https://www.fedex.com/apps/fedextrack/?action= track & trackingnumber =" #. $ track-> getNumber ();
} elseif ($ track-> getCarrierCode () === & # 39; usps & # 39;) {
$ trackurl = & # 39; https: //tools.usps.com/go/TrackConfirmAction_input? qtc_tLabels1 = & # 39;. $ track-> getNumber ();
} elseif ($ track-> getCarrierCode () === & # 39; ups & # 39;) {
$ trackurl = "https: //wwwapps.ups.com/WebTracking/returnToDetails? tracknum =" #. $ track-> getNumber ();
}
return $ trackurl;
}

public function makePhoneNumberValid ($ number) {
if ($ number == null) {
return $ number;
}


$ patterns = array ();
$ replacements = array ();

$ models[] = & # 39; / - / & # 39 ;;
$ models[] = & # 39; /  (/ & # 39 ;;
$ models[] = & # 39; / ) / & 39;
$ models[] = & # 39; /  + 01 / & 39;
$ models[] = & # 39; /  + 1 / & # 39 ;;
$ models[] = & # 39; / ^ $ / & # 39 ;;

for ($ i = 0; $ i <6; $ i ++) {
$ replacements[] = & # 39 ;;
}

$ number = preg_replace ($ patterns, $ replacements, $ number);

if ($ number == "0000000000") {
return null;
}

return $ number;
}
}
......

magento2 – How to get the selected data in innerlisting using the ui component?

Battery Exchange Network

The Stack Exchange network includes 176 question and answer communities, including Stack Overflow, the largest and most reliable online community on which developers can learn, share knowledge and build their careers.

Visit Stack Exchange

magento2 – What is the least intrusive way to make tiny changes in version 2.3.1?

Although I was not terrible with Magento 1, M2 has such changes that I do not know where to begin. And everyone who talks about "plugins" just copy and paste the developer's guide and no one gives any example or explains why or how.

What are the ways to make small improvements to the user interface for these examples (extension or plugin or what is an "extension with a plugin"):

  1. In the Administration area, the bar appears to encourage you to update the cache. When I go to the page, he already knows what needs to be updated, so I want to do those already selected.
  2. Delete the "Select All" option from the drop-down lists?
  3. Change your name in the order and contact emails?
  4. Copy the comment block in the adminhtml command page to go to the checkout?

Everyone wants to make great themes and projects, where I'm more on the smallest number of changes and impact on the code.

magento2 – Questions about Varnish and magento 2

Varnish openly does not support HTTPS, more about it can be found here

There are many highly documented pages on Magento2 and Varnish, as well as on the Varnish configuration for Magento2 here.

The most common approach is to use a reverse proxy that introduces a "front-end server" that communicates with the Internet over HTTPS and forwards calls to the "work server" over HTTP, and then returns the retrieved result to the client.

magento2 – Magento 2 Sequence Order and Order Event Module Observer Module

We have two modules that trigger the same event checkout_submit_all_after.But I have to give a preference to that, I tried to give the sequence in the module b but it will not work.For the modules ex A and B triggers the same event, but module B triggers First of all, my requirement is to trigger module A and after module B, is there a way to do it. And what are the event triggers when the command is passed through cron jobs, i have to use checkout_submit_all_after, this event fires if the command is placed by crons? .Please give me a solution to go from the front.
Thank you