Free download sample?

Posts: 23
Joined: 11/01/2007

Hello again. I'm slowing making progress and have one last little issue to work out... I had been handling it through my autoresponder, but I would LOVE to integrate this into my Ubercart.

How can I handle a free download? I have a file that's a sample from my ebooks. I have created a product with $0.00 cost...which I should have known was too easy to actually work. Is there a way to skip over the payment sections if the Order Total is $0.00

That begs another question. If the coupon module is integrated, what happens if the revised Order Total is $0.00?

Maybe I'm missing a setting someplace or maybe a contributed module will help. Can anyone point me in the right direction?

Happy day,
Anne

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

Anne, you may have given me a good task to revisit from an old battle plan... I intended to make $0.00 orders work in the past but didn't get to it. I should have a lull in orderly work tomorrow to take care of it (after finishing w/ schaub123's PayPal recommendations!). Thanks for bringing it back up. Eye-wink

Posts: 23
Joined: 11/01/2007

You're great. I'll put my $0.00 product on hold for a while. Plenty of other things to keep me busy!

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

TCS successfully made a "Zero Total" payment method in his Gift Certificates Contrib. Not sure how much of it you can reuse but it works well for us. Check it out.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

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

So here's the problem... we don't necessarily know an order has a $0.00 total when we proceed to checkout. Reason being - there may be some tax, some shipping, some anything that is applied to the order on the checkout screen. We'll know in the order total preview that this is the case - so perhaps this functionality could only work with the preview enabled. Unfortunately, we can't just make the payment method selection go away... the form is expecting it to be there. So, we have to figure out how to trick the forms API, too.

I'm happy to take this on if someone can present a solution to these issues. Otherwise, I may have to recommend just making a normal download node. You can always use a module like TAC Lite to prevent access to the download node until the user registers so you get their contact info. I've seen businesses do this with their "white papers."

Posts: 10
Joined: 12/13/2007

I'd just like to add my experience of 3d model sites.

On sites like daz3d and contentparadise they have free products in their catalogues.
In order to get the freebies, you have to register. What you also have to do is go thru' the whole cart lifecycle to get the downloads; it's only when you get to the checkout that the cart knows your order total is $0, so they don't ask for payment details. I don't know whether this is true for all sites with this facility.
In which case, would it not be possible to have some kind of workflow thing that checked an order's total and if it came to 0.00 to automatically enable the downloads rather than waiting for an admin to 'complete' it?

(I have very little experience of workflow, not had chance to play with it yet!)

Posts: 23
Joined: 11/01/2007

Ryan wrote:
I'm happy to take this on if someone can present a solution to these issues. Otherwise, I may have to recommend just making a normal download node. You can always use a module like TAC Lite to prevent access to the download node until the user registers so you get their contact info. I've seen businesses do this with their "white papers."

I'm the roles on another (membership-based) site, so yes, it's a viable option. I was trying to stick with the catalog model on this site.

The workflow idea seems like it has potential. Add a payment method for $0-priced items. I'm supposing that the checkout process integrates with user registration, so I don't think we'd want to skip the checkout entirely. Just have the workflow module skip the payment block on the checkout if the total cost is $0. Would something like that work?

