⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 powereasy.orderflow.asp

📁 个人网站比较简短
💻 ASP
📖 第 1 页 / 共 4 页
字号:
        End If
        strPresent = strPresent & "</b></td></tr>"
    End If
    Set rsPresent = Nothing
    ShowPresent = strPresent
End Function

Function ShowPresent2()
    Dim PresentID2
    Dim strPresent, rsPresent
    PresentID2 = PE_CLng(Trim(Request("PresentID2")))
    
    Set rsPresent = Conn.Execute("select * from PE_PresentProject where MinMoney<=" & dblTotal & " and MaxMoney>" & dblTotal & " and MaxMoney>" & dblTotal & " and BeginDate<=" & PE_Now & " and EndDate>=" & PE_Now & "")
    If Not (rsPresent.BOF And rsPresent.EOF) Then
        If FoundInArr(rsPresent("PresentContent"), "1", ",") And PresentID2 > 0 Then
            Set rsCart = Conn.Execute("select * from PE_Product where ProductID=" & PresentID2 & " and ProductType=4")
            If Not (rsCart.BOF And rsCart.EOF) Then
                strPresent = strPresent & "              <tr valign='middle' class='tdbg3'>"
                strPresent = strPresent & "                <td height='20' align='left'><input type='hidden' name='PresentID2' value='" & rsCart("ProductID") & "'>" & rsCart("ProductName") & " <font color='red'>(超值换购)</font></td>"
                strPresent = strPresent & "                <td width='44' align='center'>" & rsCart("Unit") & "</td>"
                strPresent = strPresent & "                <td width='54' align='center'>1</td>"
                strPresent = strPresent & "                <td width='64' align='center'><font color='red'>促销礼品</font></td>"
                strPresent = strPresent & "                <td width='64' align='center'><font color='red'>超值换购</font></td>"
                strPresent = strPresent & "                <td width='64' align='right'>" & FormatNumber(rsCart("Price_Original"), 2, vbTrue, vbFalse, vbTrue) & "</td>"
                strPresent = strPresent & "                <td width='44' align=center>─</td>"
                strPresent = strPresent & "                <td width='64' align='right'>" & FormatNumber(rsPresent("Price"), 2, vbTrue, vbFalse, vbTrue) & "</td>"
                strPresent = strPresent & "                <td width='84' align='right'>" & FormatNumber(rsPresent("Price"), 2, vbTrue, vbFalse, vbTrue) & "</td>"
                strPresent = strPresent & "              </tr>"
                dblTotal = dblTotal + rsPresent("Price")
                TotalWeight = TotalWeight + PE_CDbl(rsCart("Weight"))
            End If
            Set rsCart = Nothing
        End If
        Present2 = FoundInArr(rsPresent("PresentContent"), "2", ",")
        Present3 = FoundInArr(rsPresent("PresentContent"), "3", ",")
        Present4 = FoundInArr(rsPresent("PresentContent"), "4", ",")
        Cash = rsPresent("Cash")
        PresentExp = rsPresent("PresentExp")
        PresentPoint = rsPresent("PresentPoint")
    End If
    Set rsPresent = Nothing
    ShowPresent2 = strPresent
End Function

