|
-
Nov 21st, 2008, 06:31 AM
#1
Thread Starter
New Member
Help!
hi guys
i'm new to all this so please go easy as i don't even know if i'm in the right place
if anyone can help me figure out the link construction for the 'add to basket' button for this particular item i'd be forever grateful
http://www.picturesonwalls.com/Art_A...set=0&PageNo=1
http://www.picturesonwalls.com/Art_Prints.asp?ID=998001
cheers
-
Nov 21st, 2008, 07:55 AM
#2
Re: Help!
Welcome to the forum.
Yeah, you are in the wrong place But i can help you because i fun with css a long ago.
Code:
<input type="button" class='Button_Cart' name="btnAddToCart" value="ADD TO BASKET" onClick="document.form1.submit();">
Its a plain button of a html form that stuffed with some CSS, to change its look.
Here is the CSS that is passed.
Code:
.Button_Cart {background:#B4B4B4;
color:#000000;
cursor:pointer;
font-family:"Courier New", Courier, monospace;
font-size:10px;
height:20px;
width:100px;}
Here is the link to whole css that is used to stuff the things on that page:
http://www.picturesonwalls.com/Includes/Style.css
You can post your non-vb6 questions in these forums:
http://www.vbforums.com/forumdisplay.php?f=23
-
Nov 21st, 2008, 08:47 AM
#3
-
Nov 21st, 2008, 09:58 AM
#4
Re: Help!
It doesnt matter what is the input, in php there are a tons of ways to input a data, the only difference is, that the values are not arrives to the $_POST[''] but these values will arrive to the $_GET[''] array. Thats all.
Basicly, you can call an url like this:
Code:
http://mysite.com/cart.php?userid=12345&sessiondata=f44FnfaQn4468Gg&buyitem=10492
.. the following values are filled:
$_GET['userid'] // will be '12345'
$_GET['sessiondata'] // will be 'f44FnfaQn4468Gg'
$_GET['buyitem'] // will be '10492'
You just have to extend your cart to accept $_GET's and $_POST's (which one is filled).
Just take care about the session (and login) system, to not avoid the user session, otherwise your cart extension will be invalid, or just wont work. Walk thru the whole code to find out how it is identifies the user each time the code will run.
 Originally Posted by ericthedog
-
Nov 21st, 2008, 11:28 AM
#5
Thread Starter
New Member
Re: Help!
to be honest, that's like trying to read hieroglyphics, that's how new to this i am
if anyone can construct the direct link for this product:
http://www.picturesonwalls.com/Art_Prints.asp?ID=998001
to be automatically added to the basket:
http://www.picturesonwalls.com/Basket.asp
i'd really appreciate it
-
Nov 21st, 2008, 12:07 PM
#6
Re: Help!
OOOps my fault, but your PM just mislead me, that you are about to use PHP code. But you are in the ASP scripting, i dont know much about it...
Ask your questions here, this is the forum built for ASP scripting:
http://www.vbforums.com/forumdisplay.php?f=4
But, technically it should be the same just like in php. In ASP there are some lines in your code, where you can get the input fields from the html form. You just have to extend the code, to be able to retrieve the query strings, then you can compare which one contains the item id, that you can use to add an item to the basket.
So, this way you will get only one ASP script that does the two job, based on which method you call.
If you call the asp without any html form post, or query string, it will display the basket.
Code:
http://www.picturesonwalls.com/Basket.asp
But, if you call the same ASP but specified some query string, the appropirate method will be fired
Code:
http://www.picturesonwalls.com/Basket.asp?do=addbasket&itemid=12345
or
http://www.picturesonwalls.com/Basket.asp?do=delbasket&index=3
and so on..
Or, you can handle it simply, by using the html forms.
Code:
<input type="button" class='Button_Cart' name="btnAddToCart" value="ADD TO BASKET" onClick="document.form1.submit();">
<input type="button" class='Button_Cart' name="btnDelFromCart" value="REMOVE FROM BASKET" onClick="document.form1.submit();">
Last edited by Jim Davis; Nov 21st, 2008 at 12:24 PM.
-
Nov 21st, 2008, 11:06 PM
#7
Re: Help!
@Jim_Davis: can you post the original PM to this thread? it would help me understand more.
Also, please dont ask technical questions through pm, it helps if it is available for the whole forum to see
My usual boring signature: Something
-
Nov 22nd, 2008, 07:24 AM
#8
Re: Help!
@dclamp the only PM i received is the above quote i posted up there!
-
Nov 22nd, 2008, 08:58 PM
#9
Re: Help!
That form uses the POST method (as it well should). You can't construct a direct link to submit a POST request.
That isn't your site, is it? Why do you need to do this?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|