These are chat archives for reactioncommerce/reaction

21st
Jul 2017
Sightuary
@sightuary_twitter
Jul 21 2017 00:01
I did a reaction pull on a new install got the errors, but on a clean clone everything is working so far.
Did you test upload of images
I can upload the images and see them in product detail view only
Safari and Firefox
Brent Hoover
@zenweasel
Jul 21 2017 00:06
let me try it now
REACTION_and_➀_reactioncommerce_reaction_-_Gitter.png
REACTION_and_REACTION.png
it appears to be working in FF and Safari for me
Sightuary
@sightuary_twitter
Jul 21 2017 00:51
Wow.
Let me try a smAller source image
Brent Hoover
@zenweasel
Jul 21 2017 00:54
You have published?
Sightuary
@sightuary_twitter
Jul 21 2017 00:54
Ok my original source images for products are 2500x2000 3mb files. The shop images where scaled down , where is the scaling code must be issue there.
Brent Hoover
@zenweasel
Jul 21 2017 00:55
if you are only see them in some browsers not sure how scaling could be the issue
Sightuary
@sightuary_twitter
Jul 21 2017 00:55
I only see them on the product detail page
Brent Hoover
@zenweasel
Jul 21 2017 00:56
before you said it was only Safari
Sightuary
@sightuary_twitter
Jul 21 2017 00:57
Screen Shot 2017-07-20 at 8.57.15 PM
The safari issue had to do with some commits that were added when I did a reaction pull , I started with a clean clone of the reaction repo at the master branch
S Tunji Turner
@stunjiturner
Jul 21 2017 00:59
Screen Shot 2017-07-20 at 8.57.15 PM.png
S Tunji Turner
@stunjiturner
Jul 21 2017 01:12
those test images are the only ones that don’t work, thanks
i uploaded a new set of images and everything seems well
Brent Hoover
@zenweasel
Jul 21 2017 01:13
Oh good
Aaron Judd
@aaronjudd
Jul 21 2017 02:19
Anybody else think Atom is running very slowly in the last couple of releases? Combined with Meteor 1.5 building… my machine is getting hammered.
S Tunji Turner
@stunjiturner
Jul 21 2017 02:39
i am wanting to sell the t-shirts online, is there a branch/plugin thats workimg on adding some flexibility on the UI for product options and variants. Fo now the show will only display products options sizes and i will habe a different product for each color shirt that i offer as a workaround
Brent Hoover
@zenweasel
Jul 21 2017 02:42
what are you looking to do that you can’t do?
Sightuary
@sightuary_twitter
Jul 21 2017 02:50
I would like to have a single product with product options for size and color. The UI shows both options, but the selections only applied one option to the cart at checkout. Not blue and xl or red + small . I have not tested on 1.4 yet
Brent Hoover
@zenweasel
Jul 21 2017 02:51
you would create variants for color and options for sizes
S Tunji Turner
@stunjiturner
Jul 21 2017 02:57
Screen Shot 2017-07-20 at 10.55.16 PM.png
Brent Hoover
@zenweasel
Jul 21 2017 02:58
Yeah, you have colors for both option and variants, that’s not what you want
Imagine that instead of “Basic Example Variant” there it said “Red” and where you have “Red” it said “Small"
S Tunji Turner
@stunjiturner
Jul 21 2017 02:59
Screen Shot 2017-07-20 at 10.55.16 PM.png
Brent Hoover
@zenweasel
Jul 21 2017 03:00
isn’t that the same screenshot?
give me a quick second to sketch one out for you
S Tunji Turner
@stunjiturner
Jul 21 2017 03:01
Creating what i want in edit mode is not the issue, displaying the product options for the two product variants at the same time in the UI
no a diffrent one, i did not want to get off topic
Brent Hoover
@zenweasel
Jul 21 2017 03:02
Ok, but I am saying you can get what you want without changes by changing the way you have structured your product
S Tunji Turner
@stunjiturner
Jul 21 2017 03:03
I would like to see all the color options and size options at the same time in the UI, so that the user can select the two product variant options to add to his/her cart
all ears and eyes
Brent Hoover
@zenweasel
Jul 21 2017 03:05
Apologies if I am not understanding your problem but is this not what you are going for?
Basic_T-shirt.png
Basic_T-shirt.png
Brent Hoover
@zenweasel
Jul 21 2017 03:10
so are you saying you want for each color, to show each size option not just the one for the currently selected variant?
S Tunji Turner
@stunjiturner
Jul 21 2017 03:12
I like the concept, but the i wanted something more like what you stated lastly
Brent Hoover
@zenweasel
Jul 21 2017 03:13
so you would need to write your own custom UI for that. You can override the Product detail page and create your own version
S Tunji Turner
@stunjiturner
Jul 21 2017 03:13
gotcha, just needed a place to look, thanks a bunch
should i wait for the new component API before i get started.
Brent Hoover
@zenweasel
Jul 21 2017 03:15
well, yes and no. You can already do with what the component API will allow you do to the Product Detail page. We are just expanding it so you can do it with everything
It might allow you to just replace one subcomponent rather than the whole thing. You would need to figure that out.
I think the component API will probably drop some time next week
S Tunji Turner
@stunjiturner
Jul 21 2017 03:19
@zenweasel i really do like the way you have the product is structured though, i will think it trough some more
Screen Shot 2017-07-20 at 11.18.18 PM.png
Brent Hoover
@zenweasel
Jul 21 2017 03:19
:+1:
S Tunji Turner
@stunjiturner
Jul 21 2017 03:21
see how size and dorms product variants are placed in the UI, where the user is able to select product variant options like small and dubois hall
Brent Hoover
@zenweasel
Jul 21 2017 03:21
Right
S Tunji Turner
@stunjiturner
Jul 21 2017 03:22
i will look into it some more, again thanks
Brent Hoover
@zenweasel
Jul 21 2017 03:23
I think if you structure products like I have, you should be able to get what you want without a ton of work. Just basically change the component that renders the variant and options
Just change them into listboxes
S Tunji Turner
@stunjiturner
Jul 21 2017 03:25
your structure is solid
will the selection of both of the values in the list boxes make it to the cart object
Janus Reith
@janus-reith
Jul 21 2017 11:03
I think the Fixture import needs some work - Using mongoexport to dump to Shops.json and use it as a Fixture after reaction reset usually fails for me and crashes the server - I always have to manually edit out a lot of fields
Janus Reith
@janus-reith
Jul 21 2017 11:56

