These are chat archives for reactioncommerce/reaction

21st
Dec 2017
Josh Cox
@joshuacox
Dec 21 2017 05:29
can I get some beta testers for my oneliner installer for reaction? curl -L https://git.io/rxNstall | bash This tests fine at the moment for ubuntu, debian, fedora, centos, gentoo, archlinux, and mac os x, add requests for your distro and see the build status of those I just mentioned at the github page
Josh Cox
@joshuacox
Dec 21 2017 05:50
it is particularly opinionated and installs nvm and manages node and npm that way, and I am open to making that distro specific and using each of the package managers, but that would be more work
Tse
@tse2909
Dec 21 2017 08:55
image.png
i am getting this error when updating shop setting
Michael Jenny
@prinzdezibel
Dec 21 2017 09:43
@tse2909 Is this a customized Reaction or does this happen with "stock" Reaction?
Tse
@tse2909
Dec 21 2017 09:55
stock reaction .
image.png
should i change columns or size to make product detail page consists of 3 columns ?
Michael Jenny
@prinzdezibel
Dec 21 2017 10:41
@tse2909 Re error: Would you mind to file a issue on GitHub?
Re: PDP layout: don't know actually.
Chandan Purbia
@chandan1794
Dec 21 2017 10:42
Greetings,
When I am adding a product its variants and variants options are being added to the databasse
*database
but the product is not being published for the guest accounts.
I changed the flag isVisible of the products to true manually and they started to showing on the guest account for checking out.
So I figured when I am publishing the product that flag is not being updated. Can anyone tell me what is the reason?
I am using reaction in windows.
Andrey Lilitkin
@vigor87
Dec 21 2017 12:58
Hi, Everyone. How long does it takes to convert html template to reactioncommerce?
Michael Jenny
@prinzdezibel
Dec 21 2017 14:27
@vigor87 Is this HMTL intended to be published on a new route (URL) ?
like localhost:3000/myNewPage
Tse
@tse2909
Dec 21 2017 15:16
should i change columns or size to make product detail page consists of 3 columns ? @zenweasel
Patrick Newell
@pnewell4_twitter
Dec 21 2017 15:23
Anyone have insight into Media? where images are saved? can they be re-used? Specifically, I am writing a Connector which creates a few "suggested" Options (for new shop owner onboarding). I have successfully imported the image for the main Product, but am trying to decide whether each individual Option needs an image. and if so, can the options simply reference the main product's image. thanks!
José Luis Di Biase
@josx
Dec 21 2017 15:30
hey! if someone it is near Buenos Aires and want to drink some beers and talk about reaction is welcomed,
https://www.meetup.com/es-ES/Reaction-Commerce-Argentina/events/245900509/
slowpokefarm
@slowpokefarm
Dec 21 2017 15:43
hey there! How do I add a new static page to an empty plugin? Documentation does not cover it clearly enough :/
Michael Jenny
@prinzdezibel
Dec 21 2017 15:48

@pnewell4_twitter AFAIK, Images are saved in cfs_Media & cfsgridfs collections. Media and cfs_gridfs.files seem to hold meta data and gridfs.*chunks the blob data. I think you should be able to access the product's main image in a way similar to this:

const media = Media.findOne({
        "metadata.productId": this.props.product._id,
        "metadata.toGrid": 1
      });

and

  <span className="product-image" style={{ backgroundImage: `url('${media.url({ store: "large" })}')` }}/>

see product-variant plugin for more details

@slowpokefarm You may want to have a look into https://github.com/reactioncommerce/reaction-example-plugin. This plugin includes an exemplary static "About us" page.
slowpokefarm
@slowpokefarm
Dec 21 2017 15:55
I'm digging into it but when I remove everythink except static stuff and its route it doesn't work
it probably depends on the layout of this plugin, but I'm not sure
Michael Jenny
@prinzdezibel
Dec 21 2017 16:20
@slowpokefarm you're right. It has to do with our efforts to ditch blaze template completely from our code base. But this is not the case yet. Because of this limbo state, you probably need some glue. Specifically you need a blaze template with the name or your route in register.js

Try something like this:

glue.html


<template name="myStaticPage">
  <div>
    {{>React component=component}}
  </div>
</template>

and

glue.js

Template.myStaticPage.helpers({
  component() {
    return YourReactComponent;
  }
});
slowpokefarm
@slowpokefarm
Dec 21 2017 16:24
Nice, thanks! will try it now
Kenneth Beartusk
@beartusk
Dec 21 2017 19:16
@joshuacox @prinzdezibel @jshimko I have a bit of an issue. A customer placed an order the other day. I noticed he didn't have an account on the store though. I was very confused, so I checked the MongoDB to see if he was listed as a user. He indeed is as shown by the code below, but he is listed know where in the reaction store GUI. Does anyone know why this would occur?
{
    "_id" : "aayFiMgismKhyxwAX",
    "createdAt" : ISODate("2017-11-08T17:07:00.939Z"),
    "emails" : [ ],
    "profile" : {
        "addressBook" : {
            "country" : "US",
            "fullName" : "Sebastian Something",
            "address1" : "Something",
            "postal" : "58971",
            "city" : "Houston",
            "region" : "TX",
            "phone" : "1119397003",
            "isShippingDefault" : true,
            "isBillingDefault" : true,
            "isCommercial" : false,
            "_id" : "zwwbvCPrnuNesAjMr"
        }
    },
    "roles" : {
        "J8Bhq3uTtdgwZx3rz" : [
            "anonymous",
            "guest",
            "product",
            "tag",
            "index",
            "cart/checkout",
            "cart/completed",
            "account/verify",
            "reaction-paypal/paypalDone",
            "reaction-paypal/paypalCancel"
        ]
    },
    "services" : {
        "resume" : {
            "loginTokens" : [
                {
                    "when" : ISODate("2017-11-08T17:07:01.008Z"),
                    "hashedToken" : "RcRNzW7pe8V83W0TgmU6GJZ1J/CRq9FVEY0k0BFU2KY="
                }
            ]
        }
    },
    "name" : "Sebastian Something"
}
Michael Jenny
@prinzdezibel
Dec 21 2017 20:37
@beartusk There's an option "Checkout as guest" in the store settings panel. This way users can order, even without signing in. They just need an email address. Under the hood, a user is created nevertheless.
Kenneth Beartusk
@beartusk
Dec 21 2017 20:51
@prinzdezibel Ok that's interesting, he must have done that. But why do I have this document in my MongoDB in Users listing his name, but no email? Did he create an account, but not list his email?
Michael Jenny
@prinzdezibel
Dec 21 2017 20:54
there's also an Accounts collection which has a 1-to-1 relation to Users collection
maybe it's there?
Kenneth Beartusk
@beartusk
Dec 21 2017 20:58
Yeah I see his Account, but again no email associated with it. Although, in the orders collection I do see his email associated with his order.
Michael Jenny
@prinzdezibel
Dec 21 2017 20:58
yes, that's it
Kenneth Beartusk
@beartusk
Dec 21 2017 20:59
If this is how Reaction Commerce works then that means if a customer checks out as guest. An Account is created for them, but does not store their email. This doesn't quite make sense to me.
Michael Jenny
@prinzdezibel
Dec 21 2017 21:00
it makes sense, because what should happen when on a second order she/he chooses to use another email? I think it wouldn't be clean to just overwrite the account's email .
also the accounts email are double-opt-in , AFAIK and therefore somewhat more validated.
Michael Jenny
@prinzdezibel
Dec 21 2017 21:06
@beartusk don't assume a new user is created for every checkout she/he does. I think that's not the case. This is probably a one-off thing whenever a new browser session is created.