These are chat archives for reactioncommerce/reaction

4th
Jul 2018
kathiresh
@kathiresh
Jul 04 2018 09:44
Hi All, Reaction commerce initial load is slow. Any solution for that. It would be helpful if anyone respond to this
Janus Reith
@janus-reith
Jul 04 2018 16:41

Did anyone find a viable solution to add custom fields to product variant?
I tried to follow what was described in the @reactioncommerce/schemas readme and created a file:

import SimpleSchema from "simpl-schema";
import { ProductVariant } from "/lib/collections/schemas";

ProductVariant.extend({
       "example": {
           type: Number,
          defaultValue: 100
         }
});

and imported it both in client and server.
I also extended the roduct-admin component to include the new field.
However, while those schema changes are used somehow(eg. toggling optional: true will trigger the "required" warning in productadmin), I can't alter the field and recieve the toast alert:

Cannot convert undefined or null to object [server-error]

Sadly no error is thrown in the meteor console.
The same issue comes up if I create a new Variant from meteor server side code.
No error, but the new fields I added in my schema are skipped on creation.

Janus Reith
@janus-reith
Jul 04 2018 17:10
I could directly modify the core Schema like I had to do in the pre-simpl-schema versions, but a doc in the tutorials, which appareantly is out of date again, suggested this should be possible now.
xtebs
@xtebs
Jul 04 2018 17:27
Hey all! Fast question: Do we always need to "reaction reset" after changing some translations jsons (i18n) on plugins?
I can only make it effective when I reset. ( But its a huge pain to recover the whole db just because of that)