Order Confirmation Emails


#1

Hi All,

I looked through the docs and my outboard brain (Google) but didn’t find any documentation related to Reaction’s email templates.

The invite and change password emails work great.

When an order goes through, however (i.e. when the admin clicks “Send Shipment Notification” from the Order Panel), the confirmation email reads, “This is the placeholder template at private/email/templates/coreDefault.html.”

My reading tells me that this is the email provided when the operation triggering the email has “fallen through the cracks” to the default.

How can I configure the system to issue the correct email for a given operation?

Thanks!


#2

If you are running the current version (0.18), you should see a panel in the dashboard that allows you to customize all the templates. Also, the shipping template should be filled in now so that problem is hopefully already solved.


#3

I haven’t that dialog (though I pulled down an instance that did to my local development system and know what you mean); I wonder if there is a way I can update the system without trashing my hard work


#4

Which hard work are you talking about? Have you modified core components?


#5

The products that I’ve added to the system, admin configuration, etc. I have not modified any core components.


#6

Have you checked out this. Using fixtures you can store and backup your data so you can upgrade without fear. :slight_smile:


#7

Please pardon what likely is a silly question but I created the fixtures per the linked dock.

I checked to make certain that I had all the .json files exported and checked that they in fact contained the Products, etc. from the ‘old’ instance.

The documentation states,

Now you should have your fixtures ready to go. Remember that they need to be placed in the private/data directory at the root of the project to be imported automatically.

Here’s a listing of the files I exported:

root@eee1498c626f:/private/data# ls
Products.json Shipping.json Shops.json Tags.json

So I’ve tried to copy these files to / (root of the server…silly), /opt/reaction (root of the reaction instance), and /opt/reaction/dist/bundle/programs/server/app (root of the node instance).

In each case I’ve restarted the docker containers. Here is the germane log entry:

reaction_1 | 17:44:54.459Z INFO Reaction: Load default data from /private/data/
reaction_1 | 17:44:55.118Z INFO Reaction: JobServer started
reaction_1 | 17:44:55.133Z WARN Reaction: Skipped loading settings from reaction.json.

Edit: I tried to put the data in the mongo (i.e. not reaction) container just for fun.

What /private/data location does Reaction need to load the exported data automatically?

Thanks for your help!


#8

It’s private/data from the root of the Reaction project. By default, JSON files for Shop, Products, etc. are already there. You will want to replace those.


#9

In my case, a ‘find’ for ‘Products.json’ revealed only one instance in /opt/reaction/dist/bundle/programs/server/assets/app/data.

I replaced the .json files in that directory with my previously exported data. The products’ names and descriptions came through though the products’ images, pricing, etc. did not. Judging from the data in the .json files, this is what I expected.

I tested the import function with both the ‘plain Jane’ current version and with the latest repository version (via docker-compose pull).

I tested also creating a fresh instance of the system. I first completely decimated the docker instances:

#!/bin/bash

Stop all containers

docker stop $(docker ps -a -q)

Delete all containers

docker rm $(docker ps -a -q)

Delete all images

docker rmi $(docker images -q)

After this is performed a docker-compose up using a known good docker-compose.yml file. Now, either with “stock” data or with imported data, I cannot add either prices, weights, quantities, etc. Here is a screen capture of what the system looks like when I try to update a product:

I note that I tested this in multiple browsers.

I am receiving errors in he console, actually. When I click on the main edit button (to the right of the product’s bolded price) I receive the following:

