Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing the ability to generate a masked ID for a quote #91

Open
Skullsneeze opened this issue Mar 15, 2024 · 0 comments
Open

Missing the ability to generate a masked ID for a quote #91

Skullsneeze opened this issue Mar 15, 2024 · 0 comments

Comments

@Skullsneeze
Copy link

Normally when generating a cart for a guest user a masked quote ID is returned instead of the quote entity ID. You can work around this by creating your own mask ID record using the Magento\Quote\Model\QuoteIdMaskFactory class, but it might be nice to add this to the CartBuilder?

This could be done in 2 ways. Either by adding another withMaskedId method. For example:

$cart = CartBuilder::forCurrentSession()
            ->withSimpleProduct(
                $this->productFixture->getSku()
            )
            ->withMaskedId()
            ->build();

Or perhaps with an isGuestCart method?

$cart = CartBuilder::forCurrentSession()
            ->withSimpleProduct(
                $this->productFixture->getSku()
            )
            ->isGuestCart()
            ->build();

I'm not sure which solution would be preferred, or if this is something that would even be considered as a valuable addition. However, if it is I can create a PR with the needed changes.

@Skullsneeze Skullsneeze changed the title Missing the ability toi generate a masked ID for a quote Missing the ability to generate a masked ID for a quote Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant