Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Offering Services
 Offering Bulk Import Service
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

wenyunhui
Starting Member

9 Posts

Posted - August 10 2004 :  09:10:01  Show Profile  Reply with Quote
When you set up vpasp on your website,the work left to be done is to bulk import data. It is boring and headaching.
I will offer quick and precise bulk import data service to anyone who dont like to do this work.
You may contact me with yahoo messgenger.

wenyunhui
Starting Member

9 Posts

Posted - October 25 2004 :  08:34:52  Show Profile  Reply with Quote
Many customers asked me to offer this service. In order to offer you quick service,please email us your sample product list file(excel or word format) and the database file (*.mdb), I'll import them to the database and then email back to you.


Go to Top of Page

wenyunhui
Starting Member

9 Posts

Posted - November 06 2004 :  05:48:37  Show Profile  Reply with Quote
say Total function

Some customers asked me how to add say Total function, here is the code:

Insert them to the bottom at shopformatorder.asp.
When you call this function,
just write sayTotal("US$",125.25)
the return value will like
"US$ One Hundred and Twenty Five and Cents Twenty Five Only"
=============================================================
Function sayTotal(symbol,totalamount)
'totalamount="21271.505"
totalamount=cstr(totalamount)

dim i,intnumber,decimalnumber,numberunit(3)
dim billion,million,thousand,hundred,decimal
'saytotal=symbol&SPACE(1)

intnumber=Trim(cstr(int(totalamount))) ' get the int part of totalamount,and transform to String without space
decimalnumber=Trim(cstr(Round((totalamount-intnumber)*100))) 'get the decimapl part of totalamount ydecimalpoint=2

' response.write totalamount & "<br>"
' response.write decimalnumber
' response.write "<br>"
' response.write Round((totalamount-intnumber)*100)&"---"
' response.write cstr(Round((totalamount-intnumber)*100))
'response.write decimalnumber
' response.end

'saythreenumber() billion£¬million£¬thousand
'900,732,266,043
'nine hundred billion
'seven hundred thirty two million
'two hundred sixty six thousand
'and forty three

totalamount=Right(string(12,"0")&intNumber,12)


billion=sayThreeNumber(mid(totalamount,1,3))
if billion<>"" then billion=billion&" BILLION, "

million=sayThreeNumber(mid(totalamount,4,3))
if million<>"" then million=million&" MILLION, "

thousand=sayThreeNumber(mid(totalamount,7,3))
if thousand<>"" then thousand=thousand&" THOUSAND, "

hundred=sayThreeNumber(mid(totalamount,10,3))
'if hundred<>"" then hundred=hundred&

decimalnumber=Right(string(3,"0")&decimalnumber,3)
'response.write decimalnumber
'response.end
decimal=sayThreeNumber(mid(decimalnumber,1,3))

sayTotal=billion&million&thousand&hundred
if intnumber="0" then sayTotal="ZERO"
if decimalnumber="000" then
sayTotal=sayTotal&" AND CENTS ZERO ONLY!"
else
sayTotal=sayTotal&" AND CENTS "&decimal&" ONLY!"
end if
sayTotal=symbol&space(1)&sayTotal




'for i=1 to len(totalamount)
' saytotal=saytotal&saydigit(mid(CSTR(totalamount),i,1))&space(1)
'next

'saytotal=symbol&totalamount&" ONLY."

'IF INSTR(CSTR(totalamount),".")=0 then
' sayTotal=sayTotal&"POINT ZERO ZERO"
'END IF
'saytotal=saytotal& " ONLY."
End Function

Function SayDigit(digit)
digit=cstr(digit)
if digit="" then digit="0"
digit=CInt(digit)
dim digitarrary(10)
digitarrary(0)="ZERO"
digitarrary(0)=""
digitarrary(1)="ONE"
digitarrary(2)="TWO"
digitarrary(3)="THREE"
digitarrary(4)="FOUR"
digitarrary(5)="FIVE"
digitarrary(6)="SIX"
digitarrary(7)="SEVEN"
digitarrary(8)="EIGHT"
digitarrary(9)="NINE"

IF DIGIT="." THEN
SAYDIGIT="POINT"
ELSE
SAYDIGIT=DIGITARRARY(digit)
END IF
End Function

Function sayDigitTen(digit)
dim digitTen,digitSingle,digitarrary(20)
digitTen=mid(digit,1,1)
digitSingle=mid(digit,2,1)

digitarrary(2)="TWENTY"
digitarrary(3)="THIRTY"
digitarrary(4)="FORTY"
digitarrary(5)="FIFTY"
digitarrary(6)="SIXTY"
digitarrary(7)="SEVENTY"
digitarrary(8)="EIGHTY"
digitarrary(9)="NINETY"
digitarrary(10)="TEN"
digitarrary(11)="ELEVEN"
digitarrary(12)="TWELVE"
digitarrary(13)="THIRTEEN"
digitarrary(14)="FOURTEEN"
digitarrary(15)="FIFTEEN"
digitarrary(16)="SIXTEEN"
digitarrary(17)="SEVENTEEN"
digitarrary(18)="EIGHTEEN"
digitarrary(19)="NINETEEN"

sayDigitTen=""
If digitTen ="0" then sayDigitTen=sayDigit(digitSingle)
If digitTen ="1" then sayDigitTen=digitarrary(cint(digit))
If digitTen >"1" then
if digitSingle>"0" then
sayDigitTen=digitarrary(cint(digitTen))&"-"&sayDigit(digitSingle)
else
sayDigitTen=digitarrary(cint(digitTen))
end if
End if


End Function


Function sayThreeNumber(digit)
'digit="123"
dim hundred,ten

if mid(digit,2,2)<>"00" then ten=sayDigitTen(mid(digit,2,2))
if mid(digit,1,1)<>"0" then ten=" AND "&ten


digit=Right(string(3,"0")&digit,3) ' Force digit's lenth>3
if mid(digit,1,1)<>"0" then
hundred=sayDigit(mid(digit,1,1))&" HUNDRED"
else
hundred=""
end if
sayThreeNumber=hundred&ten
End Function
=====================================================================



Edited by - wenyunhui on November 06 2004 05:50:06
Go to Top of Page

wenyunhui
Starting Member

9 Posts

Posted - November 06 2004 :  06:08:09  Show Profile  Reply with Quote
I have add some code to deal with the some complexed discounts
For example,if you buy 1,5,10 set products,the discount will work for one product while you buy 1,10,20 ,the discount work for another kind of products.


Go to Top of Page

wenyunhui
Starting Member

9 Posts

Posted - December 01 2004 :  19:27:48  Show Profile  Reply with Quote
Work Phone : 086-595-22996741
Work Email: [email protected]

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00