Function ShowPresent3()
    
    Dim strPresent, strTotalMoney, dblTotal_Original, Charge_Deliver_Original
    dblTotal_Original = dblTotal
    strPresent = strPresent & "            <tr class='tdbg3'>" & vbCrLf
    strPresent = strPresent & "              <td colspan='6'>付款方式折扣率:" & Discount_Payment & "%"
    strTotalMoney = "实际金额:(" & dblTotal & "×" & Discount_Payment & "%"
    If Discount_Payment > 0 And Discount_Payment < 100 Then
        dblTotal = dblTotal * Discount_Payment / 100
    End If
    
    Select Case ChargeType
    Case 0
        Charge_Deliver = 0
    Case 1
        If TotalWeight > 0 Then
            If TotalWeight > Weight_Min Then
                Dim iTemp
                iTemp = (TotalWeight - Weight_Min) / WeightPerUnit
                If iTemp > Fix(iTemp) Then
                    iTemp = Fix(iTemp) + 1
                End If
                Charge_Deliver = Charge_Min + iTemp * ChargePerUnit
                If Charge_Deliver > Charge_Max Then
                    Charge_Deliver = Charge_Max
                End If
            Else
                Charge_Deliver = Charge_Min
            End If
        Else
            Charge_Deliver = 0
        End If
    Case 2
        Charge_Deliver = dblTotal_Original * Charge_Percent / 100 + Charge_Min
        If Charge_Deliver > Charge_Max Then
            Charge_Deliver = Charge_Max
        End If
    End Select

    If Charge_Deliver > 0 And ReleaseType > 0 And dblTotal_Original >= MinMoney1 Then
        Charge_Deliver_Original = Charge_Deliver
        If Charge_Deliver <= ReleaseCharge Then
            Charge_Deliver = 0
        Else
            Charge_Deliver = Charge_Deliver - ReleaseCharge
        End If
        If dblTotal_Original >= MinMoney2 Then
            If dblTotal_Original >= MinMoney3 Then
                Charge_Deliver = 0
            Else
                If Charge_Deliver_Original <= MaxCharge Then
                    Charge_Deliver = 0
                End If
            End If
        End If
    End If

    strPresent = strPresent & "&nbsp;&nbsp;&nbsp;&nbsp;运费:" & Charge_Deliver & " 元"
    strTotalMoney = strTotalMoney & "+" & Charge_Deliver & ")"
    dblTotal = dblTotal + Charge_Deliver
    
    strPresent = strPresent & "&nbsp;&nbsp;&nbsp;&nbsp;税率:" & TaxRate & "%&nbsp;&nbsp;&nbsp;&nbsp;价格含税:"
    If IncludeTax = True Then
        strPresent = strPresent & "是"
        If NeedInvoice <> "Yes" Then
            strTotalMoney = strTotalMoney & "×(1-" & TaxRate & "%)"
            dblTotal = dblTotal * (100 - TaxRate) / 100
        Else
            strTotalMoney = strTotalMoney & "×100%"
        End If
    Else
        strPresent = strPresent & "否"
        If NeedInvoice = "Yes" Then
            strTotalMoney = strTotalMoney & "×(1+" & TaxRate & "%)"
            dblTotal = dblTotal * (100 + TaxRate) / 100
        Else
            strTotalMoney = strTotalMoney & "×100%"
        End If
    End If
    strTotalMoney = strTotalMoney & "=" & FormatNumber(dblTotal, 2, vbTrue, vbFalse, vbTrue) & " 元"
    strPresent = strPresent & "<br>" & strTotalMoney
    
    strPresent = strPresent & "              </td>" & vbCrLf
    strPresent = strPresent & "              <td colspan='2' align='right'><b>实际金额:</b></td>" & vbCrLf
    strPresent = strPresent & "              <td width='80' align=right><b> ¥" & FormatNumber(dblTotal, 2, vbTrue, vbFalse, vbTrue) & "</b></td>" & vbCrLf
        
    If (Present2 = True Or Present3 = True Or Present4 = True Or TotalExp > 0 Or TotalMoney > 0 Or TotalPoint > 0) And CheckUserLogined = True Then
        strPresent = strPresent & "<tr class='tdbg3'><td colspan='20'><b>另外,你还可以得到 "
        If Present2 = True Or TotalMoney > 0 Then
            strPresent = strPresent & "<font color='red'>" & Cash + TotalMoney & "</font> 元现金券"
        End If
        If Present3 = True Or TotalExp > 0 Then
            If Present2 = True Or TotalMoney > 0 Then
                strPresent = strPresent & " 和 "
            End If
            strPresent = strPresent & "<font color='red'>" & PresentExp + TotalExp & "</font> 点积分"
        End If
        If Present4 = True Or TotalPoint > 0 Then
            If Present2 = True Or Present3 = True Or TotalMoney > 0 Or TotalExp > 0 Then
                strPresent = strPresent & " 和 "
            End If
            strPresent = strPresent & "<font color='red'>" & PresentPoint + TotalPoint & "</font> " & PointUnit & PointName
        End If
        strPresent = strPresent & "</b></td></tr>"
    End If
    ShowPresent3 = strPresent
