Zamiast dostać odpowiedź ajaxem strona się przeładowuje... Może spróbuję dodać jakiś swój moduł, który po prostu nadpisze ten blok, ale nie wiem czy nie rozwalę całkiem edycji zamówienia :)
edit:
znalazłem miejsce gdzie to się wywala:
Mage_Adminhtml_Block_Sales_Order_Create_Shipping_Method_Form::getShippingRates()
to jest ta funkcja:
1 2 3 4 5 6 7 8 | public function getShippingRates()
{
if ( empty ( $this ->_rates)) {
$groups = $this ->getAddress()->getGroupedAllShippingRates();
return $this ->_rates = $groups ;
}
return $this ->_rates;
}
|
Gdy edytuję którykolwiek produkt, metoda $this->getAddress()->getGroupedAllShippingRates() zwraca null.
Wywołanie $this->getAddress()->getGroupedAllShippingRates() lub $this->getAddress()->getAllShippingRates() zwraca null.
Sprawdzałem, czy adres jest zdefiniowany - $this->getAddress() zwraca obiekt Mage_Sales_Model_Quote_Address zawierający odpowiednie dane, czyli chyba w porządku.
Edit:
Po dwukrotnym kliknięciu w link wspomniany wyżej i zmianie funkcji metody się pojawiają, ale trochę bez sensu że trzeba 2 razy przeładować stronę..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | public function getShippingRates()
{
if ( empty ( $this ->_rates)) {
$groups = $this ->getAddress()->getGroupedAllShippingRates();
if (! $this ->_rates) {
$quote = $this ->getQuote();
$quote ->getShippingAddress()
->setCity()
->setCountryId( 'PL' )
->setPostcode( '12-345' )
->setRegionId()
->setRegion()
->setCollectShippingRates(true);
$quote ->save();
$this ->_rates = $quote ->getShippingAddress()->getGroupedAllShippingRates();
$groups = $quote ->getShippingAddress()->getGroupedAllShippingRates();
}
return $this ->_rates = $groups ;
}
return $this ->_rates;
}
|