Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 Paypal checkout only except for admin
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

perinius
Starting Member

USA
47 Posts

Posted - July 18 2007 :  14:43:42  Show Profile  Reply with Quote
I am trying to allow visitors only to see paypal as a checkout option but I would like to be able to have other payment options for myself. This would allow me to enter in the sales I did outside of the site and not have to mess with turning off and on other payment options in the setup.
I have adjusted the paypalipnshopcheckout and it works but i am sure it is not the best option and/or would error if I were to login and have the other payments set to yes (would try to run 2 of the same subs).

Below was my solution but if anyone knows of a better way please let me know.
Thanks,Ben


Sub DisplayOtherPayment
If AllowOtherPayment<>"Yes" Then exit sub
'added line below to show other payments only for me
'ElseIf
'Getsess ("lastname") ="YourLastName" then
shopwriteheaderpic getlang("langCheckoutOtherPaymentType"),"images/icons/cashier.gif"
Response.Write("<form name=""form1"" method=""post"" action=""" & getsess("currenturl") &""">")
Response.Write "<div class=""std_table"">"
Response.Write(tabledef)
Response.Write(tablerow & tablecolumn & getlang("langCheckoutPaymentType") & tablecolumnend & "<td>")
GenerateSelectNV OtherTypes,stroOther,"StroOther", OtherCount,getlang("langCommonSelect")
response.write "</td></tr>"
Response.Write(tablerow & tablecolumn & getlang("langCheckoutAdditional") & tablecolumnend & "<td><input class=""txtfield"" size=""50"" name=""strOMore"" value=" & Chr(34) & strOMore & Chr(34) & " /></td></tr>")
Response.Write(tabledefend)
Response.Write "</div>"
AddWebSessform
Response.Write "<div class=""std_table ar"">"
shopbutton Getconfig("xbuttoncontinue"),getlang("langCommonContinue"),"Action"
Response.Write "</div>"
Response.write "</form>"
'End If
end Sub


Sub DisplayOtherPayment
If Getsess ("lastname")<>"Paulsen" Then exit sub
'added line below to show other payments only for me
'ElseIf
'Getsess ("lastname") ="Paulsen" then
shopwriteheaderpic getlang("langCheckoutOtherPaymentType"),"images/icons/cashier.gif"
Response.Write("<form name=""form1"" method=""post"" action=""" & getsess("currenturl") &""">")
Response.Write "<div class=""std_table"">"
Response.Write(tabledef)
Response.Write(tablerow & tablecolumn & getlang("langCheckoutPaymentType") & tablecolumnend & "<td>")
GenerateSelectNV OtherTypes,stroOther,"StroOther", OtherCount,getlang("langCommonSelect")
response.write "</td></tr>"
Response.Write(tablerow & tablecolumn & getlang("langCheckoutAdditional") & tablecolumnend & "<td><input class=""txtfield"" size=""50"" name=""strOMore"" value=" & Chr(34) & strOMore & Chr(34) & " /></td></tr>")
Response.Write(tabledefend)
Response.Write "</div>"
AddWebSessform
Response.Write "<div class=""std_table ar"">"
shopbutton Getconfig("xbuttoncontinue"),getlang("langCommonContinue"),"Action"
Response.Write "</div>"
Response.write "</form>"
'End If
end Sub


Ben Paulsen
boardbag.com

perinius
Starting Member

USA
47 Posts

Posted - July 18 2007 :  14:48:26  Show Profile  Reply with Quote
The code is somewhat confusing being that I have the if else commented out but being that the first line shut down the code it wouldn't run the if else stmt within it and therefore did not work.

Ben Paulsen
boardbag.com
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