These are chat archives for reactioncommerce/reaction

25th
Apr 2017
Brent Hoover
@zenweasel
Apr 25 2017 00:13
@carlos-olivera You may want to hold off on doing that as we are just starting our transition to React router
reactioncommerce/reaction#2123
Dennis Öhman
@madsoulswe
Apr 25 2017 06:45
How do you reload lang-files, should I clear Translations and Assets? Some new translations dosen't load
blob
Brent Hoover
@zenweasel
Apr 25 2017 06:45
the easiest way is just to reaction reset
Brent Hoover
@zenweasel
Apr 25 2017 06:54
import { Translations } from "/lib/collections";
import { Reaction } from "/server/api";
import { loadCoreTranslations } from "/server/startup/i18n”;

const shopId = Reaction.getShopId();
Translations.remove({shopId: shopId});
loadCoreTranslations();
Reaction.Import.flush();
Dennis Öhman
@madsoulswe
Apr 25 2017 07:07
Hm didn't work, none of the language-files in "shipping-rates" get loaded. I can see them in assets but not imported to translations. I can see in the logs that they are "importing"
{"name":"Reaction","hostname":"tinytiny","pid":21760,"level":20,"msg":"Importing en translation for \"reaction-shipping\"","time":"2017-04-25T07:01:13.322Z","v":0}
Brent Hoover
@zenweasel
Apr 25 2017 07:08
Are the files being imported?
which method did you use? reaction reset?
Dennis Öhman
@madsoulswe
Apr 25 2017 07:12
I used your script, does reaction reset all reset orders?
Brent Hoover
@zenweasel
Apr 25 2017 07:12
Yes, resets the entire db
let me see if there is something else there
Brent Hoover
@zenweasel
Apr 25 2017 07:19
if you are logged in as admin you can just do Meteor.call("i18n/flushTranslations”);
You will need to do a hard refresh to see them, translations are not reactive
Dennis Öhman
@madsoulswe
Apr 25 2017 07:21
Meteor.call("i18n/flushTranslations”); worked! Thank you!
Brent Hoover
@zenweasel
Apr 25 2017 07:22
:+1:
tarzak
@tarzak
Apr 25 2017 08:05
Hello guys. I have written the message to your forums, but I need get answer as fast, as possible. So may be any one here could help me?! The problem is: I should enable any payment provider, to allow users finish their orders. But I would like, let users possibility just place orders, without payment. Is this possible? For example payment will be processed later by courier.
Brent Hoover
@zenweasel
Apr 25 2017 08:05
Have you seen the tutorial on writing a payment provider?
tarzak
@tarzak
Apr 25 2017 08:05
one second
Brent Hoover
@zenweasel
Apr 25 2017 08:07
there is no COD/POS payment provider built in
there is also this package, which won’t work out of the box but could be updated to work with the current version: https://github.com/Gouthamve/reaction-cod
tarzak
@tarzak
Apr 25 2017 08:11
@zenweasel well, I've found article "Creating payment provider". So do I understand right, I can edit "example provider", and leave only button "Complete your order"?
Brent Hoover
@zenweasel
Apr 25 2017 08:12
There’s a little more to it than that, but basically
tarzak
@tarzak
Apr 25 2017 08:13
allright, thanks, I will try it.
fabiogu
@fabiogu
Apr 25 2017 08:19
hi, I'd like use ReC to sell services. I'm asking if there is a way to configure bundled product or Grouped products made by virtual products (the services)
Brent Hoover
@zenweasel
Apr 25 2017 08:21
@fabiogu Can you elaborate a little more?
fabiogu
@fabiogu
Apr 25 2017 08:21
yep
if someone guide to me where to elaborate the code I could
Brent Hoover
@zenweasel
Apr 25 2017 08:23
I can’t guide you to the code unless I understand what you want to accomplish
fabiogu
@fabiogu
Apr 25 2017 08:23
no, sorry I mean if you can say to me which part of the code I must hack, the section, about coding is my business
but if you can pint which module I need to elaborate it will be useful to avoid me open all the Reaction CXommerce code
point**
Brent Hoover
@zenweasel
Apr 25 2017 08:25
I don’t know what " configure bundled product or Grouped products made by virtual products” means
so until I understand what you want to do, I can’t show you the code you need to change
fabiogu
@fabiogu
Apr 25 2017 08:27
is the magento meaning ... for example I'd like sell a picture of a modern artist and in the same selling, be able to link to this picture, the transportation service or the assurance, so the customet can chose to buy or not the linked services
cunsomer**
customer* (damn italian autocorrection!)
Brent Hoover
@zenweasel
Apr 25 2017 08:28
so like a cross-sell?
fabiogu
@fabiogu
Apr 25 2017 08:29
yes
Brent Hoover
@zenweasel
Apr 25 2017 08:29
there’s nothing built into RC that will do that. You could probably extend the Product schema and add a linkedProducts field to be an array of products
You would need to change the Product Detail Page as well to show that
fabiogu
@fabiogu
Apr 25 2017 08:30
I got, it is clear what you mean
thanks a lot
Brent Hoover
@zenweasel
Apr 25 2017 08:31
:+1:
fabiogu
@fabiogu
Apr 25 2017 08:31
have a nice day
bye
Janus Reith
@janus-reith
Apr 25 2017 13:05
Still trying to customize my PDP tenplate aswell.
First issue the variants alter the image shown in the media container left. The options/childvariants have a media prop and show their image "inline" inside of the button. I want to customize variant to do the same, but it has no media prop and im a bit lost...
Second thing is that i still need to implement more layers of nested variants. Will it be enough to edit product-admin and the pdp template, or is there more included code i nedd to take Into account?
Daniel Honig
@dhonig
Apr 25 2017 13:51
Yeah I've been having fun learning the layout system @janus-reith have some of the same questions
septk
@septk
Apr 25 2017 13:54
hi! when i setup reaction on heroku, reaction cant load predetermined Flat rates (is empty), and when I'm trying to create one new, I have this error notification "Flat rate update failed. Error: No Provider ID provided when adding methods [bad-provider-id]" How can I resolve this?
Captura de pantalla 2017-04-25 a las 15.55.04.png
Daniel Honig
@dhonig
Apr 25 2017 14:20
@septk I take it this is ocurred in checkout? Did you configure these in the control panel first?
septk
@septk
Apr 25 2017 14:52
Hi @dhonig is when I configure these in my control panel. I don't know exactly why is occurring this
I can't test my checkout for this problem
Daniel Honig
@dhonig
Apr 25 2017 14:55
You already have production data or is this pre-production?
septk
@septk
Apr 25 2017 14:58
PreProduction, only I set up various things of shop like email host, my currency, my stripe ID....
Daniel Honig
@dhonig
Apr 25 2017 15:07
I mean sounds like something isn't lining up right in mongo, can you try resetting?
do you have those values stored in seeds?
tarzak
@tarzak
Apr 25 2017 15:08
I have the same error right after deploy on galaxy. Locally all was good
I have compared my DBs. And on local i have shopId in shipping document. And in galaxy db there is shopId=== null
septk
@septk
Apr 25 2017 15:19
I have on my mongolab shopId, like on my local enviroment
I don't understand why
Aaron Judd
@aaronjudd
Apr 25 2017 16:24
@carlos-olivera fast-render is built in to the current router.. (which is just a wrapper around flow router).. however.. see: reactioncommerce/reaction#2123 this is @mikemurray react router replacement… coming soon..
Janus Reith
@janus-reith
Apr 25 2017 18:32
Im currently unsure if i should base my plugin on the release/master branch, or use development or even the 2099-react-router branch instead(is it usable yet?)
aviadbd
@aviadbd
Apr 25 2017 18:32

@aviadbd did a quick google on meteor code 137, this came up first: meteorhacks/meteord#96
How much ram do you have, and did you set up a swap?

So, how do I set up swap in the Docker?

Grr - this was quoting @janus-reith
Janus Reith
@janus-reith
Apr 25 2017 18:34
well not in the docker, but the host that the docker image is build on
is it a remote vps, or your local machine?
Janus Reith
@janus-reith
Apr 25 2017 19:16

hmm, somehow docker build fails for me when I set up docker machine to a remote host instead of my local..

Is there some nicer way, like maybe using the stock reaction image and "hook" my plugins into it?
Atm it is a bit uncomfortable to always have to completely build the image, and compose the docker-compose file after I cahnge the plugin

But this could also be due to my lack of knowledge with using dockeer
Janus Reith
@janus-reith
Apr 25 2017 19:31
The error i get is:
The command '/bin/sh -c cd $APP_SOURCE_DIR && bash $BUILD_SCRIPTS_DIR/build-meteor.sh && bash $BUILD_SCRIPTS_DIR/post-build-cleanup.sh' returned a non-zero code: 1
Daniel Honig
@dhonig
Apr 25 2017 20:21
@janus-reith that workflow sounds suspicious, I'm somewhat new here.....but to me ....The docker container should be built with all assets required to run your reaction app and then deployed
in a local environment you should be sharing the filesystem with the docker container and it should not be necesscary to rebuild the docker container
Janus Reith
@janus-reith
Apr 25 2017 20:25
@dhonig yeah I actually hope that im wrong..but the included docker-compose file doesn't seem like any part of the filesystem is configured to be shared with host
Daniel Honig
@dhonig
Apr 25 2017 20:26
taking a look
Janus Reith
@janus-reith
Apr 25 2017 20:27
as i just want to change content in the /import/plugins/custom folder where I develop, I also wonder if a rebuild would make sense in a logical way...
Daniel Honig
@dhonig
Apr 25 2017 20:27
@janus-reith the docker-compose.yml is a good dockerfile to support a quick preview
Janus Reith
@janus-reith
Apr 25 2017 20:27
but maybe this is necessary as they are loading during build and not dynamically?
Daniel Honig
@dhonig
Apr 25 2017 20:28
its not a great dockerfile for development or to support a local development worfklow where the software runs on docker
Janus Reith
@janus-reith
Apr 25 2017 20:28
hm okay
Daniel Honig
@dhonig
Apr 25 2017 20:28
we need to mount the localfilesytem in teh container
and use a local docker file
instead of pulling in an image
image: reactioncommerce/reaction:latest
Janus Reith
@janus-reith
Apr 25 2017 20:28
yeah i changed that part to my custom image
...which I always build manually and rerun the docker-compose part...
That isn't correct for reaction
Janus Reith
@janus-reith
Apr 25 2017 20:30
but not sure if it is worth the effort, as the meteor development workflow doesnt really involve the docker part
Daniel Honig
@dhonig
Apr 25 2017 20:30
but its way closer to what your looking for right now than the docker-compose in github
Janus Reith
@janus-reith
Apr 25 2017 20:31
ah okay, taking a look
the build part makes sense
Daniel Honig
@dhonig
Apr 25 2017 20:31
that says use the dockerfile at the same path
Janus Reith
@janus-reith
Apr 25 2017 20:31
yep
would save the extra step
Daniel Honig
@dhonig
Apr 25 2017 20:32
so this gives a workflow that we can change, test and iterate
without the overhead of packaging
each time
on a recent project we had multiple docker-compose files and used make to automate our docker workflow
I'm not sure how the reaction community wants to do it, but there certainly is a use case for multiple compose definitions
Janus Reith
@janus-reith
Apr 25 2017 20:35
I just switched docker env back to my local machnine, and replaced image: mycustomimagename with "build: ."
This works, one step further :D
Daniel Honig
@dhonig
Apr 25 2017 20:35
ok
I'm busy mastering reaction customization, otherwise I'd do more, but glad I could help
You'll need to change your Dockerfile as well
to something sensible
Janus Reith
@janus-reith
Apr 25 2017 20:37
yeah this is also my main priority right now, just thought I'd take a look on what to actually do when I'm finished with that
Daniel Honig
@dhonig
Apr 25 2017 20:37
at minimum you need to define WORKDIR
and the CMD
CMD is probably just reaction "
Janus Reith
@janus-reith
Apr 25 2017 20:41
Hm I think I stick to just keeping the default reactioncommerce/base image that is pulled in the dockerfile
Daniel Honig
@dhonig
Apr 25 2017 20:41
you should do a docker-compose down
then up
to rebuild completly
make sure you have the Dockerfile changed approriately
then it should work
Janus Reith
@janus-reith
Apr 25 2017 20:43
ah another step i missed, always stopped and removed the images manually .D
thx for your help
Daniel Honig
@dhonig
Apr 25 2017 20:44
my pleasure
Janus Reith
@janus-reith
Apr 25 2017 20:49

Now i only have to figure out why the build part fails when i switch to the remote docker-machine while it works locally:
ERROR: Service 'reaction' failed to build: The command '/bin/sh -c cd $APP_SOURCE_DIR && bash $BUILD_SCRIPTS_DIR/build-meteor.sh && bash $BUILD_SCRIPTS_DIR/post-build-cleanup.sh' returned a non-zero code: 1

But I guess it will be easier for the reaction devs to answer this

Daniel Honig
@dhonig
Apr 25 2017 20:50
step one
make sure app source dir is present'
step 2 inspect build-meteor.sh
step 3 inspect the clean up script
you can try to run them with dc exec
Janus Reith
@janus-reith
Apr 25 2017 20:55
will try that