custompayments 1.2.1 doesn't find custom payments



  • MySQL-Version: 5.7
    PHP-Version: 7.0 (same error on 5.6 and 7.1)
    SSL enabled (same error without SSL)

    thirty bees 1.0.3

    Module custompayments 1.2.1 (same error with 1.2.0 and 1.1.0)

    Module custompayments does not display the generated payment (named “invoice”), although custompayments is activated for all user groups, all countries and all delivery services. I use the warehouse template (IQIT-COMMERCE.COM), but even with community-theme-default “Invoice” is not displayed. However, the modules “Bankwire” and “Paypal” work smoothly.
    (pictures: https://forum.thirtybees.com/topic/1242/modul-custompayments-zeigt-keine-neu-erstellte-zahlungsart-an/2 )

    Without AEUC an unlabeled button is displayed (also the confirmation button - if activated - is displayed after clicking on the unlabeled button), but with installed / activated AEUC custom payment “invoice” is not included at all, because it is probably queried about the name and therefore not found. I have already tried it with english shop language, the label is missing there as well, so no difference.

    Html code of unlabeled button:
    <div class=“row”>
    <div class=“col-xs-12”>
    <p class=“payment_module”>
    <a style=“background:url(’’) no-repeat scroll 15px 15px #FBFBFB"
    class=“custompayments"
    onclick=‘showForm(0)’ href='javascript:;'
    title=””>
    </a>
    <br/>
    <form action="http://www.buecher-boerse.eu/en/module/custompayments/validation"
    method=“post” id=“custompayments_hidden0” style=“display:none;”>
    <div class=“box cheque-box”>
    </div>
    <p>
    <b>Please confirm your order by clicking “I confirm my order”</b>
    </p>
    <p class=“cart_navigation clearfix”>
    <input type=“hidden” name=“id_custom_payment_method” value=“0”/>
    <button class=“button btn btn-default button-medium” type=“submit”>
    <span>I confirm my order<i class=“icon-chevron-right right”></i></span>
    </button>
    </p>
    </form>
    </p>
    </div>
    </div>

    “Title” in the html is empty, although named in the database “tb_custom_payment_method_lang” in field “name”, “description”, “description_success” and “description_short”. For both languages, “id_lang” 1 and 2, German and English.

    There is another bug, maybe related:
    No matter which group restrictions I change and save in the module “Module”> “Payment” for the three groups “Visitor”, “Guest”, “Customer”, the table “tb_custom_payment_method_group” in the database remains empty, “null records”!

    The assignment “id_custom_payment_method” to “id_group” does not seem to be entered in the database.

    Therefore, as i understand, the function
    "getCustomPaymentMethods ($ idLang, $ active = true, $ idCarrier = false, $ groups = [])"

    (in \html\modules\custompayments\classes\CustomPaymentMethod.php) can’t find any custom payments, because there is a conditional “if (!empty($groups))”?

    Therefore, i manually created three entry pairs for id_custom_payment_method = 1 with id_group = 1, 2, and 3 in table “custom_payment_method_group”. But this has not changed anything, except my insight that there is more than one error in the module “custompayments”: 1) The name of created custom payment is not read, so the button is not labeled and does not work. 2) The assignment to customer groups is not entered in the database.

    And … VAT is not calculated and presented in the shopping cart … but that’s another story …



  • When you edit the custom payment itself it has a pick for Carriers, do you have it set?..
    0_1514045480202_Capture.PNG



  • @SLiCK_303

    yes, I have activated. It has been stored in the database in the table “tb_custom_payment_method_carrier”, have checked it.

    I found by chance in the collection of translation-strings english > german, that I did not see everything in the admin for custompayments:

    displayed for settings:

    Carriers
    The carriers for which this method of payment is going to be used
    Save =

    NOT displayed for settings:
    No discount =
    Order discount: =
    Select cart rule =
    Groups: =
    The customer groups for which this method of payment is going to be used
    Shop association =
    Successfully deleted image =

    therefore i deleted 3 x the the if-condition
    if (Group :: isFeatureActive ()) { …}
    in file “AdminCustomPayments.php”

    After that “Groups” was displayed for activating and then entered in “custom_payment_method_group”.

    But that did not change the problem.

    Where is “Group :: isFeatureActive” assigned to “true”/“false”?



  • I not sure what the problem is then, I know initally when I was playing with the module I didn’t have my Carrier setup in the method itself, that’s why I asked. As for your question ‘Where is “Group :: isFeatureActive” assigned to “true”/“false”?’, I believe that happens in the custompayments/controllers/admin/AdminCustomPayments?.. I think you’ve modified that file already tho. So in other words…I can’t help you, sorry. Hopefully someone else has ideas.



  • @SLiCK_303
    i have activated custom payment in settings of custom payment, checked it also in settings of “Modules and Services” > “Payment methods” (? in german named “Zahlungsarten”) and also in database. No problem.
    But i was not able to setup custom payments for three customer groups. I hoped, to enable custom payments for three customer groups through bypassing “if (Group :: isFeatureActive ()) { …}” will solve the problem, but that’s not true. Custom payments doesnt’t work.

    I think you’ve modified that file already tho.

    yes, but i change only one thing at a time, if I poke in the fog, and then make it undone, before i try next.
    Thank you for your time and have a wonderful christmas … or - if you prefer - wonderful Saturnalia (have seen your website)… ;-)



  • Thanks for the well wishes, I hope you had a good christmas as well…
    At the bottom of the configuration for the Custom Payments Methods, when you edit your method, has a checkbox setup for groups, you have that setup, right?



  • @SLiCK_303
    Checkbox for groups wasn’t visible. After removing of “if (Group :: isFeatureActive ()) { …}” in AdminCustomPayments.php, checkbox was visible and value-pairs was stored in database after checking three checkboxes. Maybe “if (Group :: isFeatureActive ()) { …}” is also asked, where the generated custom payments are queried, and if =false, they will not be found. I don’t know why i have “Group :: isFeatureActive” assigned to “false” and where i can change it to “true”.



  • Sorry, sorry, sorry…
    That’s not a bug, that’s my tremendous stupidity. In settings > “Performance” > “Customer Groups” were disabled: “Choose “No” to disable Customer Groups.” :-(
    After switching to “yes”, custom payments works fine.



  • nice job finding the problem…



  • In terms of custom payments: Basically, I doubt how the order in the one-page checkout can actually work: it’s the reverse order (from top to bottom) as in the 5-step order process. The customer chooses first a payment method, then a shipping method, as the third decides the shop code, as to which customer group (guest, create account) befitting he ordered and then he enters his address. What if the payment method and / or shipping method was not approved by the shop owner for this customer group and / or address? I think order should be as in 5-step order process?



  • Finally, i think query for custom payments should be changed, to enable custom payments also for setting “user groups” = “no” in “Performance”.


  • administrators

    Hey, sorry for not replying earlier. Looks like a bug indeed. I’ll double-check with customer groups = no and see if that problem can be solved in the next version.



  • No problem, in the meantime i will activate user groups. Any chance for beta test 1.0.4 ?


  • administrators

    Updating thirty bees will not change how this module works.

    You can grab the release candidate from GitHub if you like: https://github.com/thirtybees/thirtybees/releases



  • Fine, thank you!


  • administrators

    Looks like a bug indeed. I’m on it!


  • administrators

    Here’s an update you can test:
    0_1514486124889_custompayments-v1.2.2.zip



  • You are faster than Santa’s reindeer!
    Yes, it works fine without user groups on both one-page-checkout and five-page-checkout.
    Thank you very much


Log in to reply
 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.