WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce Add Charges To Payment Gateway
contribution to this plugin (new version!) (24 posts)

  1. belpha
    Member
    Posted 1 year ago #

    Hello I need some extra features to this cool plugin, so I added them by myself.

    I would like to share them with you and possibly to help the development of this plugin.

    So the changelog for "my" version 0.11 is:
    - add "mixed" type mode for extra fees (fixed + percentage)
    - add "include shipping in extra charge computation" option
    - display extra fees also in cart totals
    - javascript real-time selection of extra chargers fields / options
    - better algorithm for computation

    I don't know how to add the .php to this page, so you can download it from here: http://www.sendspace.com/file/i3h9ag

    Feel free to try it and please post your comment here.
    Thanks!!

    http://wordpress.org/plugins/woocommerce-add-extra-charges-option-to-payment-gateways/

  2. jayraaj.chavan
    Member
    Posted 10 months ago #

    Hello belpha,

    Great contribution to this plugin as needed. Only one issue i am facing is that the total amount is correct but the row is missing from the tables. I would be very thankful if you solve this issue for me. Thanks in advance.

    Please find the details below for your reference..

    WordPress version : 3.5
    Woocommerce Version : 2.0.13
    Theme : http://demo.yithemes.com/bazar/

  3. dekaru
    Member
    Posted 10 months ago #

    Hello. the mixed type is definitely very welcome! Could you tell us is the issue mentioned by jayraaj is fixed?

  4. jayraaj.chavan
    Member
    Posted 10 months ago #

    Hello belpha,

    Thank u for the contribution. Bill still my issue is persisting. The total amount is correct but the row is missing from the tables in bazar theme..

  5. belpha
    Member
    Posted 10 months ago #

    Hello Jayraaj and Dekaru, I'm glad you find my contribution useful!

    I checked again and I found a mistake using PHP_ROUND_HALF_UP, as fix I used 'ceil' function. I made a quick test, now the row displays correctly, please try it out and let me know, thanks!

    v 0.12 http://www.sendspace.com/file/1yxl5x

    EDIT: I just noticed you're talking about Bazar theme, I'm using CatchBox and I can see rows (the bug I fixed was on the value of the row).
    I never tried Bazar, this plugin uses standard hooks/actions from WooCommerce, maybe the Bazar overwrites them?

  6. dekaru
    Member
    Posted 10 months ago #

    Hello belpha!

    Thank you so much for the quick response!

    I noticed that the extra charges appear on my cart page before I've actually selected a payment method.

    Also, it seems that the plugin breaks the calculation auto-refresh on the initial checkout page: I select different payment gateways but the subtotal/shipping/fee/total doesn't update. I'm using the discover theme, fwiw.

    You can see a demo at:

    http://store.ixpiabot.com/

    Is there any way these issues can be fixed?

  7. belpha
    Member
    Posted 10 months ago #

    I had a look to your website, actual pc is Win7, Firefox 23.0.1.

    1) added two items to chart (price 200 + 100)
    http://img198.imageshack.us/img198/825/ijkm.jpg

    2) default payment type (price 200 + 100)
    http://img163.imageshack.us/img163/6862/bl1l.jpg

    3) MercadoPago type (price 200 + 100 + 6% = 312)
    http://img23.imageshack.us/img23/8619/x3tw.jpg

    4) going back to the chart (price 200 + 100 + 6% = 312)
    http://img837.imageshack.us/img837/4905/2pri.jpg

    Are you sure that you're running v 0.12?
    Cause at point 3 (with percentage) you should see a value of additional fees written in USD and not as xx%, also at point 4 you should get a line "additional fees" and value in USD.

    Do you get the same output?

    Here my shop, have a try: http://www.toxicindustries.net/?post_type=product

  8. dekaru
    Member
    Posted 10 months ago #

    Hello Fabrizio! Thank you very much for looking into this matter. I had actually deactivated type plugin version in favor of the original due to those issues I was having, however I have retired yours now so you can check it's behavior :)

  9. belpha
    Member
    Posted 10 months ago #

    About the "extra fees before payment method", go to settings and check if your default payment type has "--select--" in Extra Charges Type field.

    About the failed refresh, you're right, once selected a payment type it doesn't refresh. To force it to refresh, I selected the new type of payment, changed "envio" type and get back to original "envio".

    It seems the the JavaScript function I wrote doesn't work properly with your theme (as you can see it works with CatchBox, I was lucky). To solve it quickly, it would be better to translate it in jQuery but I'm not so skilled, we must find a js guru that help us :/

  10. dekaru
    Member
    Posted 10 months ago #

    Hello!

    Re: extra fees before choosing payment method
    I actually didn't have a default payment method set; once I set it the notice before choosing then showed the "MercadoPago" payment method even though my default payment method was set to electronic transfer.
    I tried setting electronic transfer (default method) both to "--select--" as well as fixed with 0, but no luck: the shopping cart still displays the "MercadoPago" non-default payment method.

    Re: failed refresh
    I see, it seems to work that way, although I have know noticed that the total sent to PayPal/MercadoPago does not reflect the updated fee (total+extra charge) at all! :O Seems like we've struck a wall

  11. panosdotk
    Member
    Posted 10 months ago #

    The issue with Bazar theme still exist? I really need a solution

  12. belpha
    Member
    Posted 10 months ago #

    @ Dekaru: try now, I made a couple of fix for display the fees correctly and add them to the gateway.

    About "mixed" charges, this is the algorithm (the one used by PayPal):

    NEW_TOTAL = (TOTAL + fixed) / (1 - percentage)

    Note that NEW_TOTAL is always rounded up to next cent, exemples:
    0,999 -> 1,00 || 1,000 -> 1,00 || 1,001 -> 1,01

    @ all: added a new jQuery function that should force update of chart fees after selecting the payment method, I can't test it with Bazar. Let me know!

    V 0.12 beta: http://www.sendspace.com/file/vr0hd5

  13. panosdotk
    Member
    Posted 10 months ago #

    I try v0.12 beta with Bazar ver 1.8.0 and it works if you select one page checkout. If I select the multistep checkout the fee is not updated.

  14. dekaru
    Member
    Posted 10 months ago #

    @belpha:
    The auto-refresh option on the checkout page when changing payment methods now works, thanks! It also now sends the total amount, along with specifics, to the payment gateway (PayPal).

    However I still see the extra fee on the shopping cart page *before* actually setting any payment gateway

    http://store.ixpiabot.com/carrito/

    I can see how this could be useful at some point, but right now it seems more like a bug rather than a feature. Is there something that can be done about it?

    Thanks!

  15. belpha
    Member
    Posted 10 months ago #

    Try to clean your browser history (or use another browser / computer), I'm sure the information about (last) payment method is stored into browser's cache.

  16. dekaru
    Member
    Posted 10 months ago #

    You were absolutely right: the payment fees on the cart page reflect the payment method chosen on the checkout page. If I have two tabs open, changing the payment method reflects on the extra fees shown on the shopping cart page. I guess it sounds logical.

    Thank you ! You've been very helpful! You should definitely create a pull request in github so that mRova adds your functionality to this plugin :)

    Do you have a donate button anywhere? :)

  17. jayraaj.chavan
    Member
    Posted 10 months ago #

    Hello Belpha,

    Now it's working with Bazar Theme. Thanks a lot for your fast and kind support.

  18. belpha
    Member
    Posted 10 months ago #

    @ jayraaj, thanks for your feedback!

    @ dekaru, glad to help! I tried to contact the original author in several ways but never got any reply so I think that I'll start a fork version of this plugin in the near future.
    Oh thanks, but I don't have any donation button, if I'll ever come to Mexico City, you can pay me a beer ;)

    @ panosdotk, it seems that woocommerce doesn't support multistep checkout natively, as said here https://twitter.com/feios/status/291974130327228417
    If there is any demo/trial version of Bazar that I can install to make some test I'll give a try, I don't want to spend 60USD just for make a fix :P

  19. panosdotk
    Member
    Posted 10 months ago #

    hi belpha
    tonight I will prepare a demo installation especially for you. please send me your email to forward the login details.

  20. dekaru
    Member
    Posted 10 months ago #

    Thanks Belpha, I'll be glad to! Let us know when you fork it so we can follow :) Thanks again!

  21. belpha
    Member
    Posted 10 months ago #

    @ Panosdotk, I'm sorry but from tomorrow I will be out of city for a month! So I can get back on this only around half October...

  22. panosdotk
    Member
    Posted 10 months ago #

    @belpha. I have already setup the theme. Anytime you want please let me know

  23. panosdotk
    Member
    Posted 7 months ago #

    The extra payment not showing to email sent to customers. The total amount is correct but no extra charge row. Can anybody provide a solution to this.
    Thank you

  24. z4x3r
    Member
    Posted 7 months ago #

    Hello panosdotk

    It is been a long time since that feature has been requested but has not been developed. I'm starting to think that it is not as easy as It seems to be.

    Maybe we could organize for a pro developer to fix this and split the cost between everyone who wants the feature?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.