• Resolved MrSteed

    (@mrsteed)


    Hey guys!

    I am using the plugin WooCommerce Discounts Per Payment Method to calculate a discount automatically for prepaid payments.

    Now, the problem is:

    When you open the checkout page for the first time, the first payment option, selected by default, is prepayment. But the discount won’t get displayed on the calculating table.

    Then, if you reload the page, visit it again or switch to another payment method and back again to prepayment, it works fine as it’s supposed to do!

    Has anyone discovered this problem yet?
    I hope that bug isn’t theme related – I am using the theme fruitful.

    The page got tested by several different browsers and PCs, doesn’t work properly on each PC/browser.

    The address to my checkout page is:
    http://5.1.86.151/kasse/

    Some screenshots for explanation:

    Page gets accessed for the first time (or with a clean cache I guess):
    Prepayment selected by default, no discount there.
    http://i.imgur.com/513P1ZY.png

    Page reloaded OR another payment method selected and changed back: discount calculated properly.
    http://i.imgur.com/wpY55CV.png

    I’ve already tried to remove the default radio button selection, but unfortunately without success. There’s a thread in these forums here about removing the default radion button selection for the checkout page, but it isn’t solved yet (about 4 months ago).

    I hope someone can help me out here! Thank you!

    https://wordpress.org/plugins/woocommerce-payment-discounts/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter MrSteed

    (@mrsteed)

    Dear Claudio,

    please put yourself into my situation!!

    I simply can’t run the webshop, when the not calculated discount causes to total sum to be incorrect!
    Clients are told to get a discount on cash in advance payment – sometimes the discount shows up on the sum calculation table, sometimes not.

    I am waiting for a simple answer over one month now.
    Could you PLEASE answer me, if you understand the problem, if it is a general problem with your plugin or just theme related?

    What could I do to hotfix it (or you?)?

    For example, if I change the country or land option in the personal data form, the discount gets calculated how it’s supposed to do!
    I assume that’s in context with an AJAX REFRESH.

    Could you please provide a short hotfix for this big issue which keeps me from getting online with my webshop and puts me in this helpless situation?
    I think it would be just enough to AJAX refresh the whole form on the cart page on calling the page, so it doesn’t need the input of a city to refresh and it’d be correct in advance.

    Anyhow, PLEASE HELP ME!
    If you need something more in this case than the screenshots like other information, feel free to ask.
    I appreciate your help & Best Regards!!

    EDIT: I tried it again with an other theme, the problem is still there. Therefore I guess, the problem isn’t even theme related… ?!

    Plugin Author Claudio Sanches

    (@claudiosanches)

    @mrsteed please put yourself into my situation and read the plugin license:

    http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt

    Especially:

    NO WARRANTY

    11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
    FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
    OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
    PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
    OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
    TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
    PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
    REPAIR OR CORRECTION.

    12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
    WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
    REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
    INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
    OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
    TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
    YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
    PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
    POSSIBILITY OF SUCH DAMAGES.

    I will help you, but when I have free time for this.
    In the meantime, disable the plugin and work in your shop as if this plugin does not exist.

    Plugin Author Claudio Sanches

    (@claudiosanches)

    EDIT: I tried it again with an other theme, the problem is still there. Therefore I guess, the problem isn’t even theme related… ?!

    Have you tried using it with the Storefront?

    Thread Starter MrSteed

    (@mrsteed)

    Hey!

    Yes, I tried it with the storefront theme aswell.
    Have a look at this screenshot: http://i.imgur.com/2lBPmTO.png

    Remember, the discount calculation only fails on default payment option. When the payment option changes to COD and then back to PREPAID (causing an AJAX refresh) the discount is calculated well! (look screenshot)

    Do you have a slight idea when you will be able to fix this?

    Thank you in advance!

    Hey guys,

    i have the same problem with the ajax request.
    I think the best way for the problem and usubility will be to set no radio button as selected on page load.

    How is it possible? Any solution?

    Edit: I set the first Payment to “cash on pickup” and now it works fine, because the customer had to select it.

    Works!

    Thread Starter MrSteed

    (@mrsteed)

    @pictibe:

    That’s what I did, since I haven’t found out how to disable a default radio button selection.

    Not the best solution, because I wanted to show the customers the discount by default to encourage them to buy – but still applicable.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘discount not calculated/displayed the first time page gets accessed’ is closed to new replies.