Possible to assign order to account? - shopware6

Is it possible to assign an order manually in the backend to a customer?
I couldn't find anything about it.
Unfortunately this is a regular task of our customer support.

You can create a new order manually in the administration.
You can't however retroactively change the customer of an order placed via the storefront, if that is what you meant. In theory you could do it programmatically by replacing customer specific associations of the order with new ones, based on another customer. It's still likely this would come with a few undesired side effects though.

I guess you mean: You want to create a order for a customer via the administration. For this, have a look into the docs:
https://docs.shopware.com/en/shopware-6-en/orders/create-order-in-admin

Related

Shopify create order admin api not taking email all of a sudden

Admin API 2021-10 Orders endpoint is throwing the following error for already existing user
{\"customer\":[\"Email has already been taken\"]}
This problem was not there before. Does anyone know if something changed recently API-wise? no documentation regarding the update was found
Usually when creating orders, you would want to use a Customer ID for an order when creating it. So you check, via email, does this customer even exist? If it does, you just provide the ID. If you skip that step (remember, customers are a separate aspect of Shopify Orders), you may then run into this issue. Shopify is given an email, tries to create a customer, and the system says STOP RIGHT THERE, this customer already exists, and you never provided an ID.
Sounds weird, but maybe you never encountered this issue because you just never ran into repeat customers? As you know, most orders are one-time and not repeat at a lot of stores.
Not sure this explanation makes total sense, but anyway, the workaround I found was just to establish the customer BEFORE trying to create the order. Either you use an ID for an existing one, or, create a new one.

How User can add Order Line Note or at less Order Note or Metadata?

Does Saleor have some minimum implementation of interaction for receiving data from client
I need to receive some data from client for special product that will be created and send to him.
As for me the best way will be order Line Note editable by user
I've tried to add new fields to CartLine after to CheckoutLine, but it's not good way because i need to modify #saleor/sdk in frontend and modify backend API.
I've tried to esaminate different custom fields like:
customerNote (OrderAddNote)
OrderLine
OrderLineInput
OrderLineCreateInput
CheckoutLine
CheckoutLineInput
CheckoutCreateInput
MetaStore
MetaItem
MetaClientStore
Metadata
and found that in all of them some notes can create only stuff users.
My question is:
What is the best way to have interaction with customer? If there is noting: Is it reasonable to change permission for Add Metadata o Add Note.
PS. How can I see metadata in dashboard orders
Metadata can be created / updated for a checkout without any special permissions and can be seen and edited from the Dashboard. Customer notes can be used as well, but have less features.

Create Magento category with assigned id using SOAP api

I am working on a script (which is in Python) for doing some management on our Magento environment.
Now I am wondering if I can create categories with assigned ID.
I think this might be impossible due to key constraints. But is there a way?
Just putting category_id in the parameter list in catalog_category.create, it does not work, it just skips the parameter.
The main reason of wanting this is because I need to know the category ID in order to create the subcategories.
I do know the Magento API returns the ID of the created category. But, I have no way of knowing what subcategories are supposed to go to that created category. (Or I can rewrite a load of code, which I am not too fond of...).
So I was thinking this was the easiest way to go with right now.
Any suggestions, comments, answers? Anything is appreciated!
No, you can't. Magento's entity IDs are for Magento so you cannot specify what you'd like them to be.
When you create an entity with the API it will return the new ID, as you've said.
For your use case it might be easiest to add a new attribute to your categories in Magento, call it "my_category_id" or something and allow your API to set that instead.

Ordering products by product type in Shopify

I've been asked by a client is it possible for them to be able to manually order product(Types) on the front-end instead of using the default A-Z option.
For example:
Customer visits product listing page
Selects product type from the filterable options E.G "t-shirts"
Products show based on that query but are organised how they have defined possibly in the backend somewhere, or as a Shopify setting that I setup.
I can't seem to find anything from digging around on the internet and I can't think how I'd do this on my own but wondered if anyone else ha had experience or ideas for how this could be achieved.
You could define a collection with the condition "Product type is equal to your_type". Then after you save the collection you can choose to order the products manually (the default is alphabetically).

Setting carrier per product

I'm working on a store that has two types of products: perishable food and general merchandise. The food must always be shipped overnight via FedEx, and the other merchandise must always be shipped via USPS. If somebody orders products from both categories, they must be shipped separately.
Do you know of an existing module or configuration settings that would allow for this?
If not, it sounds like a custom module would be the other solution. In this case, what is the best approach? I'm thinking it would be splitting the order into a multi-address shipment, using the same address for both but with different shipping methods. Unfortunately I'm not sure how to do this programatically, so any tutorials/samples/resources would be greatly appreciated.
Probably the sanest way to handle this would be to create two orders per product type, each shipping with a different carrier to the same address. This also IMO makes more sense from a stores tracking perspective as you can handle each independently from each other.
To get you on the right track(since Magento is especially cryptic in this part of itself) you should read the Inchoo programmatically create order in Magento post and by the same author Programatically create customer and order in Magento with full blown one page checkout.
Basically as I see this going is:
Get the customer order
Itinerate through each product inside the order and split it up in two arrays for each product type
Create a separate order for each product type and use the different shipping methods for each.
You will probably have to extend a some controllers OR do it the non-standard way and use helper functions for this, the hard parts will be integrating the payment/shipping modules inside your order process. Going this way will have you creating the full checkout process as the one page checkout Magento provides won't really work and is too much pain to get to work because of the way it uses AJAX.
Also another alternative is to hook in to Magento's pre-create order events and create the orders there using already defined order data split it up in two orders, but this is something I never heard or saw implemented at the moment so you'd have to do it "blindfolded" so to speak.
An easier approach would be to use a custom field that defines your product's shipping method, this way you just add that and don't care about custom orders. You just react with that, however tracking will become mostly impossible IMO.
Over-ride the Free Shipping module.
You can setup a sales rule that applies to certain products and makes them 'Free Shipping', leaving the other products to your chosen main shipment provider.
You will need to see how this works, however, the point is that Magento does have something built in to split an order into two shipping categories, albeit only a sales rule on free shipping. But you have source code...