1 reply [Last post]
gargsuchi's picture
Joined: 10/21/2009
Juice: 7
Was this information Helpful?

Hi All
I am a total noob when it comes to ubercart.
I am using ubercart for an implementation which is a single product store and where we don't need the shopping Cart functionality. Basically what I want is that when the user says "Buy Now", he is taken to the checkout and the quantity there should reflect just the quantity that the user just selected. No earlier records of his "in checkout" orders should be there.
Half of this is achievable - i am able to reach directly to the checkout (i have added the quantity box on the product page itself), but i am not able to "reinitialize" the quantity in the checkout page.
Please help.

winnie80's picture
Joined: 04/16/2009
Juice: 46


since this is couple months after your question, do you already have a solution for this?

if not, i have couple solution:

first solution
for the direct to checkout, first go to cart settings, and change url from cart to cart/checkout
this will make each time a customer click on buy now button to be directly send to cart/checkout
after that to remove the previous cart items, you need to build a custom module
by using hook_add_items() to remove all of cart items

second solution (at least in drupal5 + ubercart1)
by create a link with href as followed: cart/add/e-p1_q2_a3o4
e is to remove all items already exist within shopping cart
p1 = replace 1 with product nid
q2 = replace 2 with quatity of product
a3 = replace 3 with attribute value
o4 = replace 4 with attribute option value

i use both of this options within all of my webshop projects

i hope this will help you

and if you do have another solution, please lent me know