Product Import To Add

0

Is there going to be and product import added soon ? Thank you and Jumu’ah mubarak.

Question Resolved For: Modern Point of Sale Solution 0 Votes 14 Answers 1.4k Views
Asked by Gent 1 year ago

0

Answered by Mian Saleem

Hmm, I am amazed at how things are done 😃 good find.

I think I should purge the migrations 😦 Thank you for your patience.

0

Answered by Gent 1 year ago

And another error im getting is 500 Internal Server Error
500: Server Error Whoops, something went wrong on our servers. when i open Sale info (Sale (undefined))

0

Answered by Mian Saleem 1 year ago

Hello,

Looks like every update brings new errors. I am trying to avoid them, but I have not succeeded. Hopefully, I will be able to reduce/eradicate them in future.

The items/products have few relations that I am not sure how to import so I will be added the option to import item and then attached relations with separate excel files.

For 500 errors, can you check the log file and let me know the error details?

Thank you

0

Answered by Gent 1 year ago

Mian Saleem hi https://pastebin.com/GMjtDiZK this is the laravel log and these are the migrations that i ran 2017_02_21_070324_create_attachments_table ............................................................ [1] Ran
2017_03_17_070324_alter_attachments_table_extend_filetype ............................................. [1] Ran
2017_08_21_201100_alter_attachments_table_add_group_column ............................................ [1] Ran
2019_12_14_000001_create_personal_access_tokens_table ................................................. [1] Ran
2021_10_07_000000_update_oid_user_id_unique_index_on_orders_table ..................................... [4] Ran
2021_10_20_050000_unify_addresses_to_all_tables ....................................................... [4] Ran
2021_11_22_000000_drop_delivered_by_foreign_key_from_deliveries_table ................................. [4] Ran
2022_01_19_000000_modify_failed_jobs_table ............................................................ [3] Ran
2022_02_14_025831_update_modifier_options_table ....................................................... [4] Ran
2022_03_10_113257_add_event_column_to_activity_log_table .............................................. [3] Ran
2022_03_10_113258_add_batch_uuid_column_to_activity_log_table ......................................... [3] Ran
2022_07_16_000000_create_price_groups_related_table ................................................... [6] Ran
2022_09_06_134723_drop_variation_foreign_keys ......................................................... [5] Ran

and also the error_log file is empty

0

Answered by Mian Saleem 1 year ago

Hello,

One migration 2022_07_10_000000_create_price_groups_table is not loaded. It should be run before 2022_07_16_000000_create_price_groups_related_table

I have checked the download file the migration database/migrations/updates/ is included in download.

Thank you

0

Answered by Gent 1 year ago

Mian Saleem this error im getting when i try to migrate that table

Do you really wish to run this command? (yes/no) [no]
❯ y

INFO Running migrations.

2022_07_10_000000_create_price_groups_table .......................................................... 5ms FAIL

Illuminate\Database\QueryException

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'price_groups' already exists (SQL: create table price_groups (id char(36) not null, name varchar(255) not null, code varchar(255) null, details varchar(255) null, created_at timestamp null, updated_at timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')

at vendor/laravel/framework/src/Illuminate/Database/Connection.php:759
755▕ // If an exception occurs when attempting to run a query, we'll format the error
756▕ // message to include the bindings with SQL, which will make this exception a
757▕ // lot more helpful to the developer instead of just the database's errors.
758▕ catch (Exception $e) {
➜ 759▕ throw new QueryException(
760▕ $query, $this->prepareBindings($bindings), $e
761▕ );
762▕ }
763▕ }

  +9 vendor frames

10 database/migrations/2022_07_10_000000_create_price_groups_table.php:38
Illuminate\Support\Facades\Facade::__callStatic()

  +25 vendor frames

36 artisan:37
Illuminate\Foundation\Console\Kernel::handle()

0

Answered by Mian Saleem 1 year ago

Hello,

It's quite strange. The error log says the table is missing and migration is not there too. But once you try to run the migration, it says table already exists.

You can manually check the database if the table is created.

Thank you

0

Answered by Gent 1 year ago

Mian Saleem yes the table exist in the db with these attributes ( id name code details created_at updated_at )

0

Answered by Mian Saleem 1 year ago

That's correct. What error are you getting now? Is your installation accessible?

0

Answered by Gent 1 year ago

Mian Saleem https://pastebin.com/NUTU7WZj the log
i fixed the probelm went on the 2022_07_10_000000_create_price_groups_table.php file edited and deleted the
Schema::create('price_groups', function (Blueprint $table) {
$table->uuid('id');
$table->primary('id');
$table->string('name')->unique();
$table->string('code')->nullable();
$table->string('details')->nullable();
$table->timestamps();
});
this table was in my database but the item_price_group wasnt, and i gave me errors when i tried to run the migration so i removed the part when it creates the price_groups ran the migration successfuly and now its perfect.

We use Cookies

We use cookies to ensure that we give you the best experience on our website. By continuing to browse the site you are agreeing to our use of cookies.