(And I'm in no rush. Just offering ideas, even though I have no idea if they are workable at all.)

Anne

Posts: 21
Joined: 12/14/2007

this would be fantastic
I wanted free products for for some users roles. I managed to configure 100% discount on certain product type for some user role, with the Discounts module. It works fine... the free products are file downloads so there is no shipping costs...
I have this in my review order page

Subtotal: 2,00€
Discount: -2,00€
Total: 0,00€
Paying by: PayPal.

so.... the only thing is get rid of the Paypal paying... and go directly to the confirmation window. Always when the Total is 0,00€

There could be a possibility that some user buys a product and a free product at the same time..... and the calculations are correct..... it makes discount for the free products but the Total is not 0, so it would have to go to the paypal payment.

Posts: 48
Joined: 10/20/2007

Another vote from me on this! Thanks for being so warm and responsive, Ubercart team Smiling

Posts: 10
Joined: 12/13/2007

anneeasterling wrote:

The workflow idea seems like it has potential. Add a payment method for $0-priced items. I'm supposing that the checkout process integrates with user registration, so I don't think we'd want to skip the checkout entirely. Just have the workflow module skip the payment block on the checkout if the total cost is $0. Would something like that work?

I need to get our site live asap, so I might have a go at working this out fairly soon.

I would have thought the workflow module is perfect for this type of scenario.

Posts: 10
Joined: 12/13/2007

I've just had a play with workflow, and it looks like it can do it quite easily.
For our setup, we have 2 attributes per product(photo): a free version (watermarked, reduced resolution), and the licenced version (not watermarked or reduced).

Using this

array (
  'cfg_1' =>
  array (
    '#type' => 'configuration',
    '#altered' => false,
    '#event' => 'checkout_complete',
    '#label' => 'check for zero payment',
    '#active' => 1,
    '#module' => 'workflow-ng',
    0 =>
    array (
      '#type' => 'condition',
      '#name' => 'uc_payment_condition_balance',
      '#argument map' =>
      array (
        'order' => 'order',
      ),
      '#settings' =>
      array (
        'balance_comparison' => 'less_equal',
      ),
      '#label' => 'Check the order balance',
    ),
    1 =>
    array (
      '#type' => 'action',
      '#name' => 'uc_order_action_update_status',
      '#argument map' =>
      array (
        'order' => 'order',
      ),
      '#settings' =>
      array (
        'order_status' => 'completed',
      ),
      '#label' => 'Update the order status',
      '#weight' => '10',
    ),
    '#description' => NULL,
    '#attributes' =>
    array (
    ),
    '#required' => false,
    '#tree' => false,
    '#parents' =>
    array (
    ),
    '#recursion' => false,
    '#fixed' => false,
    '#execute' => 'workflow_ng_execute_configuration',
    '#process' =>
    array (
      'workflow_ng_ui_prepare_configuration' =>
      array (
      ),
    ),
    '#_defaults_applied' => true,
    '#name' => 'cfg_1',
  ),
)

seems to complete the order instantly allowing the customer to dl their free photo.
I haven't fully tested it yet.
I don't know how it fares with payment pages as we only accept cod/cheque, or purchase orders (our target audience is not the general public yet).
For the completion to work, if you have different attributes on each product, then absolutely make sure the download features are tied to a product (I just spent 10 minutes trying to work out why it kept giving me both downloads *duh*)

Cheers

Posts: 19
Joined: 04/06/2008

ill bump this topic as well. i use the discount/coupon module and it doesnt allow for 0.00 total. maybe ajax or seperate page for payment method would resolve this? any more thought on this one?

Posts: 19
Joined: 04/06/2008

Free Order Mod has been made!

http://www.ubercart.org/contrib/4089

Posts: 2
Joined: 09/25/2008

Ryan,

I am trying to apply your suggestion...

Ryan wrote:
Otherwise, I may have to recommend just making a normal download node. You can always use a module like TAC Lite to prevent access to the download node until the user registers so you get their contact info. I've seen businesses do this with their "white papers."

What's the best way to direct a visitor to register when they click on "download sample" link then send them to the sample page?

thanks

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

Honestly, the best way would probably be something like a small custom module that handles that page instead of an intermediate node. So, the module could check to see if the user is logged in... if not, display a message and send them to the login form. If so, send them on to the download page. If you don't require e-mail validation for user account creation, you can even do something similar to the cart module and use a simple redirect through hook_form_alter() or the destination $_GET variable to send the user on to the download page upon login.

Posts: 2
Joined: 09/25/2008

Thanks Ryan for the quick reply. Unfortunately, I am new to Ubercart and need to start learning php.

Anyone out there who can lend a hand with this?