Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/entity-framework/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Prestashop-为什么按钮默认重定向到../cart?_Prestashop - Fatal编程技术网

Prestashop-为什么按钮默认重定向到../cart?

Prestashop-为什么按钮默认重定向到../cart?,prestashop,Prestashop,我创建了一个带有提交按钮的表单,但它会打开购物车。它应该调用模块前控制器。 如何修复它 <form action="{$url}" method="post"> First name: <input type="text" name="fname"><br> Last name: <input type="text" name="lname"><br> <di

我创建了一个带有提交按钮的表单,但它会打开购物车。它应该调用模块前控制器。 如何修复它

<form action="{$url}" method="post">
            First name: <input type="text" name="fname"><br>
            Last name: <input type="text" name="lname"><br>
            <div class="modal-footer">
            <input type="submit" class="btn btn-primary" value="Submit">
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
        </form>

名字:
姓氏:
取消
检查您的操作值。html表单将重定向到操作url。

OMG。我真傻。我正在使用displayProductAdditionalInfo钩子。我创建的表单是另一种重定向到购物车的表单

可能这就是您在
{$url}
中拥有的url,提交表单时会重定向到该url。@Rolige{$url}等于其中offers是模块名,handler是控制器名。action值等于localhost/op/en/module/offers/handler,其中offers是模块名,handler是控制器名。。当我创建测试时,它也会将我重定向到购物车。