Exception from Tracker recompute function:
fb85fab….js?meteor_js_resource=true:3 TypeError: Cannot read property ‘setMembers’ of undefined
at t (fb85fab….js?meteor_js_resource=true:166)
at Object.o.nonreactive (fb85fab….js?meteor_js_resource=true:93)
at h.View.t (fb85fab….js?meteor_js_resource=true:166)
at fb85fab….js?meteor_js_resource=true:166
at Function.e._withTemplateInstanceFunc (fb85fab….js?meteor_js_resource=true:167)
at fb85fab….js?meteor_js_resource=true:166
at Object.h._withCurrentView (fb85fab….js?meteor_js_resource=true:166)
at n (fb85fab….js?meteor_js_resource=true:166)
at o.Computation._compute (fb85fab….js?meteor_js_resource=true:93)
at o.Computation._recompute (fb85fab….js?meteor_js_resource=true:93)
fb85fab….js?meteor_js_resource=true:3 Exception from Tracker recompute function:
fb85fab….js?meteor_js_resource=true:3 TypeError: Cannot read property ‘setMembers’ of undefined
at t (fb85fab….js?meteor_js_resource=true:166)
at Object.o.nonreactive (fb85fab….js?meteor_js_resource=true:93)
at h.View.t (fb85fab….js?meteor_js_resource=true:166)
at fb85fab….js?meteor_js_resource=true:166
at Function.e._withTemplateInstanceFunc (fb85fab….js?meteor_js_resource=true:167)
at fb85fab….js?meteor_js_resource=true:166
at Object.h._withCurrentView (fb85fab….js?meteor_js_resource=true:166)
at n (fb85fab….js?meteor_js_resource=true:166)
at o.Computation._compute (fb85fab….js?meteor_js_resource=true:93)
at o.Computation._recompute (fb85fab….js?meteor_js_resource=true:93)
fb85fab….js?meteor_js_resource=true:3 Exception from Tracker recompute function:
fb85fab….js?meteor_js_resource=true:3 TypeError: Cannot read property ‘setMembers’ of undefined
at t (fb85fab….js?meteor_js_resource=true:166)
at Object.o.nonreactive (fb85fab….js?meteor_js_resource=true:93)
at h.View.t (fb85fab….js?meteor_js_resource=true:166)
at fb85fab….js?meteor_js_resource=true:166
at Function.e._withTemplateInstanceFunc (fb85fab….js?meteor_js_resource=true:167)
at fb85fab….js?meteor_js_resource=true:166
at Object.h._withCurrentView (fb85fab….js?meteor_js_resource=true:166)
at n (fb85fab….js?meteor_js_resource=true:166)
at o.Computation._compute (fb85fab….js?meteor_js_resource=true:93)
at o.Computation._recompute (fb85fab….js?meteor_js_resource=true:93)
fb85fab….js?meteor_js_resource=true:3 Exception from Tracker recompute function:
fb85fab….js?meteor_js_resource=true:3 TypeError: Cannot read property ‘setMembers’ of undefined
at t (fb85fab….js?meteor_js_resource=true:166)
at Object.o.nonreactive (fb85fab….js?meteor_js_resource=true:93)
at h.View.t (fb85fab….js?meteor_js_resource=true:166)
at fb85fab….js?meteor_js_resource=true:166
at Function.e._withTemplateInstanceFunc (fb85fab….js?meteor_js_resource=true:167)
at fb85fab….js?meteor_js_resource=true:166
at Object.h._withCurrentView (fb85fab….js?meteor_js_resource=true:166)
at n (fb85fab….js?meteor_js_resource=true:166)
at o.Computation._compute (fb85fab….js?meteor_js_resource=true:93)
at o.Computation._recompute (fb85fab….js?meteor_js_resource=true:93)
fb85fab….js?meteor_js_resource=true:3 Exception from Tracker recompute function:
fb85fab….js?meteor_js_resource=true:3 TypeError: Cannot read property ‘setMembers’ of undefined
at t (fb85fab….js?meteor_js_resource=true:166)
at Object.o.nonreactive (fb85fab….js?meteor_js_resource=true:93)
at h.View.t (fb85fab….js?meteor_js_resource=true:166)
at fb85fab….js?meteor_js_resource=true:166
at Function.e._withTemplateInstanceFunc (fb85fab….js?meteor_js_resource=true:167)
at fb85fab….js?meteor_js_resource=true:166
at Object.h._withCurrentView (fb85fab….js?meteor_js_resource=true:166)
at n (fb85fab….js?meteor_js_resource=true:166)
at o.Computation._compute (fb85fab….js?meteor_js_resource=true:93)
at o.Computation._recompute (fb85fab….js?meteor_js_resource=true:93)
fb85fab….js?meteor_js_resource=true:3 Exception from Tracker recompute function:
fb85fab….js?meteor_js_resource=true:3 TypeError: Cannot read property ‘setMembers’ of undefined
at t (fb85fab….js?meteor_js_resource=true:166)
at Object.o.nonreactive (fb85fab….js?meteor_js_resource=true:93)
at h.View.t (fb85fab….js?meteor_js_resource=true:166)
at fb85fab….js?meteor_js_resource=true:166
at Function.e._withTemplateInstanceFunc (fb85fab….js?meteor_js_resource=true:167)
at fb85fab….js?meteor_js_resource=true:166
at Object.h._withCurrentView (fb85fab….js?meteor_js_resource=true:166)
at n (fb85fab….js?meteor_js_resource=true:166)
at o.Computation._compute (fb85fab….js?meteor_js_resource=true:93)
at o.Computation._recompute (fb85fab….js?meteor_js_resource=true:93)
fb85fab….js?meteor_js_resource=true:3 Exception from Tracker recompute function:
fb85fab….js?meteor_js_resource=true:3 Error: Unexpected object in htmljs in toText: Label
at t.visitObject (fb85fab….js?meteor_js_resource=true:164)
at t.visit (fb85fab….js?meteor_js_resource=true:164)
at Object.o.toText (fb85fab….js?meteor_js_resource=true:164)
at Object.h._toText (fb85fab….js?meteor_js_resource=true:166)
at h.View.d (fb85fab….js?meteor_js_resource=true:166)
at fb85fab….js?meteor_js_resource=true:166
at Function.e._withTemplateInstanceFunc (fb85fab….js?meteor_js_resource=true:167)
at fb85fab….js?meteor_js_resource=true:166
at Object.h._withCurrentView (fb85fab….js?meteor_js_resource=true:166)
at n (fb85fab….js?meteor_js_resource=true:166)
fb85fab….js?meteor_js_resource=true:3 Exception from Tracker recompute function:
fb85fab….js?meteor_js_resource=true:3 Error: Unexpected object in htmljs in toText: Label
at t.visitObject (fb85fab….js?meteor_js_resource=true:164)
at t.visit (fb85fab….js?meteor_js_resource=true:164)
at Object.o.toText (fb85fab….js?meteor_js_resource=true:164)
at Object.h._toText (fb85fab….js?meteor_js_resource=true:166)
at h.View.d (fb85fab….js?meteor_js_resource=true:166)
at fb85fab….js?meteor_js_resource=true:166
at Function.e._withTemplateInstanceFunc (fb85fab….js?meteor_js_resource=true:167)
at fb85fab….js?meteor_js_resource=true:166
at Object.h._withCurrentView (fb85fab….js?meteor_js_resource=true:166)
at n (fb85fab….js?meteor_js_resource=true:166)
fb85fab….js?meteor_js_resource=true:3 Exception from Tracker recompute function:
fb85fab….js?meteor_js_resource=true:3 Error: Unexpected object in htmljs in toText: Label
at t.visitObject (fb85fab….js?meteor_js_resource=true:164)
at t.visit (fb85fab….js?meteor_js_resource=true:164)
at Object.o.toText (fb85fab….js?meteor_js_resource=true:164)
at Object.h._toText (fb85fab….js?meteor_js_resource=true:166)
at h.View.d (fb85fab….js?meteor_js_resource=true:166)
at fb85fab….js?meteor_js_resource=true:166
at Function.e._withTemplateInstanceFunc (fb85fab….js?meteor_js_resource=true:167)
at fb85fab….js?meteor_js_resource=true:166
at Object.h._withCurrentView (fb85fab….js?meteor_js_resource=true:166)
at n (fb85fab….js?meteor_js_resource=true:166)
fb85fab….js?meteor_js_resource=true:3 Exception from Tracker recompute function:
fb85fab….js?meteor_js_resource=true:3 Error: Unexpected object in htmljs in toText: Label
at t.visitObject (fb85fab….js?meteor_js_resource=true:164)
at t.visit (fb85fab….js?meteor_js_resource=true:164)
at Object.o.toText (fb85fab….js?meteor_js_resource=true:164)
at Object.h._toText (fb85fab….js?meteor_js_resource=true:166)
at h.View.d (fb85fab….js?meteor_js_resource=true:166)
at fb85fab….js?meteor_js_resource=true:166
at Function.e._withTemplateInstanceFunc (fb85fab….js?meteor_js_resource=true:167)
at fb85fab….js?meteor_js_resource=true:166
at Object.h._withCurrentView (fb85fab….js?meteor_js_resource=true:166)
at n (fb85fab….js?meteor_js_resource=true:166)
fb85fab….js?meteor_js_resource=true:3 Exception from Tracker recompute function:
fb85fab….js?meteor_js_resource=true:3 Error: Unexpected object in htmljs in toText: Label
at t.visitObject (fb85fab….js?meteor_js_resource=true:164)
at t.visit (fb85fab….js?meteor_js_resource=true:164)
at Object.o.toText (fb85fab….js?meteor_js_resource=true:164)
at Object.h._toText (fb85fab….js?meteor_js_resource=true:166)
at h.View.d (fb85fab….js?meteor_js_resource=true:166)
at fb85fab….js?meteor_js_resource=true:166
at Function.e._withTemplateInstanceFunc (fb85fab….js?meteor_js_resource=true:167)
at fb85fab….js?meteor_js_resource=true:166
at Object.h._withCurrentView (fb85fab….js?meteor_js_resource=true:166)
at n (fb85fab….js?meteor_js_resource=true:166)
fb85fab….js?meteor_js_resource=true:3 Exception from Tracker recompute function:
fb85fab….js?meteor_js_resource=true:3 Error: Unexpected object in htmljs in toText: Label
at t.visitObject (fb85fab….js?meteor_js_resource=true:164)
at t.visit (fb85fab….js?meteor_js_resource=true:164)
at Object.o.toText (fb85fab….js?meteor_js_resource=true:164)
at Object.h._toText (fb85fab….js?meteor_js_resource=true:166)
at h.View.d (fb85fab….js?meteor_js_resource=true:166)
at fb85fab….js?meteor_js_resource=true:166
at Function.e._withTemplateInstanceFunc (fb85fab….js?meteor_js_resource=true:167)
at fb85fab….js?meteor_js_resource=true:166
at Object.h._withCurrentView (fb85fab….js?meteor_js_resource=true:166)
at n (fb85fab….js?meteor_js_resource=true:166)
fb85fab….js?meteor_js_resource=true:3 Exception from Tracker recompute function:
fb85fab….js?meteor_js_resource=true:3 Error: Unexpected object in htmljs in toText: Label
at t.visitObject (fb85fab….js?meteor_js_resource=true:164)
at t.visit (fb85fab….js?meteor_js_resource=true:164)
at Object.o.toText (fb85fab….js?meteor_js_resource=true:164)
at Object.h._toText (fb85fab….js?meteor_js_resource=true:166)
at h.View.d (fb85fab….js?meteor_js_resource=true:166)
at fb85fab….js?meteor_js_resource=true:166
at Function.e._withTemplateInstanceFunc (fb85fab….js?meteor_js_resource=true:167)
at fb85fab….js?meteor_js_resource=true:166
at Object.h._withCurrentView (fb85fab….js?meteor_js_resource=true:166)
at n (fb85fab….js?meteor_js_resource=true:166)


