Hi there,
This is my second question here after I purchased Plak few days ago, your theme is great, i could notice an increase in conversion rate due to its speed and great product page design.
Also I like your blurry coupon feature, but i have only one issue, for testing, when i sign in from the product page to see the coupon clearly, it redirects me to the customer account page.
Is there a way to redirect back to the product page where i was before sign in ?
Thanks in advance
Hi Carole and welcome back 🙂
Katrine here from Plak Support.
In order to redirect the users to the product page after sign in/ sign up, please follow these steps :
- From your Shopify dashboard, click online store > Actions > Edit Code
1-
- Open the file blurry-coupon.liquid
- On line 10 beginning with : <br><p> Blurry? <a href="/account/regist...
- Replace the entire line with the below code and click Save
<br><p> Blurry? <a href="/account/register?url={{ theme_role | theme_url }}">{{ 'customer.register.title' | t }}</a>/<a href="/account/login?url={{ theme_role | theme_url }}">{{ 'customer.login.sign_in' | t }}</a> to see the coupon <p>
2-
- Open the file customers/login.liquid
- Locate the line (number 9) {% form 'customer_login', novalidate: 'novalidate' %}
- Add this code just below it
<input id="urlRedirect" type="hidden" name="checkout_url" value="/collections/all" />
Then at the botton of the file, add this code
<script>
jQuery( document ).ready(function( $ ) {
document.getElementById("urlRedirect").value=getQueryVariable("url");
});
function getQueryVariable(variable)
{
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
if(pair[0] == variable){return pair[1];}
}
return("/collections/all");
}
</script>
Click Save
Note : When a user login from a different page than the product page, he will be redirected to the collection page
If you have any other questions or concerns, don't hesitate Carole to contact us
Katrine| Plak theme support
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as a Solved Solution
Oh wow it works great ! thanks a lot Katrine for the fast and accurate answer 🙂
Welcome to the Shopify Forum Community provided by Plak ThemeLLC, a place where you can discuss about eCommerce and Shopify, solve technical issues, get help with Shopify Design, Apps integration, Marketing, Facebooks ad, Google ads and more.
Before posting, we invite you to read and follow the forum rules | We also support any questions related to Free Shopify themes :Dawn, Express, Minimal, Brooklyn, Narrative, Supply, Debut, Venture, Boundless and Simple