Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

"Buy Now" button


snowball87

Recommended Posts

Posted

Hi,

 

I want to add a Buy Now-button on my homepage for one of my products.

Normally the link would be "product_info.php?products_id=32&action=buy_now", if I wouldn't have any attributes for that product...

Now it just sends me to the products_info page where I have to click again on the Buy Now button to go to the shooping_cart.

 

Does someone has experience with this or have a piece of code that sends the attribute parameters in my link?

 

So, I just want to go from my index.php directly to my shopping_cart with the specified product in it, using only one click.

 

Greets & thanks

Posted

echo '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products['products_id']) . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_BUY_NOW) . '</a>';

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

That code works, so your doing something wrong. Did you put it within a form?

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

Probably I did something wrong, but the problem is solved now.

I removed the attributes (which was actually an option to choose the quantity) and added the "Product Quantity Dropdown on Product Info Page" contribution.

 

But thanks anyway for the fast replies ;)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...