PHOENIX-MEDIA / Magento-CashOnDelivery

Cash on Delivery allows to book additional fee on delivery depending on inland or international delivery.
43 stars 46 forks source link

COD Fee on summary #8

Closed sander010587 closed 6 years ago

sander010587 commented 10 years ago

Hello,

We have installed the most recent version from magento connect and the most recent version from github but both versions still show the price on the summary during checkout without tax even though we have selected to show it including tax.

Is there still no working fix available? We have the OneStepCheckout checkout extension installed, can this cause the conflict? I e-mailed to the phoenix support e-mail but I can't get a response...

Hope to hear from you soon.

Kind regards,

Sander

schnere commented 10 years ago

Hi,

you've set the option in "System -> Configuration -> Sales -> Tax -> Price Display Settings -> Display Cod Fee" to "including Tax"?

This works for me in regular checkout and with the 3rd party module FireCheckout.

For further information - can you provide a screenshot?

Best regards,

schnere

PS: did you try the latest version from Magento Connect or the one from Github?

sander010587 commented 10 years ago

Hi Schnere,

Thanks for your fast comment. I have set the following: Tax settings: image

COD settings: image

Unfortunately the review is showing this (rembourskosten = cod fee translated in Dutch): image

which is without tax: €7,85 * 1,21 = €9,50

I tried the solutions posted on: http://www.magentocommerce.com/boards/viewthread/184852/ but they didn't make any difference.

And of course I always cleared cache + APC cache + varnish cache ;)

Please let me know if you have any suggestion I can still try.

Thanks, Sander

sander010587 commented 10 years ago

By the way it is showing correctly on the payment section on the OneStepCheckout:

image

but the order review/summary is showing without tax. The payment name itself is hard coded: "Rembourskosten (+€9,50)".

We really would like to have it including tax because for The Netherlands we can then just put everything including tax and won't have to display the tax anymore. But if we do it now the sum would be incorrect since COD is the wrong amount.

Sander.

schnere commented 10 years ago

Hi,

your settings seem to be correct. So it might be an issue with the OneStepCheckout module.

Please take a look at the following file: https://github.com/PHOENIX-MEDIA/Magento-CashOnDelivery/blob/master/app/design/frontend/base/default/template/phoenix/cashondelivery/checkout/cod.phtml

Compare this with yours. And check if it gets overwritten within your template. You should also debug the value of $this->displayIncludeTax() in this file.

Hope this helps.

schnere

sander010587 commented 10 years ago

Hello,

I think you are correct. I manually went to the checkout/onepage and I see the following: image

That is one correct COD fee showing there!

So I digged into the OSC code and fixed it :) image

By changing the following in /app/design/frontend/base/default/template/onestepcheckout/summary.phtml

    <td class="value">
        <?php echo $this->helper('checkout')->formatPrice($value); ?>
    </td>

to

    <td class="value">
        <?php //fix COD with tax
            if($total->getCode()=='phoenix_cashondelivery'){
                echo $this->helper('checkout')->formatPrice($value + $this->helper('checkout')->getQuote()->getShippingAddress()->getData('cod_tax_amount'));
            }else{ echo $this->helper('checkout')->formatPrice($value); } 
        ?>
    </td>

The check isn't fully proof yet since now if tax is disabled it will still show including text. So one && function has to be written for the if statement to check if the tax has to be displayed or not.

Thanks for pointing me in the right direction Schnere!

Kind regards,

Sander