Ubercart Development Requests

Posts: 10
Joined: 10/09/2007
Bug Finder

Per the conference call today with Ubercart & Warner Bros Records, we are posting our development requests here in the Ubercart community to keep our plans public and invite any feedback or ideas.

In order to have a production-ready Ubercart solution for premium account upgrades by October 22, the following issues need to be addressed well before launch so we have sufficient time to test. I would *love* if we could have these changes in the next few days so there will be time enough to identify if there are still missing pieces once these are implemented.

The major issues we need resolved are:

1. After payment is successfully verified through Payflow, we need the order status to automatically change to "Payment received". Considering the bulk of orders we expect it's not possible for us to manually change the status of every incoming order. So far I have only tested with Test Gateway & CC Module so I don't know if this is already working in the Payflow contributed module... I will test tonight.

2. We need a way to hook into the checkout process after payment is successful and perform a set of custom activities. I understand that we can add code to the uc_notify email templates to run queries & things but if a "hook_order_status_change" or something else a little cleaner than email template logic exists that would be great.

3. It would be really great for Ubercart in general if a new flag could be added to products to define them as "shippable" or "non-shippable". I see there is a hook system in place for handling this but it should be a simple enough change to the product info I hope. If sufficient hook functionality exists (hook_cart_item('shippable')) then this isn't an absolute requirement but I still think it would be a nice user-friendly addition.

Please send me your thoughts/feedback on these issues, I think this is the absolute minimum we'll need in order to put together a working premium account solution in the next 2 weeks.

Posts: 110
Joined: 08/08/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Not Kulvik

1) I know this shouldnt be a problem with existing WPP (Payflow should also work fine with the same API)

2) There is a hook_order which can take care of this.

3) I think this should be possible and I suppose the guys already have a solution. My solution would be node api and add an extra check box. Check for the products which are shippable in the checkout/order screen and then only display the shipping address.

Posts: 177
Joined: 08/08/2007
Early adopter... addicted to alphas.Getting busy with the Ubercode.

1) I had this issue with the File Product and I think Ryan has reworked the Order status API recently to do this.

2) not sure. Ask Ryan ans the new order API is undocumented so far.

3) Again, I have done this with the File Product and used it to hide the shipping panel. See "uc_file_product_cart_item" for an example or the hook_cart_item($op = 'shippable').

So Warner Bros Records graces the opensource community with its corporate presence. I'm sure we'll all be benefiting shortly Laughing out loud

--

suffering from too much information

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

Honestly, I just think it's awesome that other people in the community are jumping at the chance to answer questions. I did have a chance to chat briefly with the folks at Warner Brothers and am excited they'll be using Ubercart. I imagine their name is at least a little more recognizable than our company's (Prima Supply... you haven't heard of it?). Eye-wink

Mostly, I just hope it works out great for the membership portions of their site! That was one of the most requested core features at Drupalcon, and having Shawn take care of that worked out great.

A little more insight on the issues where applicable:

  1. A custom module can implement hook_order() and on the 'update' $op see if an order is moving from the in_checkout state to the post_checkout state. At that time, it can call uc_payment_balance() to see if the order has a $0 balance. If so, it can go ahead and move it into payment received. I had a lot of fun integrating Workflow-ng further this morning and have events for checkout completion and order updates. I'll probably be adding in a balance check in the morning, at which point you'll no longer even need a module to do something like this. Smiling
  2. As cosmo mentioned, hook_order_update() would be applicable here again. Other possibilities would include adding a submit handler to the form uc_cart_checkout_review_form or creating your own Workflow-ng action (pretty simple) in a module and using that with my checkout completion event.
  3. A few solutions to this popped up based on the responses in this thread and this thread. The latest Bazaar version includes a checkbox on the product node edit form to mark a node as shippable or non-shippable. I'm encouraging product feature developers to include this checkbox if applicable to their individual features if they may be applied to individual SKUs on a product.

All in all, today was a good day of coding, and I'm looking forward to tomorrow. My Alpha 8 Battle Plans are winding down... we just might get it out earlier than expected. Cool

Posts: 10
Joined: 10/09/2007
Bug Finder

Ryan,

Thank you so much for your responses & development so far! The shippable product checkbox is awesome & it worked great. I'm also really excited about the discussions I've seen about file products being included in the core, that's something we'll definitely want to take advantage of.

One issue I've encountered since I upgraded to newest version today... My products no longer want to save the SKU or price anymore. Is this something anyone else has encountered? Should I post a real bug report in the bugs section?

We're working today to figure out what logic needs to go into our items #1 & 2 above to ensure that role promotion is automatic. We also need to integrate this system with promotion codes, both codes that are generated off-system and grant functionality on-system, as well as codes generated on-system and sent out.

I would like to keep you & Ubercart community in the loop with everything we're doing. We're hoping to have a demo of the flow up tomorrow, and integrated into our first artist site by Wednesday of next week. If you'd like to connect off-site to get some access to take a look at it send me an email and I'll set that up for you.

