Forum

Thread tagged as: Question, Problem, Shop

Shipping Method Form Submit has value "Log in"

Hi,

I've used on a page for the Perch Shop app the perch_shop_shipping_method_form(); function.

Even though in my template I've specified a different value for the submit button, it shows the value "Log in" instead.

This is my template:


<perch:form id="shipping_method" method="post" app="perch_shop"> <h4>Please confirm your Shipping method by selecting below and clicking ok.</h4> <perch:error for="all" type="login"> <p class="error">Sorry, there was a problem.</p> </perch:error> <div> <perch:label for="shipping">Method</perch:label> <perch:input type="select" options="<perch:shop id="shippings_list" />" id="shipping" required="true" placeholder="Please choose" /> <perch:error for="shipping" type="required">Required</perch:error> </div> <div> <perch:input type="submit" id="submit" value="Click here to confirm shipping method" /> <perch:input type="hidden" id="r" /> </div> </perch:form>

Is this right?

Thanks Alex

Alex Bennett

Alex Bennett 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What do you mean by the value for "Log in" ?

It actually reads "log in" on the submit button rather than "Click here to confirm shipping method", and I cannot work out where this wording is coming from...

Drew McLellan

Drew McLellan 2638 points
Perch Support

What else is on the page?

Ah - yes it also has the login form and registration form that can show up conditionally as here:


<?php //Check if user is logged in if (!perch_member_logged_in()) { // Returning customer login form perch_shop_login_form(); // New customer sign up form perch_shop_registration_form(); } // assign value from shop cart to variable $cartvalue = perch_shop_cart_item_count([], true); //Display message if cart is empty if ($cartvalue == 0) { perch_content('Shipping Introduction'); ?> <p>Your Cart is currently empty, please add some products before selecting a shipping method.</p> <?php } else { //Otherwise iif user logged in and cart has value display shipping methods if (perch_member_logged_in()) { perch_content('Shipping Introduction'); perch_shop_shipping_method_form(); // Show logout link ?> <a href="checkout.php">Shipping confirmed? If yes then click here to checkout</a><br /> <a href="shop-logout.php">Logout</a> <?php } } ?>

I'm wondering if I actually need the shipping method form. I only have one standard shipping and then it's free over a certain price, and it looks like these set themselves by default? Do you think I still need the customer to confirm?

Thanks, Alex