webdna / commerce-currency-prices

Add a product price for each currency
Other
3 stars 5 forks source link

Error when creating new discount #13

Closed luizhv closed 3 years ago

luizhv commented 4 years ago

Hi, I'm getting this SQL error when trying to create a new discount if I disable the plugin the discount is created with no errors.

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'baseDiscountType' cannot be null The SQL being executed was: INSERT INTO commerce_discounts (name, description, dateFrom, dateTo, enabled, stopProcessing, purchaseTotal, purchaseQty, maxPurchaseQty, baseDiscount, baseDiscountType, perItemDiscount, percentDiscount, percentageOffSubject, hasFreeShippingForMatchingItems, hasFreeShippingForOrder, excludeOnSale, perUserLimit, perEmailLimit, totalDiscountUseLimit, ignoreSales, categoryRelationshipType, sortOrder, code, allGroups, allCategories, allPurchasables, dateCreated, dateUpdated, uid) VALUES ('Test', 'Test', NULL, NULL, 1, 0, '0', 0, 0, '-0', NULL, '-0', '-0', 'discounted', 0, 0, 0, 0, 0, 0, 1, 'sourceElement', 999, 'TEST', 1, 1, 1, '2020-03-22 22:35:37', '2020-03-22 22:35:37', '4940cd38-2b9a-4b66-a80d-22b5cbb256f1')

Craft edition & version | Craft Pro 3.4.5 Commerce Currency Prices | 2.6.3 Craft Commerce | 3.0.5

mikeymeister commented 4 years ago

Hi, craft commerce 3 has changed the way the discount edit template in the CP works and it is causing an issue with commerce currency prices. We are currently working on updating currency prices for commerce 3 but a release isn't ready yet.

luizhv commented 4 years ago

Ok, thanks for the update @mikeymeister

stevenjwright commented 3 years ago

@mikeymeister any movement on this? We've got a project I'd like to use this on but hesitant if there's some issues with discounts at the moment. Thanks!

samuelbirch commented 3 years ago

Hi @stevenjwright, unfortunately up to now this hasn't had priority to get working with Commerce 3 for us. But the time has come, and this will be being worked on over the next month.

mcjackson18 commented 3 years ago

@luizhv, @stevenjwright are you still getting this error when creating a discount? I've not been able to replicate the issue using Craft Commerce 3.2.12 and Commerce Currency Prices 2.6.7.

mcjackson18 commented 3 years ago

Closing this ticket as unable to replicate the error. Please re-open if you're still experiencing this issue.