End Function

Sub AddToCart(CartID, iProductID, Quantity, IsPresent)
    Dim CartItemID, IsExistential
    If IsPresent = 0 Then
        Conn.Execute ("update PE_ShoppingCarts set Quantity=Quantity+0,UserName='" & UserName & "', UpdateTime=" & PE_Now & " where CartID='" & CartID & "' and ProductID=" & iProductID & ""), IsExistential
        If IsExistential = 0 Then
            Conn.Execute ("insert into PE_ShoppingCarts (CartID,ProductID,Quantity,PresentID,UserName,UpdateTime) values ('" & CartID & "'," & iProductID & "," & Quantity & "," & IsPresent & ",'" & UserName & "'," & PE_Now & ")")
        End If
    Else
        Conn.Execute ("insert into PE_ShoppingCarts (CartID,ProductID,Quantity,PresentID,UserName,UpdateTime) values ('" & CartID & "'," & iProductID & "," & Quantity & "," & IsPresent & ",'" & UserName & "'," & PE_Now & ")")
    End If
End Sub

Function SelectCart(CartID, IsPresent)
    Dim rsCartItem, ProductList
    ProductList = ""
    If IsPresent = 1 Then
        Set rsCartItem = Conn.Execute("select ProductID from PE_ShoppingCarts where CartID='" & CartID & "' and PresentID=1 order by CartItemID desc")
    Else
        Set rsCartItem = Conn.Execute("select ProductID from PE_ShoppingCarts where CartID='" & CartID & "' and PresentID=0 order by CartItemID desc")
    End If
    Do While Not rsCartItem.EOF
        If ProductList = "" Then
            ProductList = rsCartItem("ProductID")
        Else
            ProductList = ProductList & "," & rsCartItem("ProductID")
        End If
        rsCartItem.MoveNext
    Loop
    SelectCart = ProductList
    Set rsCartItem = Nothing
End Function

Function GetAmount(CartID, ProductID)
    Dim rsAmount
    Set rsAmount = Conn.Execute("select Quantity from PE_ShoppingCarts where CartID='" & CartID & "' and ProductID=" & ProductID & "")
    If Not (rsAmount.BOF And rsAmount.EOF) Then
        GetAmount = rsAmount(0)
    End If
End Function

Sub UpdateAmount(CartItemID, Amount)
    Conn.Execute ("Update PE_ShoppingCarts set Quantity=" & Amount & " where CartItemID=" & CartItemID & "")
End Sub

Sub DelCart(CartID)
    Conn.Execute ("delete from PE_ShoppingCarts where CartID='" & CartID & "'")
End Sub

Sub ReplaceCommon()
    Call ReplaceCommonLabel
    
    strHtml = PE_Replace(strHtml, "{$PageTitle}", strPageTitle)
    strHtml = PE_Replace(strHtml, "{$ShowPath}", ShowPath())
    strHtml = PE_Replace(strHtml, "{$MenuJS}", GetMenuJS(ChannelDir, ShowClassTreeGuide))
    strHtml = PE_Replace(strHtml, "{$Skin_CSS}", GetSkin_CSS(DefaultSkinID))
End Sub

Function XmlText_Class(ByVal iSmallNode, ByVal DefChar)
    XmlText_Class = XmlText("Product", iSmallNode, DefChar)
End Function

Function R_XmlText_Class(ByVal iSmallNode, ByVal DefChar)
    R_XmlText_Class = Replace(XmlText("Product", iSmallNode, DefChar), "{$ChannelShortName}", ChannelShortName)
End Function

%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -