皆さん、私のマジェントストアにはJNE http://www.magentocommerce.com/magento-connect/suhanto-jne.htmlと呼ばれる配送方法が1つしかありません
顧客が都市を埋めるときに自動的に選択される配送方法を希望します。
私はすでにこれを検索して見つけました:http://www.magentocommerce.com/boards/viewthread/9223/#t33602
彼の解決策はこのようなものです
// find methods loop:
<?php foreach ($_rates as $_rate): ?>
// add checking for free shipping method and setting it as default
<?php if ($_rate->getCode()=='freeshipping_freeshipping' && !$this->getAddress()->getShippingMethod()) {
$this->getAddress()->setShippingMethod($_rate->getCode());
} ?>
available.html のどこにコードを配置すればよいかわかりません
ちなみに、このコードは available.html にあります
<?php if (!($_shippingRateGroups = $this->getShippingRates())): ?>
<strong><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></strong>
<dl class="shipment-methods">
<?php foreach ($_shippingRateGroups as $code => $_rates): ?>
<dt><?php echo $this->getCarrierName($code) ?></dt>
<dd>
<ul>
<?php foreach ($_rates as $_rate): ?>
<li>
<?php if ($_rate->getErrorMessage()): ?>
<ul class="messages"><li class="error-msg"><ul><li><?php echo $_rate->getErrorMessage() ?></li></ul></li></ul>
<?php else: ?>
<input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> onclick="shippingMethodStep.save()"/>
<label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $_rate->getMethodTitle() ?>
<strong>
<?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
<?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
<?php echo $_excl; ?>
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
<?php endif; ?>
</strong>
</label>
<?php endif ?>
</li>
<?php endforeach; ?>
</ul>
</dd>
<?php endforeach; ?>
そのソリューションをどこに置き換えまたは追加する必要があるか教えてください。
または、自動選択jne配送方法の別のソリューション