And I think I have to take back my info on attaching Schemas just in the Plugins - I dont know if this is related to changes it 1.4, but now the server always crashes on startup when calling registerInventory from /plugins/included/inventory/server/methods/inventory.js, as it can't match the custom fields.

As soon as the shop is running adding them is no problem, just when server code is changed or you manually restart the server it crashes.
No idea why this used to work in 1.3 though

Janus Reith
@janus-reith
Jul 21 2017 12:12
Hmm, removed all my custom fields, and also tried to put my schema back in to core - Still fails when my variant is present.
Did anything big change in Inventory for 1.4?
Janus Reith
@janus-reith
Jul 21 2017 12:56
Hm, working now somehow - But I couldn't really manage to find the inventory related error in my variants, and I had to put the customized Schema back into core...
danielpinna
@danielpinna
Jul 21 2017 13:01
Hello guys,
Does not RC have a method for updating a product in its entirety? Only update individual fields?
Janus Reith
@janus-reith
Jul 21 2017 13:21
what excactly do you mean? - a server method that you can pass mutliple fields to add?
or change
danielpinna
@danielpinna
Jul 21 2017 13:24

Sorry, I'm using goole translator so the translation is not always the best.

I created a custom product, I did not find a product update method, I just found method that update fields of a product.

So I would have to call this method for every field I want to update? Or it has an alum method that I can send the product object to, and it updates all its attributes

danielpinna
@danielpinna
Jul 21 2017 14:19
Guys I'm trying to make a removal below:
removeProduct: function(id) {  
    check(id, String);
    Products.remove({"_id": id});
  }
