Giter Site home page Giter Site logo

Comments (11)

engcom-November avatar engcom-November commented on August 16, 2024 1

Hello @Genaker,

Thank you for the quick response!

Verified this issue on 2.4-develop.
When checking out from a guest quote programmatically, after assigning a customer to the quote, customer_is_guest remains 1.

Please take a look at the screenshot below:
image
The value of customer_is_guest should have been 0, but it remains 1.
Hence confirming this issue.

Please find the custom module used to reproduce this issue.
I38540V.zip

Thank you.

from magento2.

m2-assistant avatar m2-assistant commented on August 16, 2024

Hi @Genaker. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

from magento2.

Genaker avatar Genaker commented on August 16, 2024

there is test cases:

$customer = $this->customerRepository->getById($customerId);

        $output->writeln('is order for guest : ' . $quote->getCustomerIsGuest());
        $output->writeln("Customer ID:" . $customer->getId());
        // Assign the customer to the quote
        $quote->assignCustomer($customer);
        $quote->setCustomerId($customer->getId());
        $output->writeln('is order for guest after assign customer and set customer ID : ' . $quote->getCustomerIsGuest());


        $output->writeln('is order for guest after set setCustomerIsGuest : ' . $quote->getCustomerIsGuest());

output 👍

image

the same issue for quote/cart or for order doesn't matte.
please fix this issue in the core.

from magento2.

m2-assistant avatar m2-assistant commented on August 16, 2024

Hi @engcom-Dash. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

    1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    1. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
    1. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

from magento2.

m2-assistant avatar m2-assistant commented on August 16, 2024

Hi @engcom-November. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

from magento2.

engcom-November avatar engcom-November commented on August 16, 2024

Hello @Genaker,

Thank you for the report and contribution!

Tried to verify this issue on 2.4-develop, but in our case it is not reproducible.
Signed in as a customer, and added the product to cart, but customer_is_guest was 0.

Please take a look at the screenshot below:
image

Please let us know if any preconditions are required for the issue to be reproduced, and also if we are missing anything.

Thank you.

from magento2.

Genaker avatar Genaker commented on August 16, 2024

You should submit an order not through the front but by code: it is not a front issue

        $quoteMaskedHash = //Real cart with the items mask 
        $quoteId = $this->getQuoteIdFromMaskedHash($quoteMaskedHash);

        $customerId = //SomeCustomerID
        $quote = $this->quoteRepository->get($quoteId);
        $customer = $this->customerRepository->getById($customerId);

        // Assign the customer to the quote there quote must be not guest 
        $quote->assignCustomer($customer);

        $billingAddress = [
            'firstname' => 'John',
            'lastname' => 'Doe',
            'email' => '[email protected]',
            'street' => '123 Main St',
            'city' => 'Anytown',
            'country_id' => 'US',
            'region' => 'NY',
            'postcode' => '12345',
            'telephone' => '1234567890',
            'save_in_address_book' => 0
        ];

        $quote->getBillingAddress()->addData($billingAddress);

        $shippingAddress = [
            'firstname' => 'John',
            'lastname' => 'Doe',
            'email' => '[email protected]',
            'street' => '123 Main St',
            'city' => 'Anytown',
            'country_id' => 'US',
            'region' => 'NY',
            'postcode' => '12345',
            'telephone' => '1234567890',
            'save_in_address_book' => 0
        ];

        $quote->getShippingAddress()->addData($shippingAddress);

        $shippingAddress = $quote->getShippingAddress();
        $shippingAddress->setCollectShippingRates(true)
            ->collectShippingRates()
            ->setShippingMethod('freeshipping_freeshipping'); // For Free Shipping

        $quote->setPaymentMethod('checkmo'); // For Check / Money order
        $quote->setInventoryProcessed(false); // Prevents inventory decrement

        $quote->getPayment()->importData(['method' => 'checkmo']);

        // Attempt to save the quote and create an order from it
        $quote->collectTotals()->save();

        ///Quote is still guest 

from magento2.

github-jira-sync-bot avatar github-jira-sync-bot commented on August 16, 2024

✅ Jira issue https://jira.corp.adobe.com/browse/AC-11689 is successfully created for this GitHub issue.

from magento2.

m2-assistant avatar m2-assistant commented on August 16, 2024

✅ Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

from magento2.

github-jira-sync-bot avatar github-jira-sync-bot commented on August 16, 2024

❌ You don't have permission to export this issue.

from magento2.

shmVan avatar shmVan commented on August 16, 2024

@magento I am working on this

from magento2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.