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

Orders are hard-coded as non-virtual #1

Open
lfolco opened this issue May 10, 2022 · 1 comment
Open

Orders are hard-coded as non-virtual #1

lfolco opened this issue May 10, 2022 · 1 comment

Comments

@lfolco
Copy link

lfolco commented May 10, 2022

Is there a particular reason that orders are hard-coded to be non-virtual? In \Yireo\EmailTester2\Model\Mailer\Variable\Order::getVariables(), there is this setting:

$order->setIsVirtual(false);
$order->setData('is_not_virtual', true);

I'm more than happy to submit a PR, but want to make sure there isn't some underlying reason for this.

@jissereitsma
Copy link
Contributor

I have to admit I never really looked into this much. The flags were set just to make sure that the shipping address would popup regardless of what products you added to the order (because in the EmailTester backend you can select an order, but if you also select a product, that product will be combined with the order). But now coming to think of it, the is_virtual and is_not_virtual flag would actually need to be calculated from the used order items.

If you have a PR, then awesome :) Otherwise, we'll leave this open so I can pick up on this as soon as I have free time.

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

2 participants