magento2 – Where Inventory_stock_% table get updated in Magento 2?

The problem I’m facing is that
The table Inventory_stock_13 used for the 2nd website is updated incorrectly.
When set source status to Out of stock, column is_salable is still 1 and quantity is updated to 0 instead.
Expected result must be is_salable to 0 and quantity unchanged.

I can only see the default stock item get saved but cannot find where the code update table ‘Inventory_stock_13’?
Hope you guys have a hint for me. Thank you.

I’m working on magento 2.4.3 by the way.

Boost your Google and Alexa Rank – Last updated methods of 2021 for $94

Boost your Google and Alexa Rank – Last updated methods of 2021

Why is Alexa rank is important?

A- Improve Search Engine Results Pages (SERPs):An improved Alexa ranking correlates with improved rankings in the search engine results pages (SERPs), which means taking steps to improve your Alexa rank can improve your Google rank as well.
B- The easiest way to get backlinks: Website owners like to engage with reputable websites to improve their ranking. So easily exchange backlinks by improving your ranking in Alexa.
C- Advertising :Some advertisers still look at a site’s Alexa ranking to estimate site quality, authority, and traffic.
D- Be #1:Let’s face it, we all want to be #1. A website with a higher ranking looks more trustworthy to the customers.

How do we improve your Alexa rank?

1. Install Certified Alexa Rank traffic counter: Just buy and install the Certified Alexa Rank on your website pages, then wait for results in days of 31

2. Receive unique visitors: We will start your order in less than 12 hours. We will have 20,000 to 100,000 unique visits from your web pages in one month.

3. Advanced Link Building: Rocket Your Google SEO Ranking with High Authority mix Links Pyramid based on last 2021 update

4. Ranking report and details: We will send all Alexa Ranking report, views report and Link building details after 30 days

1. What is Alexa Rank?
Alexa Rank shows how popular your website is. keeps track of almost all websites’ traffic measures, ranking them accordingly. Its estimates usually are accurate and can be used to compare websites in regards to traffic volume.

2. How to check Alexa Rank?
You can always consult on your actual Alexa Rank at the official website:

3. How can I improve my Alexa Rank in my country?
Once you have Alexa Rank Certified active for your website, send your targeted countries to us.

4. How can I activate Alexa Rank Certified?
Simply head over to, click at Certified Alexa Rank tab and choose the cheapest(at the moment it was $19.99) option, then follow the instructions.
Keep in mind that after installing Alexa’s traffic counter, there’s 21 days period before you can switch the Rank from Estimated to Certified, don’t forget to switch the rank. By default, shows estimated rank even if you have Alexa Rank Certified active.

5. I installed’s traffic counter, but it says I need to wait 21 days to change the rank. Will your traffic still work?
Yes, is already counting all your traffic. You cannot see it until the 21 days period ends.

6. How does your warranty work for Guaranteed Alexa Rank packages
If you have Alexa Rank Certified active for your website, you can benefit from our Alexa Rank warranty. This is how it works: If at the beginning you had Alexa Rank 100 000 and then purchased a 49 999 package but got only 75 000 rank in 35 days, then we will refund (100000-75000)/(100000-49999) = 50% of your payment.

7. Does this package affect my Google ranking?
Sure. Our dedicated link building along with unique visits and the use of the latest 2021 algorithms will improve your ranking. But it is not possible to determine the exact rank

8.Is link building compatible with White Hat SEO?
Certainly, it is the White Hat SEO. we will use pyramid and other methods to build the best links for Google and Alexa ranking


You have to send the require information before purchase this package.

Please provide these require information and accounts before purchase

  • Install certified Alexa on your website pages.
  • Install Google Analytics on your website.
  • Install Google Webmaster on your website.
  • Give us 10 links and 5 keywords.
  • Send us your targeted country


php – Adjusting variables on change of status attribute of my Order Laravel model on the updated event in observer

Nine status combinations

Status can either be 0, 1, or 2, so there are 8 possible changes in status.

There are nine (three states multiplied by three states) possible “changes” (state combinations). Although three of them are to stay the same. This is why you need seven if statements (and actually you don’t, the last could be a simple else): six to cover the possible changes and one to cover the three possible ways to stay the same. If there were only two statuses, this would be four (two times two) and three (one plus two times one). If four, then sixteen (four times four) and thirteen (one plus four times three).

In general if there are $n$ states, then there will be $n^2$ combinations and $1 + n(n – 1) = n^2 -n + 1$ conditions. There are $n$ combinations that stay the same. So the total number of combinations minus the number where the status stays the same plus one for all those where the status stays the same.


    $unchanged_order = $order->getOriginal();

I would find $original_order clearer.

        // skip if status wasn't changed. I use this skip so that we don't have to check all of the following. 

Rather than commenting, it would be simpler just to return in that case. As there is no reason to update the client if nothing has changed.

        // Nothing changed; nothing to do.  

