Impedire la modifica del metodo di spedizione a pagina Paypal recensione
-
16-10-2019 - |
Domanda
Vorrei sapere come prevenire shipping method change
al fine review page
( https: // www. mysite.com/paypal/express/review/ ).
Sto usando Magento 1.6.0
e Paypal Express Checkout
.
Soluzione
Ci sono due modi per gestire questo:
Elimina nel file vista ??h1>
Copia app / design / frontend / base / default / template / paypal / esprimere / recensione / spedizione / method.phtml per il pacchetto / tema, e modificare il contenuto a:
<fieldset id="shipping-method-container">
<p><strong><?php echo $this->renderShippingRateOption($this->getCurrentShippingRate())?></strong></p>
</fieldset>
<div style="display:none" id="shipping_method_update"><p><?php echo $this->__('Please update order data to get shipping methods and rates') ?></p></div>
Impostare l'opzione all'interno del modello
Esecuzione di un modello di riscrittura nel vostro modulo locale di app / code / core / Mage / Paypal / Modello / espresso / Checkout.php e riscrivere solo questo metodo seguente:
/**
* Check whether order review has enough data to initialize
*
* @param $token
* @throws Mage_Core_Exception
*/
public function prepareOrderReview($token = null)
{
parent::prepareOrderReview($token);
$this->_quote->setMayEditShippingMethod(false);
$this->_ignoreAddressValidation();
$this->_quote->collectTotals()->save();
}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange