0
我使用的是magento 1.7.0.2和Google Checkout。当想要使用统一费率,超过75美元的免费送货和在68美元到75美元之间的10%运费。免费送货在谷物在magento结帐
我如何在我的magento商店中实现所有这三个。
我使用的是magento 1.7.0.2和Google Checkout。当想要使用统一费率,超过75美元的免费送货和在68美元到75美元之间的10%运费。免费送货在谷物在magento结帐
我如何在我的magento商店中实现所有这三个。
我已经搜索了更多,得到了一个解决方案,它不是一个好主意,改变核心文件,但它的工作。您可以在谷歌结账发送之前通过费用计算价格。更改谷歌结帐的核心文件在/app/code/core/Mage/GoogleCheckout/Model/Api/Xml/checkout.php。
转到行579并根据需要制定条件。在我的情况的条件为:
*********************
$subTotal = Mage::getModel('checkout/cart')->getQuote()->getSubtotal();
if($subTotal <=68.50){
$xml .= <<<EOT
<{$nodeName} name="{$title}">
<shipping-restrictions>
<allowed-areas>
{$allowedAreasXml}
</allowed-areas>
</shipping-restrictions>
<price currency="{$this->getCurrency()}">{$price}</price>
</{$nodeName}>
EOT;
}
if(($subTotal > 68.50) && ($subTotal < 75)){
$price = $subTotal*10/100;
$xml .= <<<EOT
<{$nodeName} name="{$title}">
<shipping-restrictions>
<allowed-areas>
{$allowedAreasXml}
</allowed-areas>
</shipping-restrictions>
<price currency="{$this->getCurrency()}">{$price}</price>
</{$nodeName}>
EOT;
}
if($subTotal >=75){
$price = 0.00;
$xml .= <<<EOT
<{$nodeName} name="{$title}">
<shipping-restrictions>
<allowed-areas>
{$allowedAreasXml}
</allowed-areas>
</shipping-restrictions>
<price currency="{$this->getCurrency()}">{$price}</price>
</{$nodeName}>
EOT;
}
}
现在刷新您的商店,并与谷歌结帐付款。