發表回覆建立主題發起投票

> VIP群組價格如何與原價並列顯示?
release
發表於: 2012-06-20, 06:00 PM
引用文章


進階會員
***

所屬群組: 註冊會員
發表總數: 41
會員編號: 12421
註冊日期: --



目前在後台的各商品頁面最下方,只要輸入折扣,即會被系統計算出特價,
並在前台以紅字顯示,原價則為黑字加橫槓,而兩種價格可並列,讓客戶瞭解其價差。

但本站的問題是:因另採「商務VIP價」(會員群組中,加列「商務VIP」群組),在後台的「商務VIP價」欄輸入價格後,
前台並無法如上段文字的狀況,將「商務VIP價」和原價並列顯示,而只顯示一個群組價格,無法瞭解價差。

故想請問老爹:
若要解決此問題,一樣是仿照下列這帖的四、五的修改方式,http://ppt.cc/HKrP
修改這幾個檔嗎?還是有其他需修改的檔?
inc\twe_format_special_price.inc.php
\inc\twe_format_price.inc.php
\lang\tchines\tchinese.php

還望告知群組價格是以哪個變數、在哪支程式被定義。
謝謝!
傳送簡訊Email
Top
oldpa
發表於: 2012-06-20, 06:54 PM
引用文章


超級會員
*****

所屬群組: 管理群組
發表總數: 5460
會員編號: 1
註冊日期: --



價格判斷主要是
inc/twe_get_products_price.inc.php



--------------------
Twecommerce 崴騰科技有限公司
台中市西區五權五街264號 統一編號:86168702
電話:04-23781970 FAX:04-23781969 liang.ishiang@msa.hinet.net
傳送簡訊個人網站
Top
release
發表於: 2012-06-21, 07:42 PM
引用文章


進階會員
***

所屬群組: 註冊會員
發表總數: 41
會員編號: 12421
註冊日期: --



QUOTE (oldpa @ Jun 20 2012, 06:54 PM)
價格判斷主要是
inc/twe_get_products_price.inc.php

所以是這段程式碼決定了價格的字串要到哪個程式去抓?
(決定是去twe_format_special_price.inc.php抓,或是去twe_format_price.inc.php抓?
如果是去twe_format_price.inc.php抓,就只會顯示一個價格?
而若是去twe_format_special_price.inc.php抓,就會將原價和特價並列顯示?)

// calculate price with rabatt
$rabatt_string = $price_string - ($price_string/100*$discount);
if ($price_string==$rabatt_string) {
$price_string=twe_format_price($price_string*$quantity,$price_special,$calculate_currencies=true);
} else {
$price_string=twe_format_special_price($rabatt_string,$price_string,$price_special,$calculate_currencies=true,$quantity,$products_tax);
}

那想請問老爹,可否直接修改twe_format_price.inc.php的末段程式碼,也就是修改這段
if ($show_currencies == 1) {
  $price_string = $currencies_data['SYMBOL_LEFT']. ' '.$price_string.' '.$currencies_data['SYMBOL_RIGHT'];
 }
讓它可以同時顯示原價和群組價格?

若此方法可行,是否須先在twe_get_products_price.inc.php裏另外定義群組價格?或是可以直接使用老爹定義的$group_price_data呢?

不知我的理解方向有沒有錯誤?若有方向偏差,還望老爹包涵。
傳送簡訊Email
Top
oldpa
發表於: 2012-06-21, 08:15 PM
引用文章


超級會員
*****

所屬群組: 管理群組
發表總數: 5460
會員編號: 1
註冊日期: --



資料庫中資料表
personal_offers_by_customers_status_1(訪客價格)

personal_offers_by_customers_status_2(會員價格)

personal_offers_by_customers_status_3(舉例是VIP價格)

客戶登入後程式會依客戶屬於哪一個層級來顯示價格
所以必須是同時顯示
資料庫中products資料表
裡的
products_price

personal_offers_by_customers_status_3(舉例是VIP價格)

資料都撈出後
才會到屬於

twe_format_special_price.inc.php
或是
twe_format_price.inc.php
的工作


--------------------
Twecommerce 崴騰科技有限公司
台中市西區五權五街264號 統一編號:86168702
電話:04-23781970 FAX:04-23781969 liang.ishiang@msa.hinet.net
傳送簡訊個人網站
Top
release
發表於: 2012-09-04, 10:52 PM
引用文章


進階會員
***

所屬群組: 註冊會員
發表總數: 41
會員編號: 12421
註冊日期: --



現將上次修改成功後的改法貼在此處,以供大家參考。
程式說明:
假設客戶屬於群組A,現想讓商品原價和群組A價格並列,使客戶瞭解價差。
所以需要先修改twe_get_products_price.inc.php,使其在該客戶「群組資格(含分級價格)」及「適用折扣」均判別完後,撈出原價和群組價(但若無群組價,則只撈原價),接下來再把價格的顯示工作交給twe_format_price.inc.php或twe_format_group_price.inc.php處理。需修改的檔案及程式碼如下:

1.開啟 inc/twe_get_products_price.inc.php
搜尋「// format price & calculate currency」,將下方的
「$price_string=twe_format_price($price_string*$quantity,$price_special,$calculate_currencies=true);」
改成
「 $ori_price=twe_add_tax($price_data['PRODUCTS_PRICE'],$products_tax);
if ( $price_string==$ori_price ) {
$price_string=twe_format_price($price_string*$quantity,$price_special,$calculate_currencies=true);
 }  
   else {$price_string=twe_format_group_price($price_string,$ori_price,$price_special,$calculate_currencies=true,$quantity,$products_tax);
  }
其中$ori_price是在下自行設定用來指定原價的參數

2.開啟 inc/ twe_format_special_price.inc.php
將第3行及第18行的「twe_format_special_price」
均替換成「twe_format_group_price」。
記得修改後,須另存成新檔名twe_format_group_price.inc.php

註:若群組價格的字體顏色大小均與特價相同時,可直接以twe_format_special_price.inc.php的格式套用即可,不需另外設立新檔。
此處另外設立twe_format_group_price.inc.php,是為了方便各別標示兩種價格之顏色大小。至於價格字體顏色大小之修改,可參考此帖:http://ppt.cc/WS08
傳送簡訊Email
Top
kachu
發表於: 2012-10-16, 03:35 PM
引用文章


進階會員
***

所屬群組: 註冊會員
發表總數: 57
會員編號: 14544
註冊日期: --




開啟 inc/twe_get_products_price.inc.php
搜尋「// format price & calculate currency」,將下方的
「$price_string=twe_format_price($price_string*$quantity,$price_special,$calculate_currencies=true);」
改成
「 $ori_price=twe_add_tax($price_data['PRODUCTS_PRICE'],$products_tax);
if ( $price_string==$ori_price ) {
$price_string=twe_format_price($price_string*$quantity,$price_special,$calculate_currencies=true);
 }  
   else {$price_string=twe_format_group_price($price_string,$ori_price,$price_special,$calculate_currencies=true,$quantity,$products_tax);
  }

卻出現133行有錯誤,不能執行.....
傳送簡訊Email
Top
0 位使用者正在閱讀本主題 (0 位訪客及 0 位匿名使用者)
0 位會員:

主題選項 發表回覆建立主題發起投票