What security information Im required to give to my customer

We have an application running in Amazon. A customer request some information about the security and I really not sure how to asnwer it. I ask for some kind of form so I try to fill it but they reply just give what we have.

Thing they ask:

  • DB diagram.
  • Server security information (Amazon).
  • Protocols used in the server (Amazon).

I can do the DB diagram. But not sure what they can’t do with that.

Beside HTTPS not sure what protocols they need to know.

And beside the certificate for the HTTPS not sure what security information from Amazon they may need.

Things I do:

  • Dont save passwords as plain text and request strong passwords.
  • Use HTTPS
  • Separated DB and APP server
  • Avoid SQL Injection
  • Scheduled backups

What kind of information should I give to a customer so he feel confident the application is secure?

Magento2 How to get customer group from sales order item collection

I want to get customer group from sales order item collection. How do i get that?

In Magento 1 it is like this

$ customer_group = Mage::getModel(‘customer/group’)->load($ order->getCustomerGroupId());

how can i get it in magento 2.

I have item collection and i want customer group for each item.

How to get please answer.

Magento 2 : How to filter customer group collection?

Anybody have idea about how can i filter customer group pragmatically ?

I can able to get customer group collection by using below code.

$  customerGroupsCollection = $  objectManager->create('\Magento\Customer\Model\ResourceModel\Group\Collection');  print_r($  customerGroupsCollection->getData()); exit; 


[6] => Array     (         [customer_group_id] => 9         [customer_group_code] => first         [tax_class_id] => 3         [custom_shipping_amount] => 1200         [group_creator] => newnew         [group_creator_id] => 10         [group_code] => first         [total_members] =>          [group_validity] =>          [members_name] =>          [member_profile_image] =>          [group_shopping_amount] =>          [group_image] => /k/o/koala_1.jpg         [group_link] => first     ) 

Now i am trying to apply addAttributeToFilter but its not working !?

Anyone know what is missing ?

$  customerGroupsCollection = $  objectManager->create('\Magento\Customer\Model\ResourceModel\Group\Collection');  $  customerGroupsCollection->addAttributeToSelect('*')->addAttributeToFilter('group_link',['eq'=>'thisisfreshgroup']); print_r($  customerGroupsCollection->getData()); exit; 

Getting unDefined Method addAttributeToFilter.

Finding the nearest agents to a customer using IComparable

I got a C# class:

public class Agent  {     public string AgentId { set; get; }     public double Longitude { set; get; }     public double Latitude { set; get; } } 

There are several agents in several different locations. During the program’s lifetime, they can receive a call to another (latitude, longitude) point which is unknown during runtime. I got an API to calculate the distance in meters between their location and the given point. What I need eventually is to find the 5 closest agents to the given point.

What I did in order to achieve this is adding another class:

public class AgentDistance : Agent, IComparable<AgentDistance> {      public AgentDistance(Agent agent)     {         if(agent == null)         {             throw new Exception("Can't initalize agent with distance since agent is null");         }         this.AgentId = agent.AgentId;         this.Latitude = agent.Latitude;         this.Longitude = agent.Longitude;     }      public double Distance { set; get; }      public int CompareTo(AgentDistance other)     {         if(other == null)         {             return 1;         }         return Distance.CompareTo(other.Distance);     } } 

And the usage:

var agents = db.GetAgents(); if(agents == null || agents.Count == 0) {     Console.WriteLine("No Results"); } List<AgentDistance> agentsWithDistance = new List<AgentDistance>(); foreach(Agent agent in agents) {     double res = ws.GetDistanceMeters(agent.Latitude, agent.Longitude, customerLatitude, customerLongitude);     agentsWithDistance.Add(new AgentDistance(agent) { Distance = res }); } agentsWithDistance.Sort(); for(int i = 0; i < 5; i++) {     Console.WriteLine(string.Format("agent_id:  {0}  distance: {1} m", agentsWithDistance[i].AgentId, agentsWithDistance[i].Distance)); } 

It works, but is there a more elegant way to do it? I’m not sure if adding another class might be a bit redundant since all it does is just adding a property for sorting, but adding the distance property to the Agent class, doesn’t make so much sense.

How do you configure a dynamic block for a customer segment in M2C?

Using Magento Commerce (nee EE) 2.3.1, how do you configure a Dynamic Block to render for a specific customer segment?

The stock Magento documentation:


does not give you much to work with if it’s not working.

I have a Customer Segment set up for any customer that has placed an order (which has 1 customer record – using the sample data). I have a Cart Rule for 20% off, I want to show a Dynamic Block to that customer segment to promote the Cart Rule.

I have the Dynamic Block set up, and dropped into a CMS page: enter image description here


but when I log in as the customer in the customer segment, no promo Dynamic Block appears on the CMS page.

I’ve reindexed and cleared the cache.

Magento 2 Assign customer group name to externally calling JavaScript file variable


  • MageVersion – Magento 2.3.x
  • External JavaScript – http://domain.com/external-js.js

    var mage_customer_group = ”; //other code related to the customer group

  • Pages – Category page and Custom product listing page (External JavaScript manages the product listing using simple AJAX)

Getting Customer group name by overriding customer section updates and saving into the mage-cache-storage (localstorage).


Customer Data Management in Magento 2

In external-js.js file, 3rd party vendor having logic to send prices and other information based on customer group name. For now, product name, image, link and product price is showing proper. Issue only occures, when category or custom product listing page loads value of mage_customer_group is getting blank value.

While looking on the Network console, first External JavaScript (http://domain.com/external-js.js) calling then customer section update is calling.

Is there any way in KnockOut js that we can bind customer properties to external JS?