Skip to Content

New J2Commerce 6.6.5 is out. Here is everything in the release.

See What’s New
Account
Enter the email address on your account.
Forgot your username?
Enter your password.
Forgot your password?

Or continue with

Open Public Category: Feature Requests Ticket #581

Manual Voucher Creation: Gift Cards App: Field 'from_order_id' doesn't have a default value

This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Conversation

Bob Nelson

Hi all-

   In working witht he Gift Card App, creating manual vouchers- there is not a field(s) in the process that allows you to add the "From" information for the voucher, resulting in: "Field 'from_order_id' doesn't have a default value" when you attenpt to save the voucher.

Bob

Olivier Buisard Staff

Hello Bob,

can you send us the structure of the _j2store_vouchers table? Just a paste of the table structure in the ticket will be fine. Don't add the data. I am looking on my end to see why the error could happen.

Olivier.

Olivier Buisard Staff

Actually Bob, I was able to reproduce the error, no need for additional information at this time. Thanks!

Olivier.

Olivier Buisard Staff

Bob, if you have access to the database, try:

ALTER TABLE `XXXXXXXX_j2store_vouchers` CHANGE `from_order_id` `from_order_id` VARCHAR(255) NOT NULL DEFAULT '0';

where XXXXXXXX is the table prefix for your site.

Let us know if that fixes your issue. Thank you!

Olivier.

Bob Nelson

Hey Oliver- Just wanted to say thank you for checking in to this- I will apply the database alter this weekend and let you know.

- Bob

Olivier Buisard Staff

Ok, soundfs good Bob, let us know!

Olivier.