I use the autoformat on save function. That works really good. But when there is IF and ELSE in mixed html/ php code it pushes the code between IF/ELSE a tab to the right on every save/ format.
Why is that?

It ends up with the code being pushed way out right.

                                    <td align="right">
                                        <?php echo Text::_('COM_REDSHOP_BILLING_AS_SENDER'); ?>:
                                    </td>
                                    <?php if ($shipping->billing_as_sender == 0): ?>
                                                <td>
                                                    <?php echo Redshop::getConfig()->get('SHOP_NAME'); ?>
                                                </td>
                                    <?php else: ?>
                                                <td>
                                                    <?php echo Text::_('COM_REDSHOP_BILLING_AS_SENDER_SITE_CUSTOMER'); ?>
                                                </td>
                                    <?php endif; ?>

So it means

                                    <?php echo Text::_('COM_REDSHOP_BILLING_AS_SENDER'); ?>:

is correct formattet but the rest is pushed right every time i save.

    Hello,

    Thank you for your post. I've just tried the snippet and it worked. May I ask for the whole file where this happens?

    Do you also have any other extension that could interfere with HTML or php formatting?

    Thank you

      Thank you! I will take a look and get back to you.

        7 days later

        We've fixed this one. The fix will be present in the next prerelease version.

        Thank you!

          Write a Reply...