We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The configuration in config/getcandy-hub/products.php lets us disable sku requirement.
config/getcandy-hub/products.php
sku
https://github.com/getcandy/getcandy/blob/9bd91d7677759a540856f376ea8d757a3ea4a18e/packages/admin/config/products.php#L26-L29
Disabling sku should disable it's requirement in all places.
It works fine while saving product variants, but if you try to create an order which contains a product variant without sku, then an exception throws:
"message": "SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'identifier' cannot be null (SQL: insert into `order_lines` (`purchasable_type`, `purchasable_id`, `type`, `description`, `option`, `identifier`, `unit_price`, `unit_quantity`, `quantity`, `sub_total`, `discount_total`, `tax_breakdown`, `tax_total`, `total`, `notes`, `meta`, `order_id`, `updated_at`, `created_at`) values (...))", "exception": "Illuminate\\Database\\QueryException", ...
ProductVariant::getIdentifier() returns sku (which is null in this case): https://github.com/getcandy/getcandy/blob/9bd91d7677759a540856f376ea8d757a3ea4a18e/packages/core/src/Actions/Carts/CreateOrder.php#L81
ProductVariant::getIdentifier()
But order_lines.identifier column is not nullable.
order_lines.identifier
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected Behaviour:
The configuration in
config/getcandy-hub/products.php
lets us disablesku
requirement.https://github.com/getcandy/getcandy/blob/9bd91d7677759a540856f376ea8d757a3ea4a18e/packages/admin/config/products.php#L26-L29
Disabling
sku
should disable it's requirement in all places.Actual Behaviour:
It works fine while saving product variants, but if you try to create an order which contains a product variant without sku, then an exception throws:
ProductVariant::getIdentifier()
returnssku
(which is null in this case):https://github.com/getcandy/getcandy/blob/9bd91d7677759a540856f376ea8d757a3ea4a18e/packages/core/src/Actions/Carts/CreateOrder.php#L81
But
order_lines.identifier
column is not nullable.Steps To Reproduce:
sku
requirement inconfig/getcandy-hub/products.php
sku
The text was updated successfully, but these errors were encountered: