Jump to content

Add to basket button


Guest

Recommended Posts

On the page that lists inventory in a particular category, I have added an "Add to Basket" button for people who don't want to look at "more info", but just want to add the item to their cart, but I cannot get it to actually add anything to the cart.

Here's the code I am trying to use:

....r: hand;\" onClick=\"location.href='view_cart.php?add=$product'\"><a h....

but when I check the link, it states the category and not the particular product.

It looks like it's taking the $product value as the category. (but, meanwhile, the button right beside it is ok.) I see the "more info" button is coded like:

....: hand;\" onClick=\"location.href='view_product.php?product=$product'\"><a...

where product=$product

anyone have ideas on how to "add=$product"?

I tried inserting"

...>";

product=$product

echo"... right before the add=$product to define it, but it didn't work.

Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...