Jump to content
Sign in to follow this  
tec

STS add to cart button

Recommended Posts

hey there everyone, this may be a stupid question, but what the heck.

 

I have placed this code $addtocartbutton in my template, I assumed it would add items to the cart also, but when you click on the button, it doesnt do anything.

Any ideas?

Share this post


Link to post
Share on other sites
hey there everyone, this may be a stupid question, but what the heck.

 

I have placed this code $addtocartbutton in my template, I assumed it would add items to the cart also, but when you click on the button, it doesnt do anything.

Any ideas?

 

Probably not the best advice, but this is what I did:

 

<form name="cart_quantity" action="http://i-muffs.com/product_info.php?products_id=28&action=add_product" method="post">

<input type="hidden" name="products_id" value="28"><input type="image" src="images/orderButton.gif" border="0" alt="Order Now" title=" Order Now ">

</center>

</form>

 

I got this code from the product_info.php line for actually adding to cart. I'm sure you can change the product ID to fit whatever you want.

 

the cart im working on has only 1 product so it's easy that way.

 

one drawback that I think others might agree on is the lack of a osCid variable being passed in the link. I'm using STS as well and I haven't yet figured out how to go about this....if you know, please tell me. I know how to make a custom box if that helps.

Share this post


Link to post
Share on other sites
Probably not the best advice, but this is what I did:

 

<form name="cart_quantity" action="http://i-muffs.com/product_info.php?products_id=28&action=add_product" method="post">

<input type="hidden" name="products_id" value="28"><input type="image" src="images/orderButton.gif" border="0" alt="Order Now" title=" Order Now ">

</center>

</form>

 

I tried adding two of these forms to my product_info.php

like this ( i have 2 products)

<form name="cart_quantity" action="inmyspace.net/product_info.php?products_id=31&action=add_product" method="post">

<input type="hidden" name="products_id" value="31"><input type="image" src="images/orderButton.gif" border="0" alt="Order Now" title=" Order Now ">

</center>

</form>

<form name="cart_quantity" action="inmyspace.net/product_info.php?products_id=30&action=add_product" method="post">

<input type="hidden" name="products_id" value="30"><input type="image" src="images/orderButton.gif" border="0" alt="Order Now" title=" Order Now ">

</center>

</form>

 

the first one will add the item to the cart, the second one does not work

Share this post


Link to post
Share on other sites
I tried adding two of these forms to my product_info.php

like this ( i have 2 products)

<form name="cart_quantity" action="inmyspace.net/product_info.php?products_id=31&action=add_product" method="post">

<input type="hidden" name="products_id" value="31"><input type="image" src="images/orderButton.gif" border="0" alt="Order Now" title=" Order Now ">

</center>

</form>

<form name="cart_quantity" action="inmyspace.net/product_info.php?products_id=30&action=add_product" method="post">

<input type="hidden" name="products_id" value="30"><input type="image" src="images/orderButton.gif" border="0" alt="Order Now" title=" Order Now ">

</center>

</form>

 

the first one will add the item to the cart, the second one does not work

 

hmm, I really dont know...

 

What about the $startform and $endform elements that your supposed to use.

Share this post


Link to post
Share on other sites
hmm, I really dont know...

 

What about the $startform and $endform elements that your supposed to use.

 

shaunklink - Thank you for your post! I was having the same problem with the $addtocartbutton not working. When I looked for the $startform element it was not there. Now that I have added that element it works.

 

Thank you!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×