Buy Now button to bypass Cart?

Posts: 11
Joined: 10/15/2007

Hi,

I've been looking for a 'Buy Now' button for a Ubercart site with no luck.

I've used '

<?php
print $node->content['add_to_cart']['#value']
?>
' to print the Add to Cart button into my custom node.tpl and I'd like to include a Buy Now button underneath it.

I've seen the redirect function in the module but am unable to edit it myself at this point in my PHP career, hehe.

Does anyone have a way to achieve this or be willing to help me out?

Here's the site in question if your interested.

Thanks,
Marc

Posts: 5617
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

If you're looking to just add an item to the cart and go to the checkout screen, you can use the Cart Links module in core for that.

Posts: 11
Joined: 10/15/2007

Hi Ryan,

I think I know what you mean if so surely this will make both the 'Add to Cart' and 'Buy Now' act as a Buy Now link, Taking the user straight to the checkout?

Posts: 1376
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

With cart links you can set the destination to whatever you like. Check out the documentation for help. We use it on our site and it makes life much easier.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 11
Joined: 10/15/2007

Ah, thats perfect. works great, thanks!

Posts: 31
Joined: 10/23/2007

I have seen ‘uc_catalog_buy_it_now_form_’ in uc_product module, is this part of planed functionality?

The problem I have found with Cart Links is that it does not integrate with the inventory API.

You end up with ‘Add to Cart’ being unavailable when there is negative stock but still able to use ‘Buy Now’.

Any ideas?

Paul