These are chat archives for reactioncommerce/reaction

10th
Apr 2018
arsen3d
@arsen3d
Apr 10 2018 00:10
@NSMobileCS Thanks
arsen3d
@arsen3d
Apr 10 2018 02:26
Is there a way to integrate with stamps.com via shippo to print USPS labels?
Nathan Smith
@NSMobileCS
Apr 10 2018 02:54
when adding products programatically, i need to specify the store ID, but not the actual _id mongodb field - is that right?
Brent Hoover
@zenweasel
Apr 10 2018 02:54
No, you need to specify the ShopId. Which would be the mongo _id field
Nathan Smith
@NSMobileCS
Apr 10 2018 02:56
the Product's ._id field? i thought it was the store's _id field needed to be in the Product's .shopID field?
Brent Hoover
@zenweasel
Apr 10 2018 02:56
Sorry, I misunderstood. You don’t need to add the _id field for the product itself, Mongo will create that
Nathan Smith
@NSMobileCS
Apr 10 2018 02:57
thanks.
would it work if i did set it, btw? i'm pulling in products from another api & it could maybe be useful to use same IDs/kinda just curious
Brent Hoover
@zenweasel
Apr 10 2018 02:59
I know you can use an existing ID, but not sure if you can just insert any random string
Nathan Smith
@NSMobileCS
Apr 10 2018 03:01
makes sense, thanks
Nathan Smith
@NSMobileCS
Apr 10 2018 03:07
product.workflow.workflow = ["imported"]; // setting this bypasses revision control <-- does this achieve roughly the same thing as what the dev tools plugin does w/ calling methods.turnOffRevisions(); , then doing the batch import, & then calling .turnOnRevisions(); afterwards?
Brent Hoover
@zenweasel
Apr 10 2018 03:07
Yeah, you don’t need that if you turn off revision control.
Nathan Smith
@NSMobileCS
Apr 10 2018 03:07
should i prefer one or the other?
Brent Hoover
@zenweasel
Apr 10 2018 03:08
Turning off revision control is cleaner, I just didn’t realize that was the way to do it at first
Probably doesn’t hurt to have that set though
since it is imported
Nathan Smith
@NSMobileCS
Apr 10 2018 03:09
so no harm in doing both to be sure?
Brent Hoover
@zenweasel
Apr 10 2018 03:09
that’s been my opinion
Nathan Smith
@NSMobileCS
Apr 10 2018 03:09
awesome, thanks!
Brent Hoover
@zenweasel
Apr 10 2018 03:09
:+1:
Nathan Smith
@NSMobileCS
Apr 10 2018 03:32
the products have images linked to them (1-6 images per product, hosted separately on an amazon aws cdn w/ urls in the json), and there's over 200 products already. do you think i'm better off extending the Product schema to keep this info & creating a custom template to display it, or just follow the examples of the swag shop & dev tools plugins & pull the pics in to Meteor / reaction media ?
obviously i don't want the overhead of downloading 2-5gb of the same images every time it refreshes, which should be often.... but i guess that's not a concern because I'd be checking for whether it already exists, so should i probably just use the media system the way you guys already have it?
Brent Hoover
@zenweasel
Apr 10 2018 03:36
I would say that the simplest way is just to use the existing system
Nathan Smith
@NSMobileCS
Apr 10 2018 03:39
:thumbsup:
arsen3d
@arsen3d
Apr 10 2018 03:43
What is best practices for creating contacts us, about, faq page on this platform?
KunalDE
@KunalDE
Apr 10 2018 06:10
Would anyone tell me know in which template {{siteName}} is defined. The {{siteName}} is defined in reaction-commerce-development/imports/plugins/core/ui-navbar/client/components/brand/brand.html.
Nathan Smith
@NSMobileCS
Apr 10 2018 06:22
idk, but since you can change siteName, my instinct says it's probably set in mongodb &/or by a setup or loader script. hope somebody who's been looking at the reaction commerce toolkit longer than the near
*somebody can. give you a more definitive answer
*who's spent more than a week working with reaction commerce, unlike me
Brent Hoover
@zenweasel
Apr 10 2018 06:49
@KunalDE I don’t think that template is in use any more. In fact I don’t see that at the path you have there. Are you using a really old version of RC?
KunalDE
@KunalDE
Apr 10 2018 08:09
@Zenweasel Thanks for your reply. We are using version given below.
Node: 4.8.7
NPM: 2.15.11
Meteor Node: 4.6.1
Meteor NPM: 3.10.9
Reaction CLI: 0.28.0
Brent Hoover
@zenweasel
Apr 10 2018 08:10
Wow, that’s some crazy old versions of node and NPM
and that doesn’t include what version of Reaction you are on
KunalDE
@KunalDE
Apr 10 2018 08:12
How we check the reaction version?
Brent Hoover
@zenweasel
Apr 10 2018 08:12
if you are in a reaction directory it should be returned with reaction -v
KunalDE
@KunalDE
Apr 10 2018 08:12
It's give the same result.
The response is given below.

