How to resolve cors issue in Magento 2?

I finally have Magento installed and have been setting it up and connecting it to Nuxt, however I’m receiving the following error: Access to fetch at my domain from origin my local domain has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.

ā€‹

I have the https://github.com/graycoreio/magento2-cors module and followed the steps to use it but still same issue. Any ideas how to fix this?

submitted by /u/chaoticbastian
[link] [comments]

Cart Price Rule – Magento 2

I have a promo code for users to use if they buy a set. The items are celebratory plates and napkins. I have 4 SKUs, 2-plates & 2-napkins. I want the customer to be able to choose the plate and then the napkin and have a promo code that will give 25% off.

I do not want to create new categories or configurables. I tried for over an hr today to set the cart price rule for this and it seemed the only time it would work was if all 4 SKUs were in the cart. I know it has to be something simple Iā€™m missing!

submitted by /u/Musical_Coffee
[link] [comments]

Anybody able to share specific reasons Magento recommends against using the customer session to authenticate GraphQL requests?

My general understanding is the reason is “speed”, but I’m wondering if that recommendation changes is you’re using redis to store session data vs file system, etc.

Despite the recommendation I’m currently trying to choose the lessor of multiple evils and I’d like to be convinced the session’s impact on GraphQL performance is such that it really is a non-option.

For context it all goes back to keeping the Magento PHP session in “sync” with a headless graphql “session.” I’d like to keep the source of truth in the Magento session and do any error correction in terms of differences in state on the headless side, but that requires me making some requests to the graphql API with the PHP session.

Thanks for your thoughts!

submitted by /u/kevysaysbenice
[link] [comments]

Customer Claims Portal

Has anyone here ever built out a claims portal in Magento? I’m looking for examples. This would be for customers who receive shipping damaged product, broken product, or have a warranty claim. Customer would have to answer numerous questions and provide photos.

what is the best and easiest way to accomplish this?

submitted by /u/Othelo2
[link] [comments]

Creating shipments over REST API

I’m working through a problem right now and want to see if anyone here has any ideas. We are trying to create shipments for established Magento orders over REST API but we are getting errors due to the fact that Magento expects to receive the configurable product order_item_id in the payload. Our integration sends only the simple product order_item_id in the payload. It seems that for orders with configurable products, the json payload needs to have the configuratable product oder_item_id to process correctly. This seems crazy to me since configurable products are not real and cannot be included in any shipment as an item. Has anyone had a similar issue?

submitted by /u/Tealfixie
[link] [comments]

How to Choose Best hosting for Magento 2

Magento 2 is an e-commerce platform equipped with diverse features that allow businesses to build and manage their online stores. Nonetheless, its optimal functionality necessitates a hosting environment with elevated resources and performance.
A well-tuned hosting environment is indispensable to ensure that your Magento 2 store operates seamlessly and provides a secure, rapid, and dependable user experience for your clientele. The selection of the appropriate hosting provider that sustains Magento 2 setup is a vital measure in this undertaking. A trustworthy hosting provider should furnish you with the required infrastructure to efficiently operate your store and furnish assistance for any technical setbacks during the setup process.
This blog will cover the factors for how to choose best hosting for Magento 2.

submitted by /u/ecommerce_tutorials
[link] [comments]

[VAT Europe] For Europe Union business that use 3rd party shipping manager and also have B2B clients who ship directly to end customer – how and have you achieved TAX caclulations? Because technically b2b have to be calculated on Billing address and B2C on shipping addres…

Link to chart

Because B2B sales could actually go to end customer, I can not calculate TAXes based on Shipping address, because the info there is unrelated to actual buyer. If a B2B customer in France sold on their store our German products to someone in Belgium, the VAT is 0%, because the France business has to collect VAT from Belgian customer, and because we are in Germany, the VAT for order to France business should be 0%

But, if the same scenario happens when France buyer is just private non-busines, and want the order to be shipped to his family in Belgium, the VAT should be 21% (Belgium) not 20% (France)

submitted by /u/Juris_B
[link] [comments]

Sharing session state between Magento and WordPress?

Hello!

I’d like to be able to show a cart and some product information in WordPress.

I was thinking about using Magento’s GraphQL API to do this, but the issue is that while I realize you can generate a token to authenticate for registered customers, or store a cart id for a guest customer, it gets “weird” when swapping between WordPress and Magento.

Are there any patterns or plugins or other things I should know about Magento that might make this easier? How can I make sure, for example, if a customer logs into Magento that they also appear to be logged in on the WordPress site?

Thanks for any thoughts / tips / pointers šŸ™‚

submitted by /u/middleagejapanexpat
[link] [comments]