Magento 2 Sales order creation upon checkout

I’m in the process of migration from v1.9 – v2.4 and realized that the sales orders are only created in Admin Panel after successful payment. Is there a way to configure it to behave like v1 where the order is created upon clicking Place Order? It used to create a Pending Payment order and had its status updated after payment (processing/cancelled).

Remove fields and validations for street and city in checkout

I am trying to remove street and city field from checkout on Magento 2.3.5-p1 but the validation is throwing me an error for required city and street. I have tried to add a value in the DB eav_attribute for city and street but nothing. I have added lines in billing and shipping at vendor/magento/module-checkout/… False for city and street as mentioned in other questions here on stack but nothing… Did anyone has a working solution?

e commerce – How to manage shipping to multiple addresses during checkout

We are allowing shipping to multiple addresses during checkout for guest customers. The steps are a lot simpler for an existing user since we can pull addresses from their account for them to choose.

However, guest customers have to do the following for every address:

  1. Input address
  2. Choose product(s) to ship
  3. Choose shipping method

What are some good examples you have seen in the past? What are some considerations to look out for?

magento2 – How to move cart items in checkout from sidebar to main container under payment methods

I want to move the cart items and the cart summary from the sidebar into the main container under the payment methods in order to show the customer all items first, before he can place the order.

Desktop Magento Cart Summary

Especially in the mobile version of the checkout, the user is not shown the items in the cart before he places the order. Only if the user presses on the cart button at top, he can check the items.

Does anyone knows how I can move the items in the sidebar into the main container? Magento Mobile Cart Summary

magento2 – Magento 2.4 – Express Checkout – Shipping Address Error

A fresh install Magento 2.4.x + theme, but having some issue related to express checkout, as seen from below picture on red-box area.

enter image description here

The form has missing some elements, like firstname, lastname etc.
When I compare things around, it should have it. Do I miss some setup?

Also, when I check on console, I’ve seen some javascript error that I’m not familiar with, as below

Uncaught ReferenceError: Unable to process binding "foreach: function(){return { data:elems,as:'element'} }"
Message: Unable to process binding "if: function(){return element.visible() }"
Message: Unable to process binding "ifnot: function(){return (element.input_type =='checkbox'|| element.input_type =='radio') }"
Message: Unable to process binding "template: function(){return $parent.fieldTemplate }"
Message: Unable to process binding "afterRender: function(){return oscAddress.fieldAfterRender(element.dataScope) }"
Message: oscAddress is not defined

I’m not really familiar with front-end stack on Magento, so I don’t know what I need to do.

Any suggestion? Do I miss some server / code setup? or maybe Admin setup?
I already tried to refresh cache etc, but the problem still remains.
Also, I already change to Luma / default theme, but the problem still persist. So, I’m wondering if there’s something that I missed.

Thanks. 🙂

magento2 – Increase product image size in Amasty’s One Step Checkout Magento 2

Amasty put their product image size at 75px in the ‘Your Order ‘Order Summary area, and mine is displaying at half that due to some css I can’t locate.

Please put an item into the cart on their demo site at https://one-step-checkout-m2.magento-demo.amasty.com/checkout/

Is this possible to modify the image size via CSS? Or do I need to override the extension file? I can’t seem to locate it either.

database design – Providing guest users with full accounts vs only sessions (a.k.a. guest checkout)

I’m working on a web application with JWT authentication (with token stored in cookie) and an SQL database. Upon loading, the frontend makes a request to the backend to determine whether the user is authenticated and who he is.

In order to make the app more convenient to use, I want to allow users to use most of the features without signing up (i.e. submitting email + password).

  1. My currently preferred approach is to automatically create a proper account whenever the frontend makes that initial request without a valid authentication token and the user is immediately signed in, though the frontend pretends otherwise. When the user performs a sign in, the created account would be deleted and user would be signed in to their own account. Upon sign up, the user would become the owner of the guest account by setting an email and a password. The big advantage of this approach is, that, since the user always has a proper account with user id, all the APIs can keep the same logic for both guests and signed up users. The only downside I see, is that the email field in the users table would have to contain a random UUID to satisfy the unique constraint on the email field while the user is a guest.
  2. The other approach would be to create a separate table “sessions” and return a session id stored in a cookie to guest users. Upon sign up, the entry in the users table would be created and all the information attached to the session copied into tables attached to the users table. This would require creating a separate logic for guests and signed up users for each API.

Neither approach is completely clean, the first one essentially creates fake user accounts for guest users while the second one complicates the logic in every API function, having to decide where to store information depending on whether the user is authenticated.

Is there an alternative approach that’s better?
What are the issues that could arise if I go with the first approach?

delivery – Basket Item Count From Certain Departmartments at Checkout

The question is to do with adding code within Owebia Advanced Shipping Module, but I am hoping it may just be a simple syntax error I am not currently spotting.

Before the list of delivery methods, I am hoping to group department id’s together, and check how many products within this group are in the basket, and work the price out from there.

Here’s what I have written, appreciate help to get this working!

$group1 = function ($allItems) {
return array_sum(
    return array_map(
        function ($item) {
            return count(array_intersect($item->product->category_ids, (2, 3)))
            ? $item->qty 
            : 0;
        },
        $request->all_items
    )
),

};

magento2 – Magento 2.3 – Moving the payment option in the checkout to the first step

Is there an easy way to move the payment options out of the second step (Payment and Review) and into the first step (Shipping Address)? I have searched far and wide and there is almost zero documentation on this particular issue, most people would suggest to use a one step checkout and I agree, but the for whatever reason the numbskull in charge is adamant on moving the payment after the shipping address on the same step.

Please advice