fatal: Not a git repository (or any of the parent directories): .git

Node: 4.8.7
NPM: 2.15.11
Meteor Node: 4.6.1
Meteor NPM: 3.10.9
Reaction CLI: 0.28.0

Brent Hoover
@zenweasel
Apr 10 2018 08:14
you can also look in the package.json
cat package.json | grep -i version
KunalDE
@KunalDE
Apr 10 2018 08:17
reactioncommerce/authorize-net": "^1.0.7
Brent Hoover
@zenweasel
Apr 10 2018 08:17
I don’t even know how you would have got that result
but you can just look in the packjage.json file for the version entry
KunalDE
@KunalDE
Apr 10 2018 08:18
I have search in the package.json file.
Brent Hoover
@zenweasel
Apr 10 2018 08:18
it’s the third line
KunalDE
@KunalDE
Apr 10 2018 08:19
That is 0.17.1
Brent Hoover
@zenweasel
Apr 10 2018 08:19
  "name": "reaction",
  "description": "Reaction is a modern reactive, real-time event driven ecommerce platform.",
  "version": "1.9.0”,
like that, but it says 0.17.1?
KunalDE
@KunalDE
Apr 10 2018 08:19
{
"name": "reaction",
"description": "Reaction is a modern reactive, real-time event driven ecommerce platform.",
"version": "0.17.1",
"main": "main.js",
Brent Hoover
@zenweasel
Apr 10 2018 08:20
yes, that is an extremely old version. Like two years old?
or even older
KunalDE
@KunalDE
Apr 10 2018 08:21
Ok. So, could I will write the new version i.e. 1.9.0 and save that file to update the RC version.
Brent Hoover
@zenweasel
Apr 10 2018 08:22
No
You should clone the current version from the repo, or use reaction init
no work you have done will probably work with the current version
KunalDE
@KunalDE
Apr 10 2018 10:48
Please let me know that how can update reaction commerce version in the old reaction commerce project.
Nithyanandakumar
@nithin-ideas2it
Apr 10 2018 10:58
@KunalDE Have you tried as suggested in reactioncommerce/reaction#4093 ? git remote -v to make sure the remote and origin and git pull origin or upsteam master?
Brent Hoover
@zenweasel
Apr 10 2018 12:02
I didn't suggest that method because I am afraid it might mess up your local version
And your output earlier said you are not in a git repo
So git commands will not work
I would suggest you create a fresh clone and migrate your changes over there
If you've done everything in a plugin you should be ok
jiayimu
@jiayimu
Apr 10 2018 13:47
@NSMobileCS Thank you for your suggestion. I installed most of the dependencies. But some of them are conflict each other.
jiayimu
@jiayimu
Apr 10 2018 14:12
image.png
Does anyone get the error like the above? I just use reaction init to install the reaction commerce. But the sample product didn't show up, and I found the error message from the console.
Gabriel L. Maljkovich
@glmaljkovich
Apr 10 2018 14:15

@zenweasel I have a performance concern about RC. I notice lots of Memory limit timeouts by the garbage collector on my production deploy.

 <--- Last few GCs ---> 
24863991 ms: Mark-sweep 1363.0 (1456.8) -> 1369.4 (1456.8) MB, 1899.9 / 0 ms [allocation failure] [GC in old space requested]. 
24865989 ms: Mark-sweep 1369.4 (1456.8) -> 1369.4 (1456.8) MB, 1997.6 / 0 ms [allocation failure] [GC in old space requested]. 
24867920 ms: Mark-sweep 1369.4 (1456.8) -> 1361.3 (1456.8) MB, 1931.6 / 0 ms [last resort gc]. 
24869825 ms: Mark-sweep 1361.3 (1456.8) -> 1362.5 (1456.8) MB, 1904.8 / 0 ms [last resort gc]. 
 <--- JS stacktrace ---> 
 ==== JS stack trace ========================================= 
 Security context: 0x2c346af37399 <JS Object> 
     1: clone [/app/.meteor/heroku_build/app/programs/server/packages/ejson.js:~625] [pc=0x1217e098b707] (this=0x2e78905a1b09 <an Object with map 0x27b6f7d73b21>,v=0x2836b7e07de9 <an Object with map 0x1e9b5d3bc139>) 
     2: /* anonymous */(aka /* anonymous */) [/app/.meteor/heroku_build/app/programs/server/packages/ejson.js:681] [pc=0x1217e098673b] (this=0x2c346af04131 <undefined>,key=0x1a35c05db... 

CALL_AND_RETRY_LAST Allocation failed - process out of memory

I was wondering if that might be related to this Meteor problem: https://forums.meteor.com/t/how-to-fix-unended-observers-production-memory-leak/22861. Is reaction commerce stoping the publications observers on the client?

@jiayimu I think they solved that on the latest release, isuue reactioncommerce/reaction#4011
Nathan Smith
@NSMobileCS
Apr 10 2018 14:43
@jiayimu what's the conflict you're getting? (run meteor npm i and see what it installs/reports missing/conflicts. you can ignore the 'WARN' about 'fsevents not supported on your platform', it's an os x package you don't need on ubuntu, but anything else worth checking out)
make sure you're giving the minimum version syntax for the peer dependencies
Nathan Smith
@NSMobileCS
Apr 10 2018 14:49
but i think maybe you might not have set the SKIP_FIXTURES=1 environment variable for the swag store -- it needs it or it gives an error. idk if it's the same error, but it would fit
Nathan Smith
@NSMobileCS
Apr 10 2018 14:55

i just made a script to set the environment variable & start reaction

`$ cat ./rxnstart # just what i called it, printing it to the screen w/ cat

export SKIP_FIXTURES=1

export API_KEY=xxxxxxxxxxx #different key irl!

reaction`

it had line breaks on my screen)
jiayimu
@jiayimu
Apr 10 2018 14:58
@NSMobileCS WOW. Thank you for these details. I will try them immediately.
Nathan Smith
@NSMobileCS
Apr 10 2018 14:59
no prob, hope it helps
i think i overcomplicated it though - all you need to do is export SKIP_FIXTURES=1 && reaction instead of just reaction to start it
assuming that's the issue
jiayimu
@jiayimu
Apr 10 2018 15:02
@NSMobileCS Cause I am not familiar with the Meteor. I cannot say what the problem I am having exactly. Hope this is the issue. Thank you so much~
@glmaljkovich Thank you. It works great.
Nathan Smith
@NSMobileCS
Apr 10 2018 15:07
i'm also quite new to meteor. experience before was django, ruby on rails & MEAN
sweet, glad to hear it :thumbsup:
Michael
@CallMeMonkey
Apr 10 2018 20:57
Hi, I am trying to install swag-shop plugin on Windows. Does anyone know how to set SKIP_FIXTURES=1 on windows 10?
Brent Hoover
@zenweasel
Apr 10 2018 21:11
set SKIP_FIXTURES=1
Michael
@CallMeMonkey
Apr 10 2018 21:17
Thanks Brent, but it doesn't work for me
image.png
Here is my result
Brent Hoover
@zenweasel
Apr 10 2018 21:18
No space
SKIP_FIXTURES not SKIP FIXTURES
Loan Laux
@loanlaux
Apr 10 2018 21:19
@KunalDE Reach out to me if you need someone to help you update your Reaction project. I like suicide missions. 😉
Michael
@CallMeMonkey
Apr 10 2018 21:19
Yes. It is an underline. Just covered by the red line.
Brent Hoover
@zenweasel
Apr 10 2018 21:19
Also maybe try SKIP_FIXTURES=true, maybe 1 doesn’t evaluate the same on Windows
I know it works on my W10 box
Michael
@CallMeMonkey
Apr 10 2018 21:21
@zenweasel Thanks, I'll try it!
Esteban Montes
@emontesg
Apr 10 2018 23:22
Hi there how i can remove the currencyes in the default reaction app ?
in the shop.json i set enabled to false but dont work still show
Brent Hoover
@zenweasel
Apr 10 2018 23:23
You can just remove them from Shops.json
Esteban Montes
@emontesg
Apr 10 2018 23:24
thanks
Esteban Montes
@emontesg
Apr 10 2018 23:32
I removed the currency in the shops.json but still showing in the app
Brent Hoover
@zenweasel
Apr 10 2018 23:32
you need to reset
Esteban Montes
@emontesg
Apr 10 2018 23:49
cmd+c and run reaction again ?
Brent Hoover
@zenweasel
Apr 10 2018 23:49
reaction reset -n
Esteban Montes
@emontesg
Apr 10 2018 23:49
nice
thanks