Janus Reith
@janus-reith
Jul 21 2017 14:19
Well, when you make changes to the fields in the product edit container, they are just stored in the variant object of the react Components state
once you publish they are all updated at once on the server.
correct me if im wrong
danielpinna
@danielpinna
Jul 21 2017 14:19
I do not get any error. However the product is not removed
I've created a new schema and fix the attachment of this schema in the product collection
I was able to include this my custom product, but I can not remove or update it
Janus Reith
@janus-reith
Jul 21 2017 14:22
what call is Products.remove({"_id": id}); ?
Where to you import Products from?
*do
danielpinna
@danielpinna
Jul 21 2017 14:23
Products is the collection
I import Products from "lib/collections"
In the file lib/collections/collections.js
I attach my new schema
export const Products = new Mongo.Collection("Products");

Products.attachSchema(Schemas.Product, { selector: { type: "simple" } });
Products.attachSchema(Schemas.ProductVariant, { selector: { type: "variant" } });
Products.attachSchema(Schemas.MyProduct, { selector: { type: "oi" } });
for to insert i call the method products/createProduct and it's work
but to remove or update i don't find methods to do it
so i create methods for it
UPDATE:
updateProduct: function(product, productId) {
    check(product, Object);
    check(productId, String);
    Products.update(productId, product);
  }
and DELETE
removeProduct: function(id) {  
    check(id, String);
    Products.remove({"_id": id});
  }
danielpinna
@danielpinna
Jul 21 2017 14:28

I've done methods like these for collections that I've created myself and they work.

More to the collection of products is not working. I think it's because the product collection has multiple schemes

@janus-reith is my problem now
Aaron Judd
@aaronjudd
Jul 21 2017 14:31
@danielpinna take a look at products/updateVariant, and just alway ensure that a type: is passed, there it’s explicit that it should already exist in the update object, but other times (like in the products.update in your example, you need to pass as an additional param.). (and I think that method should also work for you)
danielpinna
@danielpinna
Jul 21 2017 14:32
@aaronjudd Ok, thanks. I will see now
Janus Reith
@janus-reith
Jul 21 2017 14:38
^that
danielpinna
@danielpinna
Jul 21 2017 14:42

I need to accomplish this part of the code:

 }, (error, result) => {
        if (result) {
          const productId = currentVariant.ancestors[0];
          // we need manually check is these fields were updated?
          // we can't stop after successful denormalization, because we have a
          // case when several fields could be changed in top-level variant
          // before form will be submitted.
          toDenormalize.forEach(field => {
            if (currentVariant[field] !== variant[field]) {
              denormalize(productId, field);
            }
          });
        }
      });

I confess that I did not quite understand what she does. And I realized that it does things depending on whether the product is variant or simple, however the product I'm upgrading is of another type. A new type of scheme I created

Kenneth Beartusk
@beartusk
Jul 21 2017 15:52
@zenweasel So I believe I figured out my Amazon SES Email issues. It seemed my domain was verified, but my DKIM verification status is still pending. Thanks for the help.
Kenneth Beartusk
@beartusk
Jul 21 2017 16:00
I'd like to setup some admin type users that can process orders and edit products. The first user I setup is able to edit products, but not process orders for some reason. In the admin account I have enabled the user to do so, but it does not seem to be working. Any suggestions?
Also I've enabled the user to do just about everything in case there are any dependencies.
image.png
Aaron Judd
@aaronjudd
Jul 21 2017 19:33
@beartusk we have a lot of work on orders and permissions going on in the marketplace branch. I’d recommend taking a look and working from there, as we’re also adding groups for permissions - a giant leap forward..
Aaron Judd
@aaronjudd
Jul 21 2017 19:40
@danielpinna type is not limited to simple, variant, it can be a custom value to specify a custom product schema. All products should made up of at least one variant (which are just products) . The existing methods were meant to work with new types, but I confess it’s been a while since I dug into that, and I don’t know your specific use case.