#10

I think I’ve tracked the inability to edit product variants to just this (running a fresh install):

fb85fab….js?meteor_js_resource=true:3 Exception from Tracker recompute function:
fb85fab….js?meteor_js_resource=true:3 Error: Unexpected object in htmljs in toText: Label
at t.visitObject (fb85fab….js?meteor_js_resource=true:164)
at t.visit (fb85fab….js?meteor_js_resource=true:164)
at Object.o.toText (fb85fab….js?meteor_js_resource=true:164)
at Object.h._toText (fb85fab….js?meteor_js_resource=true:166)
at h.View.d (fb85fab….js?meteor_js_resource=true:166)
at fb85fab….js?meteor_js_resource=true:166
at Function.e._withTemplateInstanceFunc (fb85fab….js?meteor_js_resource=true:167)
at fb85fab….js?meteor_js_resource=true:166
at Object.h._withCurrentView (fb85fab….js?meteor_js_resource=true:166)
at n (fb85fab….js?meteor_js_resource=true:166)


#11

Update: I paired the configuration (docker-compose.yml) down to it’s base elements:

reaction:
image: reactioncommerce/reaction:latest
links:
- mongo
ports:
- "80:3000"
environment:
ROOT_URL: "http://yourhost.yourdomain.com"
MONGO_URL: "mongodb://mongo:27017/meteor"
REACTION_EMAIL: "you@yourdomain.com"
MAIL_URL: "smtp://you%40yourdomain.com:yourpass@smtp.gmail.com:465"
REACTION_USER: "admin"
REACTION_AUTH: "your.email.password"
VIRTUAL_HOST: “yourhost.yourdomain.com

mongo:
image: mongo:latest
command: mongod --storageEngine=wiredTiger

Here is the script I use to completely destroy the docker containers and instances for a fresh build:

#!/bin/bash

Stop all containers

docker stop $(docker ps -a -q)

Delete all containers

docker rm $(docker ps -a -q)

Delete all images

docker rmi $(docker images -q)


#12

UPDATE: the variant editing works like a charm (at least the 0.19.0 test release) when installed on localhost.

This appears to be something related to running through docker instances on a remote host.

I will update again as I know more.


#13

UPDATE: This issue is now part of the milestone for the 0.20.0 release (Release candidate 1.0.0)