Login form redirect_to doesn't seem to work - bigcommerce

According to the docs using the following code should redirect a user upon login to /shop-all
<input type="hidden" id="redirect_to" name="redirect_to" value="/shop-all">
However, it doesn't seem to work. A user is redirected to account or cart (if they have items in their cart)
Has anybody got a work around for this?
Steps to reproduce behavior
Enter the line <input type="hidden" id="redirect_to" name="redirect_to" value="/shop-all"> into the form.html login form.
Run stencil
Log in to your BC Store

Related

Shopify checkout parameters

I'm working with a client who wants to have an order shipping address be filled on the cart page. I found that you can do it like this https://help.shopify.com/en/themes/customization/cart/use-permalinks-to-preload-cart, so I added few input fields to my cart form with name attributes (e.g. name=" checkout[shipping_address][address1]"). Everything worked ok for me but not for my client. He writes that info auto-filled but it is from memory from other Shopify orders he has made on other websites.
Help appreciated
It's a simple matter of HTML. All you have to do is to set autocomplete input parameter on off like that:
<input type="text" name="checkout[shipping_address][address1]" autocomplete="off" id="customerAddress1">
Documentation: https://www.w3schools.com/tags/att_input_autocomplete.asp
What it's happening here is that your customer is already logged and Shopify checkout is autofilling the customer address info on first step and skipping to checkout step number 2. You need to include &step=contact_information to Shopify checkout always render on first step and then permalink should work regardless if is logged or not.
So you should try adding this input on your cart template:
<input type="hidden" name="checkout[step] value="contact_information">

shopify: how to redirect user after login form submit on shopify

I am trying to direct users to a specific page after they submit the registration form.
I looked around, and some people suggest using something like this:
{% form 'create_customer' %}
<input type="hidden" name="return_to" value="/pages/registration-success"/>
However, that does not work.
Does any one know how to specify what page a user lands on after submitting a form in Shopify? (I have checked the documentation, and spoken with Shopify tech support. there isn't any documentation on this topic)
I found this somewhere on the web and seems to work.
<input type="hidden" name="checkout_url" value="/pages/registration-success">
I'm just using it in a {%form 'customer_login' %} though and setting it via script to location.href. This allows me to have customers return to the same page after logging in.

I don't want to save password when I do a login on any page

We always see that when we login any page then browser says that remember password or save password.
But I want to change this method. I want that browser will not ask me to save password and password box always should be empty and every time it needs to give password.
I think you are talking about autocomplete. You can use
autocomplete="off"
to not see auto suggestion.
example :
<input type="email" name="email" autocomplete="off">

How create a upload-form?

i need to set on my web page a upload form for videos and i want that this videos are sent to my mail.
i found this code
<form name="myWebForm" action="mailto:annie.etoile#gmail.com" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="10mb" />
<input type="video" name="uploadField" />
<input type="submit" value="Send">
</form>
But when i press on "Send" it opens my mailing software, it doesn't send autmatically to me the video.
Maybe there's something wrong in the code?
It "opens your mail software" because that's exactly what it's being told to do here:
action="mailto:annie.etoile#gmail.com"
When you say you want it to "upload"... Where do you want it to go? If you want to send it to the web server then you need some server-side resource which can receive it. For example, if you have a PHP page which accepts the file upload, you'd change your form action to that page:
action="fileupload.php"
Then you'd have server-side code in that PHP file to accept the uploaded file and do whatever you want to do with it. (Including mail it to you.)
It doesn't have to be PHP on the server-side code, any server-side language/framework/environment/etc. can do the job. The point is that you'd need something there. If all you have is client-side code (which is all you have in the question) then the mailto: action is about as good as it's going to get.

joomla user authentication by my own custom written form inputs

I've been struggling to find out about user authentication using your own form elements.
In order to make it clear, heres what i want to do.
I'm going to have a button which is going to redirect to a page.
Now, this page can be redirected to in the following ways.
A popup opens where the user needs to enter their email address and password.
My form is like this
<form action="userlogin.php" method="post">
<ul>Email
<li><input type="text" id="email" name="email" /></li>
</ul>
<ul>Password
<li><input type="password" id="pass" name="pass" /> </li>
</ul>
</form>
The user clicks the submit button and if the email address and password exist then we have a successful login and if they dont then we add that user in the database and then redirect.
I dont understand how to authenticate user login using this form i've mentioned about. Which file do i have to post it to and how can it work like a normal joomla login.
Please do help.
Thanks.
You can write your own authentication routine relatively easily in two steps.
Authentication Logic
For the authentication logic, in the plugins folder, there is another folder called "authentication". Aside from the default joomla authentication, there is another called "example.php", which you can clone and work on from there. These are the plugins that you can enable/disable in the plugins manager in your Joomla Administrator, so you can look at them and see the different ways that they authenicate (gmail, openid, etc.).
Be sure to scan/replace all the naming used in the copied file (it's not very big), and when you're happy with it, make an entry in table jos_plugins so that you can enable it in the Joomla administrator.
Your Form (using template atomic as the example, and assuming you're using mod_login)
Within /templates/atomic/html/mod_login you should have, a file called default.php. This is where you change the form to suit your needs, and incorporate into the authentication logic your wrote in the plugin.
Popup Approach
That will depend on the template you're using, and how it, or you, generally handle popups. Rockettheme have many popup modules (some being free) which demonstrate how you could do it that way, or jquery if you're comfortable with that, the list goes on....
You could override the existing login form and open this in a modal popup?