Thanks Ubercart community for all your help so far!

Much Love,
Sara

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

One issue I've encountered since I upgraded to newest version today... My products no longer want to save the SKU or price anymore. Is this something anyone else has encountered? Should I post a real bug report in the bugs section?

That's something I have also seen, but I thought it was because I had wiped my uc_products table clean, but had left data in the node table - so I was under the impression things weren't updating for some reason or another.

But I haven't been able to reproduce it. I would try uninstalling and reinstalling some of the modules .. make sure all of your tables are there Smiling

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 10
Joined: 10/09/2007
Bug Finder

Thanks for the response torgos! I was optimistic that it might work for me after your post but I am still having troubles. I set up a completely fresh Drupal install and turned on only the modules that were required. I'm still hitting the same problem. Here's the steps to reproduce:

1. Install a fresh drupal.
2. Turn on Ubercart modules: Cart, Order, Product, Store, Catalog.
3. Create a new product.
4. After submit, product page loads, and price is set to $0.

Here's a screenshot of my product edit screen & my product view screen, just so you believe me Smiling

I'm sure it's something incredibly simple but I don't have time to debug it right now as we have to have a working demo up for management by tomorrow! Smiling

Any input anyone has on this subject would be greatly appreciated. Please let me know if it's already moot and I just need to sync newest code (which I'm sure I should be doing 10 times a day anyways).

Much Love,
Sara

AttachmentSize
Picture 4.png14.63 KB
Picture 3.png11.6 KB
Posts: 1374
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

Seems the other guys aren't around .. and I am on West Coast time... I'm not sure what the exact problem you're having is. What versions of Drupal / Ubercart / PHP / MySQL are you running? Are you able to get into phpMyAdmin and adjust the price in the database directly? It seems that my issue was fixed after I did that.. but I also monkeyed around with a couple previously existing products.

I was at first not able to update existing products (they existed as nodes but not entries in the uc_products table) until I had added them in as products themselves. I'm wondering if truncating your database tables would help.

You say you start with a fresh install, but does that include a fresh database install as well? If you have old / stale data there, it could be causing an issue? My theory is that Ubercart is checking for a product as a node, finding it, and moving forward with the attempted query; but since a product doesn't exist, it doesn't actually update any data. That's where my "adding the entry to the products table" method came into play.

A bit convoluted, I know, but it's the best I can do without duplicating the issue. I can try a new install on another box and see if I get the same results as you.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

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

Hate to reply to my own post, but I just installed a brand new Drupal install, along with Ubercart, on a brand new database. Everything works fine for me ...

http://torgo168.rifftrax.com/?q=node/1

That's a test product, the only fields I filled in were the SKU, the name, and the sell price. I haven't enabled Clean URLs yet. Remember to install Token, TAPIr, and uBrowser before you turn on your Ubercart modules.

I get the feeling that something hasn't created a database table for you.

Feel free to create an account on my test site and do whatever it is you're doing. It appears to be very specific to your installation.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 3
Joined: 10/08/2007

For item 1 (PayFlowPro):

Has this module been successfully used by anyone, and is the contributor on the boards?

Posts: 10
Joined: 10/09/2007
Bug Finder

The problem with a fresh install was the addition of the shippable column to the uc_products table. That column is not being created in the install file, nor is it created by the update.php script unless you manually select version 10 for uc_product module.

Once the shippable column was successfully created all of the product metadata is stored again.

Sorry it was such a simple solution! I know Shaun already reported one of these versionitis problems in the forums... Hopefully as I get more familiar with the Ubercart DB I'll be able to spot these things without having to hack up the core to figure out what's going on. Smiling

Again, thanks for all your support.

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

Glad to know you found it. I just updated to the current bzr version myself... I'll take a gander and double check. I had a feeling it was a silly database issue ..

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 110
Joined: 08/08/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Not Kulvik

I think payflow pro uses the same API as Patpal WPP . There might be some small differences which can be easily changed.

This module has not been concentrated , but can be surely worked on.

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

@sarasioux: bug finder badge, ftw. Thanks for finding that... syncing install functions with updates can be easy to forget. Shocked

Posts: 2
Joined: 10/09/2007
Bug Finder

Thanks Sara for the mention. I reported a similar find here:

http://www.ubercart.org/forum/bug_reports/1298/uc_roles_install_not_date

It's just a consequence of rapid software development I know. Eye-wink

Posts: 10
Joined: 10/09/2007
Bug Finder

So I've been testing out the PFP module today, and in my infinite optimism I hoped that this module would be implementing hook_order as per Ryan's comment above to automatically move the order status to Payment Received. It appears as though it does not.

How does everyone else achieve this need? Doesn't it seem like this functionality should be a part of the PFP module itself? Should we start forking it & adding in this piece of the logic? Do people normally just write their own helper module to do these tasks? Is there some documentation I should be reading before asking these questions?

Thanks in advance for your continued support, sorry for being such an Ubercart newb I promise to be much more fluent in the coming weeks. Smiling

Much Love,
Sara