Perch Shop Address form Saying 'Login' instead of 'OK!'

  • Here's a strange one...


    I'm building the checkout process for the shop, once the user has clicked through to checkout they are presented with a login or register screen. For existing users the perch_shop_addresses_set will not have been set so they are presented with the perch_shop_order_address_form asking them to choose a billing and delivery. However the form shows 'Login' on the submit button rather than the 'OK!' from the template.


    The form works fine and the addresses are set, but obviously 'Login' makes no sense to a user who has just logged in.


    Any ideas?

  • OK, I've done that - as a temporary fix I changed the value of the submit button on the customer_login.html template to 'Continue' - it is this value that get's inherited by the button on the perch_shop_order_address_form.


    I've had to divide the debug, the forum is not letting me post in full as it is saying it's too long?

  • Did you make that template change in the shop app template folder?


    Just in case... you can copy that template to your perch/templates/ folder following the same folder structure as in the shop app. And it will override the template in the shop app so you can make changes like this without worrying about them being overwritten by a shop app update.


    so if there was a template in :

    Code
    1. perch/addons/apps/perch_shop/templates/address/list.html

    you can copy it to:

    Code
    1. perch/templates/shop/address/list.html
  • Thanks Jordin,


    Looks like I've been using Perch Templates incorrectly for years. I recently replaced the shop app entirely to reset the base templates and started adding mine back into the correct place.


    The issue still persists though, logging in at that stage of the buying process changes the wording on the submit button of the perch_shop_order_address_form to 'login' rather than what the (default) template says it should be 'OK!'.

  • Hi Tony


    This can be confusing, especially if you're dealing with multiple templates.


    First, double check that none of your templates in your debug output are showing /perch/addons/perch_shop/templates as a path. They should all point to /perch/templates as Jordin pointed out.


    Perform a text search of all files inside your /perch/template folder for "value='Log in'" (or whatever is showing by mistake). That should then reveal your potential ghost in the machine.


    Jon

  • Thanks Jon,


    This is a strange one, as that's my normal process for working out what is being shown. Take a look at the video link below and you will see the text on the form 'change'.


    It inherits the submit button value from the previous screen, but if I go to a different page and then back again it uses the submit button value from the template.


    https://www.dropbox.com/s/hw4d…qk0l/checkoutbug.mov?dl=0

  • Hello Tony, and everyone else who's contributed.
    I found this post, while looking for an answer to the very same question.
    I had;

    perch_member_login_form,
    perch_shop_registration_form,
    perch_shop_order_addresses_form, and
    perch_shop_shipping_method_form

    All on the same page (showing and hiding with IF-statements of course).


    My problem: The same as you Tony, the mysterious OK! turned into "Log in".


    Here is what I discovered:
    The <input> id="" is set as id="submit" on a few of those form in the Templates.
    I changed the ID to "submit1", "submit2" etc on each template I used, and it seemed to fix the problem.
    I tested this a few times over, but its not a comprehensive test, but I feel the ID's on the submit buttons are the issue. - Hope this helps you and others.

    I <3 :burd1: but sometimes I ;( because I am not 8) enough to understand :burd1: like the :saint:'s. So your help is greatly appreciated :thumbup: