こんにちは。
初心者で非常に困っております。
Ver2.13.5です。
商品合計金額別、地域別で送料を変更したいのですが、送料が0円のまま反映されず、悪戦苦闘しております。
設定内容は下記のとおりです。
■送料の設定
◎北海道・沖縄は5,400円未満は1,080円/5,400円以上は送料無料
◎北海道・沖縄以外4,320円未満は864円/4,320円以上は送料無料
参考に下記のページを参考にphpを修正していたのですが反映されません。
http://xoops.ec-cube.net/modules/newbb/viewtopic.php?viewmode=thread&topic_id=10073&forum=10&post_id=48332#forumpost48332何が違うのかどこがおかしいのか、お分かりの方がおられましたら、お教えいただけませんでしょうか?
どうぞ宜しくお願い致します。
■LC_Page_Shopping_Confirm.php
// 合計金額
//$this->tpl_total_inctax[$this->cartKey] = $objCartSess->
getAllProductsTotal($this->cartKey);
// 合計金額
$CartProductsTotalPrice = $objCartSess->
getAllProductsTotal($this->cartKey);
// 一時受注テーブルの読込
$arrOrderTemp = $objPurchase->getOrderTemp($this->tpl_uniqid);
switch ($arrData['deliv_pref']) {
case 1: // 北海道
if ($CartProductsTotalPrice <= 5399)
{ $hoge = 1080; break; }
case 2: // 青森県
case 3: // 岩手県
case 4: // 宮城県
case 5: // 秋田県
case 6: // 山形県
case 7: // 福島県
case 8: // 茨城県
case 9: // 栃木県
case 10: // 群馬県
case 11: // 埼玉県
case 12: // 千葉県
case 13: // 東京都
case 14: // 神奈川県
case 15: // 新潟県
case 19: // 山梨県
case 20: // 長野県
case 16: // 富山県
case 17: // 石川県
case 18: // 福井県
case 23: // 愛知県
case 22: // 静岡県
case 21: // 岐阜県
case 24: // 三重県
case 27: // 大阪府
case 26: // 京都府
case 28: // 兵庫県
case 25: // 滋賀県
case 29: // 奈良県
case 30: // 和歌山県
case 31: // 鳥取県
case 32: // 島根県
case 33: // 岡山県
case 34: // 広島県
case 35: // 山口県
case 36: // 徳島県
case 37: // 香川県
case 38: // 愛媛県
case 39: // 高知県
case 40: // 福岡県
case 41: // 佐賀県
case 42: // 長崎県
case 43: // 熊本県
case 44: // 大分県
case 45: // 宮崎県
case 46: // 鹿児島県
if ($CartProductsTotalPrice <= 4319) {$hoge = 864;
break; }
default: // 沖縄県
if ($CartProductsTotalPrice <= 5399) {
$hoge = 1080; break; } } $this->tpl_total_inctax[$this->cartKey] = $CartProductsTotalPrice;
■SC_CartSession.php
/*function calculate($productTypeId, &$objCustomer, $use_point = 0,
$deliv_pref = "", $charge = 0, $discount = 0, $deliv_id = 0)
{*/ function calculate($productTypeId, &$objCustomer, $use_point = 0,
$deliv_pref = "", $charge = 0, $discount = 0, $a) {
$objDb = new SC_Helper_DB_Ex();
$total_point = $this->getAllProductsPoint($productTypeId);
$results['tax'] = $this->getAllProductsTax($productTypeId);
$results['subtotal'] = $this->getAllProductsTotal($productTypeId);
$results['deliv_fee'] = 0; }
var_dump($hoge);
// 商品ごとの送料を加算
if (OPTION_PRODUCT_DELIV_FEE == 1) {
$cartItems = $this->getCartList($productTypeId);
foreach ($cartItems as $item) {
$results['deliv_fee'] += $item['productsClass']['deliv_fee'] * $item['quantity'];
}
}
// 配送業者の送料を加算
/*if (OPTION_DELIV_FEE == 1
&& !SC_Utils_Ex::isBlank($deliv_pref)
&& !SC_Utils_Ex::isBlank($deliv_id)) { $results['deliv_fee'] += $objDb->sfGetDelivFee($deliv_pref,
$deliv_id); }*/