我在提交注册表单后尝试将用户定向到特定页面。
我环顾四周,有些人建议使用这样的东西:
{% form 'create_customer' %}
<input type="hidden" name="return_to" value="/pages/registration-success"/>
然而,这不起作用。
在Shopify中提交表单后,有没有人知道如何指定用户登录的页面? (我已检查过文档,并与Shopify技术支持人员交谈过。没有关于此主题的任何文档)
答案 0 :(得分:1)
我在网络上找到了这个并且似乎有效。
<input type="hidden" name="checkout_url" value="/pages/registration-success">
我只是在{%form 'customer_login' %}
中使用它,并通过脚本将其设置为location.href。这允许我在登录后让客户返回到同一页面。