Alternatively, this comment is shorter and better explains what’s happening.


    if ($original_order->state === $order->state) {

    if ($original_order->state === 1) {
        $order->client->total_generated_revenue -= $order->total;
        $order->client->orders_got -= 1;
    } elseif ($original_order->state === 2) {
        $order->client->orders_cancelled -= 1;

    if ($order->state === 1) {
        $order->client->total_generated_revenue += $order->total;
        $order->client->orders_got += 1;
    } elseif ($order->state === 2) {
        $order->client->orders_cancelled += 1;

If you work it out, this will have all the same results but with only five comparisons rather than the seven that you used.

It doesn’t make much difference with two states, but you could also use two switch statements instead of two if/elseif structures.

Status objects

A more advanced form would be to use objects or classes as the states rather than primitive integers. Then you could replace both structures (not the first if) with something like


Then you could make simpler methods, like

namespace OrderStatus;

class Cancelled implements OrderStatus

    public function enter($order)

No if/else scaffolding.

That would make it easier to add a status, as you’d just have to create one file and implement the required methods. This makes the update code simpler at the cost of making the status more complex.

database – How to rollback data in Mariadb 5.5 ,updated a specific table wrongly

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

How long it takes get package updated in the main F-Droid repository?

While using F-Droid I have noticed that it takes quite a long time for new package versions to be published. E.g. Shattered Pixel Dungeon – v1.0.0 was updated in F-Droid metadata repository week ago, but it is not available in the store. How long it takes for new versions to be published?

html – Preventing users from going back to a contact form (UPDATED TO CLARIFY WHY THIS IS NOT ABOUT CODING)

This question is not about software development; an answer shouldn’t contain any code whatsoever. I just hope to understand if what I need is possible with the current browser development standards and privacy standards and if not, what other options I might have to solve my problem elegantly.

I have a contact form with a success page; after submitting the form,
there is a (backend) redirect to that success page.

The form I have is not an “login form” or an “order form” so there is no sensitive data such as passwords or billing details (as well as billing as an action) involved; it’s just a simple contact form.

I need that while the user is in the contact form’s success page — if that user clicked the browser’s “back” button, than the user won’t reach (back) to the contact form.
Is this even possible with the current browser standards (MDN, Google, Edge, Opera, DuckDuckGo and so on)? And anyway, how would you suggest to handle that situation.

php – How to add a element to a webpage that keeps refreshing with a updated price

$url = "";
$price = json_decode(file_get_contents($url), true);
echo "$".$btcPrice=number_format($price('bpi')('USD')('rate_float'),2);

The above code when I add it to my page it shows me the current price. I am wondering what is the correct way to add code to a site that will update the price every minute without refreshing the entire page.

I just need a pointer to what method to use or even what search term to use to find information about this. I tries searches for words like price stream, live update element, timer, etc but nothing that gave me the answer to how to implement this.


sales order – Magento 2.4 extension attribute “pickup_location_code” not updated in grid

For every order I add dropdown that admin user can assign order to another “Pickup location”. When user click button “Assign” I call Ajax and in controller change/update “Pickup” (Print Screeen bellow).

Dropdown menu

Problem, that I have is that when I want to assign to another “Pickup Location” and then save it, this extension attribute isn’t syn with sales_order_grid.pickup_location_code.

How to achive that when I set new location that It will be updated also in sales_order_grid?

Code of my controller:

/** @var OrderRepositoryInterface  */
private OrderRepositoryInterface $orderRepository;

 * Update constructor.
 * @param OrderRepositoryInterface $orderRepository
public function __construct(
    Context $context,
    OrderRepositoryInterface $orderRepository
    $this->orderRepository = $orderRepository;

 * @inheritDoc
public function execute()
    $response = ();
    $isAjax = $this->getRequest()->getParam("isAjax");
    if($isAjax) {
        $pickLocationCode = $this->getRequest()->getParam("code");
        $orderId = $this->getRequest()->getParam("order_id");
        try {
            $order = $this->orderRepository->get($orderId);
            $respose("sucess") = true;
            $respose("message") = "Order successfully assigned to other shop";
        } catch (Exception $e) {
            $respose("error") = true;
            $respose("message") = $e->getMessage();

    $resutJson = $this->resultFactory->create(MagentoFrameworkControllerResultFactory::TYPE_JSON);
    return $resutJson->setData($respose);


domain name system – why is ssh using cached dns record when dig reports updated version of cname record?

I have a Jenkins pipeline that will start my AWS Ubuntu EC2 instances. This Jenkins pipeline will also update a CNAME record I have for my EC2 instances in route53.

Sometimes there is a long delay in my ability to ssh to the instance via the CNAME. I figured it might be a cache issue, but if I execute dig I see the updated versions of the DNS records. Also I have no problem ssh’ing to the new IP and the value of the DNS A record that AWS gave my instance.

Is my ssh client using a cached version of the CNAME?

Fetch the most recently updated records in a database across multiple tables in a performant manner

I have an Angular + Django web application in which Django functions as my backend.

In this web application, I have 12 different tables about articles, each table representing a different kind of article. They all have the fields creation_datetime and update_datetime but are otherwise dissimilar.

I want to fetch the X most recently updated articles across all 12 tables, so the top X entries if ordered by update_datetime.

The naive approach to doing this is fetching all entries across all 12 tables (which is at least 12 queries) into your application server, putting them all in a massive list/array, sorting by update_datetime and then taking the top X entries. This is what I have implemented currently (I have a small database at the moment), but I don’t think that is viable for larger datasets because it requires fetching a lot of data from the database multiple times.

The only other approach I can think of, is the following:

  • Create new table Recently Updated Articles that references an article across the 12 tables. To do so it would have the columns “table_name” (varchar of the table the record is in) and “pk” (the primary key of the specific record on the table). It shall also have the column “update_date” which is the value
  • Recently Updated Articles shall never be manipulated directly by any view, only read from
  • Implement triggers on my application server (Django Signals) that update Recently Updated Articles whenever a Create, Delete or Update operation happens on one of my 12 tables.

I could then get references to the X most recently updated articles by just querying Recently Updated Articles and then fetching content of those referenced articles from my 12 tables.

What’s stopping me from doing this is that it seems… ugly. But I’m also not quite seeing a better way of doing this. Is there a better solution for this kind of problem?