1
주문 주소 양식에 사용자 정의 양식을 추가했습니다.Prestashop 1.5 주문 주소 양식 처리 중 후크를 사용하여 사용자 정의 양식을 저장하는 방법
주문 주소를 저장하는 중 맞춤 양식도 저장하고 싶지만 주문 주소 만 저장합니다.
아무도 도와 줄 수 있습니까? 여기
주문 주소 양식에 사용자 정의 양식을 추가했습니다.Prestashop 1.5 주문 주소 양식 처리 중 후크를 사용하여 사용자 정의 양식을 저장하는 방법
주문 주소를 저장하는 중 맞춤 양식도 저장하고 싶지만 주문 주소 만 저장합니다.
아무도 도와 줄 수 있습니까? 여기
내가 내 프로젝트에 이런 짓을 한 방법이다. 그것은 깨끗한 옵션이 아니지만 예상대로 작동하고 있습니다. 나는 상황에서 오류가 사라 졌어요, 리디렉션 사용할 때 내가 모듈 /mdoules/customform/customform.php
<?php
if (!defined('_PS_VERSION_'))
exit;
class CustomForm extends Module
{
public function __construct()
{
$this->name = 'customform';
$this->tab = 'administration';
$this->version = '1.0.0';
$this->author = 'Florian Lemaitre';
$this->need_instance = 0;
$this->bootstrap = true;
parent::__construct();
$this->displayName = $this->l('Custom Form');
$this->description = $this->l('Custom Form');
}
public function install()
{
return $this->createTable()
&& parent::install()
&& $this->registerHook('checkCustomForm');
}
public function hookcheckCustomForm($params)
{
[process your form values here (Tools::getValue('my_value') ...)]
if (error)
{
// We redirect to the Adrress page with a flag 'missing_value' to alert an error
Tools::redirect('index.php?controller=order&step=1&missing_value=true');
}
}
}
을 만들었습니다
: 나는 후크를 추가 한
order-carrier.tpl
의 상단에. 게다가 내 양식은 새로운 가치로 채워지지 않습니다. 리디렉션을 사용하여 요청에서 오류 및 데이터를 유지 관리하는 방법 아니면 그렇게 할 다른 방법이 있습니까? – santosh