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

Changing totals sort order #328

Closed
DasPflanze opened this issue Jun 23, 2016 · 8 comments
Closed

Changing totals sort order #328

DasPflanze opened this issue Jun 23, 2016 · 8 comments

Comments

@DasPflanze
Copy link

I'm trying to change the totals sort order for more than one day now, but so far I haven't managed. Also the FAQ doesn't help me.

Thats how it's at the moment:

And it should look like this:

Is it even possible? Please help me.
Best regards!

@Schrank
Copy link
Member

Schrank commented Jun 23, 2016

@DasPflanze
Copy link
Author

So I guess the important file is /app/code/core/Mage/Tax/etc/config.xml

<sales>
            <quote>
                <totals>
                    <tax_subtotal>
                        <class>tax/sales_total_quote_subtotal</class>
                        <after>freeshipping</after>
                        <before>tax,discount</before>
                    </tax_subtotal>
                    <tax_shipping>
                        <class>tax/sales_total_quote_shipping</class>
                        <after>shipping,tax_subtotal</after>
                        <before>tax,discount</before>
                    </tax_shipping>
                    <tax>
                        <class>tax/sales_total_quote_tax</class>
                        <after>subtotal,shipping</after>
                        <before>grand_total</before>
                        <renderer>tax/checkout_tax</renderer>
                        <admin_renderer>adminhtml/sales_order_create_totals_tax</admin_renderer>
                    </tax>
                    <subtotal>
                        <renderer>tax/checkout_subtotal</renderer>
                        <admin_renderer>adminhtml/sales_order_create_totals_subtotal</admin_renderer>
                    </subtotal>
                    <shipping>
                        <renderer>tax/checkout_shipping</renderer>
                        <admin_renderer>adminhtml/sales_order_create_totals_shipping</admin_renderer>
                    </shipping>
                    <discount>
                        <renderer>tax/checkout_discount</renderer>
                        <admin_renderer>adminhtml/sales_order_create_totals_discount</admin_renderer>
                    </discount>
                    <grand_total>
                        <renderer>tax/checkout_grandtotal</renderer>
                        <admin_renderer>adminhtml/sales_order_create_totals_grandtotal</admin_renderer>
                    </grand_total>
                </totals>
                <nominal_totals>
                    <nominal_tax_subtotal>
                        <class>tax/sales_total_quote_nominal_subtotal</class>
                        <sort_order>500</sort_order>
                    </nominal_tax_subtotal>
                    <nominal_tax>
                        <class>tax/sales_total_quote_nominal_tax</class>
                        <sort_order>750</sort_order>
                    </nominal_tax>
                </nominal_totals>
            </quote>
        </sales>

And I have to change this part, am I right?

@Schrank
Copy link
Member

Schrank commented Jun 23, 2016

Correct, you want to change this in your own module.

Quote is for the cart, beside this you have totals for order, invoice and creditmemo: app/code/core/Mage/Sales/etc/config.xml:1200

@Schrank Schrank closed this as completed Jun 23, 2016
@sprankhub
Copy link
Member

You may also be interested in #316 (comment).

@DasPflanze
Copy link
Author

I got it so far right now:

But now I need to change the order to get the tax to the bottom.

@Schrank
Copy link
Member

Schrank commented Jun 23, 2016

What is the problem? With before and after this should be achieveable. Have you read my blogpost? You need to fix the sorting unfortunately.

<after>shipping,tax_subtotal</after>
<before>tax,discount</before>

@Schrank Schrank reopened this Jun 23, 2016
@DasPflanze
Copy link
Author

My Problem is, that I can't find the code where I have to place the and

        <sales>
            <old_fields_map>
                <order>
                    <payment_authorization_expiration>payment_auth_expiration</payment_authorization_expiration>
                    <forced_do_shipment_with_invoice>forced_shipment_with_invoice</forced_do_shipment_with_invoice>
                    <base_shipping_hidden_tax_amount>base_shipping_hidden_tax_amnt</base_shipping_hidden_tax_amount>
                </order>
            </old_fields_map>
            <quote>
                <totals>
                    <nominal>
                        <class>sales/quote_address_total_nominal</class>
                        <before>subtotal</before>
                    </nominal>
                    <subtotal>
                        <class>sales/quote_address_total_subtotal</class>
                        <after>nominal</after>
                        <before>grand_total</before>
                    </subtotal>
                    <shipping>
                        <class>sales/quote_address_total_shipping</class>
                        <after>subtotal,freeshipping,tax_subtotal</after>
                        <before>grand_total</before>
                    </shipping>
                    <grand_total>
                        <class>sales/quote_address_total_grand</class>
                        <after>subtotal</after>
                    </grand_total>
                    <msrp>
                        <class>sales/quote_address_total_msrp</class>
                    </msrp>
                </totals>
                <nominal_totals>
                    <recurring_initial_fee>
                        <class>sales/quote_address_total_nominal_recurring_initial</class>
                        <sort_order>10</sort_order>
                    </recurring_initial_fee>
                    <recurring_trial_payment>
                        <class>sales/quote_address_total_nominal_recurring_trial</class>
                        <sort_order>50</sort_order>
                    </recurring_trial_payment>
                    <nominal_subtotal>
                        <class>sales/quote_address_total_nominal_subtotal</class>
                        <sort_order>250</sort_order>
                    </nominal_subtotal>
                    <nominal_shipping>
                        <class>sales/quote_address_total_nominal_shipping</class>
                        <sort_order>1250</sort_order>
                    </nominal_shipping>
                </nominal_totals>
                <item>
                    <product_attributes>
                        <sku/>
                        <type_id/>
                        <name/>
                        <status/>
                        <visibility/>
                        <price/>
                        <weight/>
                        <url_path/>
                        <url_key/>
                        <thumbnail/>
                        <small_image/>
                        <tax_class_id/>
                        <special_from_date/>
                        <special_to_date/>
                        <special_price/>
                        <cost/>
                        <is_recurring/>
                        <recurring_profile/>
                        <gift_message_available/>
                        <msrp_enabled/>
                        <msrp/>
                        <msrp_display_actual_price_type/>
                    </product_attributes>
                </item>
            </quote>
            <order>

I think somewhere here, but there is nothing related to tax.

@sprankhub
Copy link
Member

This question is independent from this extension.

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

3 participants