Closed (fixed)
Project:
Ubercart Restrict Qty
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Mar 2013 at 17:28 UTC
Updated:
30 Mar 2015 at 13:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
glynster commentedNo thoughts or solutions?
Comment #2
Max-III commentedI have the same, also on line 164.
Comment #3
Max-III commentedI have also been getting these errors: Recoverable fatal error: Object of class stdClass could not be converted to string in DatabaseStatementBase->execute() when trying to delete a node. After uninstalling this module the errors went away.
Perhaps it helps and I really hope this module will get finished and working.
Comment #4
glynster commentedAgreed I see this as a life saver for sites that offer subscriptions and you do not want users being on more than 1 of the same subscription.
Comment #5
raulmuroc commentedAttached a patch with solution.
Please, test & review it before commit.
Thank you.
Comment #6
glynster commentedThanks for the patch. We can now apply features to a product. However we receive "The website encountered an unexpected error. Please try again later." when trying to add the product to the cart. The feature settings are limited to 1 in cart and lifetime ticked.
Comment #7
raulmuroc commentedComment #8
caskraker commentedSame problem as topic starter has when using the 7.x-1.0 version. Module is not usable this way.
I also get the dialogue in which you can enter the values for qty restriction twice. The second time it appears full-browser and has ignored any values i entered in the first dialogue. After hitting Apply in the second dialogue the error-message appears:
Fatal error: Call to undefined function dpm() in /home/mysite/public_html/sites/all/modules/uc_restrict_qty/uc_restrict_qty.module on line 164
Any clues?
Thanx,
Cas
Comment #9
caskraker commentedCorrection: after applying the patch everything does work OK. I don't get a second dialogue window. After the first it just returns to the product features screen, as expected. The quantity is set to 1 in my case and that shows in the cart, the field is non-editable. No more errors.
I did NOT tick lifetime, however. If i do i get the same error glynster at #6 had.
Hope this may help to solve the problem.
Cheers,
Cas
Comment #10
glynster commentedThanks for the clarification there, hope it helps as well.
Comment #11
teadrink3r commentedI too am getting the "The website encountered an unexpected error. Please try again later." error when trying to add a product to my cart when the product feature settings are limited to 1 in cart and lifetime ticked.
Comment #12
teadrink3r commentedI'm seeing this in the report / log:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'completed' in 'where clause': SELECT SUM(uop.qty) FROM {uc_orders} uo LEFT JOIN {uc_order_products} uop ON uo.order_id = uop.order_id WHERE uo.order_status = "completed" AND uo.uid = :uid AND uop.nid = :nid ORDER BY uop.nid; Array ( [:uid] => 0 [:nid] => 117 ) in uc_restrict_qty_count() (line 304 of /home/domain/public_html/sites/all/modules/uc_restrict_qty/uc_restrict_qty.module).
Comment #13
neochief commentedHere's updated patch, which solves both of the issues.
Comment #14
neochief commentedI noticed that the main hook was named unproperly. Fixed as well.
Comment #15
jperry.nu.designs commentedjust mentioning here that dpm() is a debugging function that is part of devel. It should not be included/active in a live version of the module. If you have the devel module installed, you can enable it and 1) no more errors, and 2) you get a nice debug message (object) when you add to a product.
I haven't reviewed the patches listed above, nor tested them yet, but I thought I would explain what dpm is and that it can be 'solved' by installing and enabling devel module even if you don't ever turn access to devel on for any user.
Comment #16
neochief commentedComment #17
jamestombs commentedPatch in #14 fixes all issues.
Comment #18
webservant316 commentedsee this issue for all the patches I needed to get this module working...
https://www.drupal.org/node/2144385#comment-9393401
Comment #19
raulmuroc commentedSolved in Port to Drupal 7
Comment #20
glynster commentedGreat job fixing this!
Comment #21
glynster commentedThe latest release fails, I had to revert to the latest dev version again.
Comment #22
raulmuroc commented@glynster, could you ease some info bout the errors/problems you get?
Comment #23
webservant316 commentedproblem in current release noted here https://www.drupal.org/node/2454819.
Comment #24
glynster commentedPerfect problem resolved in the latest release. Thanks @webservant316 for finding the issue!
Comment #25
webservant316 commentedversion 1 works for me now also. :-)