First of all - great module! Although I'm getting the following errors when I create products as soon as I hit either Preview or Save, everything appears to be functioning properly with the discount features.
•user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) AND (d.filter_type<>2 OR dt.term_id IN(-1)) AND (d.filter_type<>3 OR ds.s' at line 7 query: SELECT d.* FROM uc_discounts d LEFT JOIN uc_discounts_products dp ON d.discount_id=dp.discount_id LEFT JOIN uc_discounts_terms dt ON d.discount_id=dt.discount_id LEFT JOIN uc_discounts_skus ds ON d.discount_id=ds.discount_id WHERE d.requires_code=0 AND (d.has_role_filter=0 OR d.discount_id IN(SELECT dr.discount_id FROM uc_discounts_roles dr, users_roles ur WHERE (dr.role_id=ur.rid AND ur.uid=1) OR dr.role_id=-1 OR dr.role_id=2)) AND (d.filter_type<>1 OR dp.product_id IN(-1,)) AND (d.filter_type<>2 OR dt.term_id IN(-1)) AND (d.filter_type<>3 OR ds.sku IN('')) AND (d.has_expiration=0 OR d.expiration>1248064409) ORDER BY d.weight ASC in /home/patwinth/public_html/sites/all/modules/ubercart/contrib/uc_discounts_alt/uc_discounts/uc_discounts.module on line 1608.
•user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT DISTINCT tid FROM term_node WHERE nid IN() in /home/patwinth/public_html/sites/all/modules/ubercart/contrib/uc_discounts_alt/uc_discounts/uc_discounts.module on line 1005.
•user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT DISTINCT model FROM uc_products WHERE nid IN() in /home/patwinth/public_html/sites/all/modules/ubercart/contrib/uc_discounts_alt/uc_discounts/uc_discounts.module on line 1021.
•user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1)) AND (d.filter_type<>2 OR dt.term_id IN(-1)) AND (d.has_expiration=0 OR ' at line 7 query: SELECT DISTINCT d.* FROM uc_discounts d LEFT JOIN uc_discounts_products dp ON d.discount_id=dp.discount_id LEFT JOIN uc_discounts_terms dt ON d.discount_id=dt.discount_id LEFT JOIN uc_discounts_skus ds ON d.discount_id=ds.discount_id WHERE (d.requires_code=0) AND (d.has_role_filter=0 OR d.discount_id IN(SELECT dr.discount_id FROM uc_discounts_roles dr, users_roles ur WHERE (dr.role_id=ur.rid AND ur.uid=1) OR dr.role_id=-1 OR dr.role_id=2)) AND (d.filter_type<>1 OR dp.product_id IN(,-1)) AND (d.filter_type<>2 OR dt.term_id IN(-1)) AND (d.has_expiration=0 OR d.expiration>0) ORDER BY weight in /home/patwinth/public_html/sites/all/modules/ubercart/contrib/uc_discounts_alt/uc_discounts/uc_discounts.module on line 1088.
Comments
Comment #1
Sborsody commentedCan you give a little more description of your set up? Are you using CCK fields on your product?
Comment #2
PatW commentedI'm using CCK 6.x-2.4. Also, I'm not sure I made it clear that the products do get created after receiving the errors.
Comment #3
Sborsody commentedWhat I meant was are you using like the codeless discount CCK field on these products? Did you add that CCK field to your product content type? What steps did you take in setting that up? That first error message is from a block of code related to the codeless discount CCK field. I haven't played with that aspect of this module yet so I'm not sure how much help I'll be. How are your discounts defined? It seems like there's a mismatch between the MySQL statement and what is actually in your database. Did you try running update.php at all?
Comment #4
ezra-g commentedNo response in 4 months => closed.