맞춤 체크 아웃 모듈을 개발했으며 정상적으로 작동하고 있습니다. 새로운 결제 및 배송지 주소를 입력 할 때 첫 번째 결제를하는 동안 기본 결제 및 배송지 주소로 설정됩니다. 이제 새로운 배송지 주소를 입력 할 때마다 기본 배송지 주소로 지정해야합니다. 어쨌든, 나는이 일을 할 수 없다. 나는 다음을 시도했다 :Magento - 새 배송지 주소 (추가)를 기본값으로 설정하는 방법
$ shipdata는 새로운 주소 세부 사항을 가진 배열이다.
$shipAddress = $this->getQuote()->getShippingAddress();
$shipAddress->addData($shipdata);
$shipAddress->setIsDefaultShipping(true);
if($this->getQuote()->getDefaultShipping()) {
$this->getQuote()->setData('default_shipping', '');
$this->getQuote()->addAddress($shipAddress);
}
$this->getQuote()->collectTotals();
$this->getQuote()->save();
은 또한하여 $ shipdata
$shipdata['default_shipping'] = 1;
뿐만 아니라 도움이되지 않았다에 다음을 추가했습니다. 이 점에 대해 도움이 될만한 사람이 있습니까?