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

> 後台加程式碼問題
abceagle
發表於: 2008-11-10, 07:57 PM
引用文章


新進會員
*

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



請教如何將以下程式碼寫入後台,這是一個公司要擷取他們id用的,感謝協助!

********************************************
附上一個PHP程式碼,這個範例無法箝入您現有的網站,純粹是簡單示範要如何撰寫程式碼去抓取公司送來的會員識別號碼,您必須按照您現行網站程式語言自行修改, 在您的訂單後台系統增加一個RID欄位以便記錄每次點選聯結所帶來的RID 參數值。
*****************************************

This is the cookie code that would need to be put on the home page:

< ------------------------- Put this in the Header, must load first --------------------------->
<? php
setcookie("ID", $ _ GET['RID']);
? >
< ------------------------- End Code for Home Page --------------------------->

< ------------------------- Put this in the header of the checkout page or wherever you choose to call this cookie and where it can be submitted with the order --------------------->
<? php
if(isset($ _ COOKIE['RID']))
{
  $RID = $ _ COOKIE['RID'];
}
? >

< -------------------------- Put this code in the input code area of your form ----------------------------------->

      <input name ="ID" type ="" value ="<? echo $RID ? >" readonly ="true" size ="9" >

< ------------------------------------------ End of Code -------------------------------------------------------->

The only thing else would be to set this in your submit pages so that it carries with the order. You can modify this code any way that you see fit to set in your web page. If you are able to get this code to work, your URL would be http://Your WEB Site Address /index.php?RID= and we will send the RID when a customer or distributor clicks on it. This code will capture the RID on the home page in a cookie. Next, this code will call the cookie on the checkout screen where ever the customer will enter their shipping information and include it in the checkout form that you have already created. When they click continue, your pages must contain that value on the page so that it gets submitted with the order and so that you or your system will contain the RID on the order when it comes in for processing. This way you know it came from Market Taiwan. This is rather urgent that you make this happen because we have to be able to track the site id for all orders placed by our Market Taiwan distributors and their customers. You can develop a query tool in your orders file to list all orders with a RID in it and those are all the orders that will represent all Market Taiwan orders and that is what you will report on each month along with commissions.
傳送簡訊Email
Top
0 位使用者正在閱讀本主題 (0 位訪客及 0 位匿名使用者)
0 位會員:

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