Steve234
asked on
Convert small asp script to php
Hi,
I am attempting to set up my first shopping cart system for my first web site using 1shoppingcart.com. Unfortunately, I just found out my web hosting company does not support asp. However, they do support php. Is this a normal occurence of web hosting companies?
1shoppingcart.com gives the following asp script with the following directions so that their url does not show up in my customers browser, but my url will. I was told by my web hosting company that the same results can be obtained with php. So basically I just need a php script that will accomplish the same result as this asp script. I'm not a programmer, so please keep your explanations on how I use your script simple.
Thank you.
(Is 1shoppingcart.com a reputable company and/or do you have any other suggestions for a shopping cart system?)
The following is the 1shoppingcart.com asp script:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
'// Command Script generated and powered by
'// 1ShoppingCart.com(c) 2003
'// http://www.1shoppingcart.com
dim merchantID,cmd,dest,baseur l
merchantID="67928"
cmd=Request("cmd")
baseurl="http://www.1shoppingcart.com"
dest=baseurl&"/app/default .asp?id="& merchantid
if request("productid")<>"" then
if cmd="checkout" then
dest=baseurl&"/app/javanof .asp?merch antid="&me rchantID&" &"&request .querystri ng
else
dest=baseurl&"/app/netcart .asp?merch antid="&me rchantID&" &"&request .querystri ng
end if
elseif cmd<>"" then
select case cmd
case "cart"
dest=baseurl&"/app/netcart .asp?merch antid="&me rchantid
case "checkout"
dest=baseurl&"/app/javanof .asp?merch antid="&me rchantid
case "login"
dest=baseurl&"/app/aflogin .asp?merch antid="&me rchantid
case "signup"
dest=baseurl&"/app/afsignu p.asp?merc hantid="&m erchantid
case "cancel"
dest=baseurl&"/app/removes ave.asp?me rchantid=" &merchanti d&"&client id="&reque st("id")&" &removear= Yes"
case "update" 'change
dest=baseurl&"/app/r.asp?m erchantid= "&merchant id&"&id="& request("i d")&"&c=1"
case else 'home
dest="www.thebatteryshoppe.com"
end select
else
if request("af")<>"" then 'aftrack
dest=baseurl&"/app/aftrack .asp?afid= "&request( "af")&"&u= "&request( "u")
elseif request("ad")<>"" then 'adtrack
dest=baseurl&"/app/adtrack .asp?adid= "&request( "ad")
elseif request("email1")<>"" then 'contact
dest=baseurl&"/app/contact save.asp?m erchantid= "&merchant id
if request.querystring<>"" then dest=dest & "&" & request.querystring
if request.form<>"" then dest=dest & "&" & request.form
end if
end if
response.redirect(dest)
response.end()
%>
Directions of 1shoppingcart.com for the use of their script above:
With 1ShoppingCart.com and our simple Command Script, your links, ads, and affiliate traffic will all be pointed to your domain, rather than to http://www.1shoppingcart.com. Just follow the easy instructions in this setup wizard!
If you would prefer not to use the Command Script, just click the Skip button at bottom to start creating shopping cart products immediately.
First, choose a script platform, then copy-paste all of the code from the text box into a simple text editor (Notepad or Textpad, etc).
Next, save the code as cmd.asp (ASP) to your local hard drive.
After you have saved the file, upload it to your website. ASP users, just save the file to any folder on your site - we recommend you put it in the root ("home") folder.
Now, enter the URL for your Command Script file here.
Example: http://www.mydomain.com/cmd.asp
Press Save and Continue
Thats all the more directions I can provide at this time. I was told that my web host company uses a Linux based system, but my web site consists of html, php, javascript, and sql. I was told by my web hosting company that the same results as the asp script above can be obtained with php.
I sincerely appreciate your help.
Steve
www.thebatteryshoppe.com
I am attempting to set up my first shopping cart system for my first web site using 1shoppingcart.com. Unfortunately, I just found out my web hosting company does not support asp. However, they do support php. Is this a normal occurence of web hosting companies?
1shoppingcart.com gives the following asp script with the following directions so that their url does not show up in my customers browser, but my url will. I was told by my web hosting company that the same results can be obtained with php. So basically I just need a php script that will accomplish the same result as this asp script. I'm not a programmer, so please keep your explanations on how I use your script simple.
Thank you.
(Is 1shoppingcart.com a reputable company and/or do you have any other suggestions for a shopping cart system?)
The following is the 1shoppingcart.com asp script:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
'// Command Script generated and powered by
'// 1ShoppingCart.com(c) 2003
'// http://www.1shoppingcart.com
dim merchantID,cmd,dest,baseur
merchantID="67928"
cmd=Request("cmd")
baseurl="http://www.1shoppingcart.com"
dest=baseurl&"/app/default
if request("productid")<>"" then
if cmd="checkout" then
dest=baseurl&"/app/javanof
else
dest=baseurl&"/app/netcart
end if
elseif cmd<>"" then
select case cmd
case "cart"
dest=baseurl&"/app/netcart
case "checkout"
dest=baseurl&"/app/javanof
case "login"
dest=baseurl&"/app/aflogin
case "signup"
dest=baseurl&"/app/afsignu
case "cancel"
dest=baseurl&"/app/removes
case "update" 'change
dest=baseurl&"/app/r.asp?m
case else 'home
dest="www.thebatteryshoppe.com"
end select
else
if request("af")<>"" then 'aftrack
dest=baseurl&"/app/aftrack
elseif request("ad")<>"" then 'adtrack
dest=baseurl&"/app/adtrack
elseif request("email1")<>"" then 'contact
dest=baseurl&"/app/contact
if request.querystring<>"" then dest=dest & "&" & request.querystring
if request.form<>"" then dest=dest & "&" & request.form
end if
end if
response.redirect(dest)
response.end()
%>
Directions of 1shoppingcart.com for the use of their script above:
With 1ShoppingCart.com and our simple Command Script, your links, ads, and affiliate traffic will all be pointed to your domain, rather than to http://www.1shoppingcart.com. Just follow the easy instructions in this setup wizard!
If you would prefer not to use the Command Script, just click the Skip button at bottom to start creating shopping cart products immediately.
First, choose a script platform, then copy-paste all of the code from the text box into a simple text editor (Notepad or Textpad, etc).
Next, save the code as cmd.asp (ASP) to your local hard drive.
After you have saved the file, upload it to your website. ASP users, just save the file to any folder on your site - we recommend you put it in the root ("home") folder.
Now, enter the URL for your Command Script file here.
Example: http://www.mydomain.com/cmd.asp
Press Save and Continue
Thats all the more directions I can provide at this time. I was told that my web host company uses a Linux based system, but my web site consists of html, php, javascript, and sql. I was told by my web hosting company that the same results as the asp script above can be obtained with php.
I sincerely appreciate your help.
Steve
www.thebatteryshoppe.com
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I apologize, I did not remember that I had this question open.
For various reasons, I could not use that shopping cart software, so I don't know if the script above actually worked.
Thank you for taking your time to try and help me.
Steve
I'm posting another question in this section, if you're available.
Thanks.