These are chat archives for reactioncommerce/reaction

8th
Apr 2016
xiaoc li
@brianxcli
Apr 08 2016 01:13
Any idea how to solve exchange rate warning?
blob
Brent Hoover
@zenweasel
Apr 08 2016 01:13
I am actually struggling with that right now
Are you getting that a ton of times? If I hit my dev site with FF I get it close to 50 times
xiaoc li
@brianxcli
Apr 08 2016 01:15
I am getting that warning every time I browse pages
Brent Hoover
@zenweasel
Apr 08 2016 01:15
there is this open issue for it reactioncommerce/reaction#924 but nobody has been seeing it but me
If you haven’t downloaded rates, it’s normal to get once per new session when it calls shop/getLocale
xiaoc li
@brianxcli
Apr 08 2016 01:17
haven't downloaded any rates, but how?
Brent Hoover
@zenweasel
Apr 08 2016 01:18
when you start the app, it should download rates from openexchangerates
if you want it to be able to show prices in a user’s local currency
if you haven’t, you can create a free account there and put that in the dashboard
xiaoc li
@brianxcli
Apr 08 2016 01:19
I was not aware of that, but according to the console, it failed to do so
Brent Hoover
@zenweasel
Apr 08 2016 01:19
what’s the error message?
xiaoc li
@brianxcli
Apr 08 2016 01:20
no idea, never saw an error for that
Brent Hoover
@zenweasel
Apr 08 2016 01:21
the error message Failed to get currency exchange rates is just when it tries to pull the exchange rate from the db
Not getting the exchange rates and putting them in the db, which the job server should handle in the background
xiaoc li
@brianxcli
Apr 08 2016 01:26
which setting is for exchange rates?
Brent Hoover
@zenweasel
Apr 08 2016 01:27
Core>Options>Open Exchange Rates App Id
xiaoc li
@brianxcli
Apr 08 2016 01:32
Found it. What if I don't care exchange rates and only need local currency
Brent Hoover
@zenweasel
Apr 08 2016 01:33
Well, that’s what you get if you don’t configure it, the downside is you get that error message. You could just edit that line or change your logging level to avoid getting that message all the time
xiaoc li
@brianxcli
Apr 08 2016 01:33
Ok, that's what I want
Brent Hoover
@zenweasel
Apr 08 2016 01:34
it’s line 127 in shop.js if you want to just comment it out
you probably want to keep getting warn level logging for everything else
or you could change the level there to debug, 6 of one
xiaoc li
@brianxcli
Apr 08 2016 01:40
ok
Aesop7
@Aesop7
Apr 08 2016 01:42
Hi all, how do you set scope when logging in with google or facebook?
xiaoc li
@brianxcli
Apr 08 2016 02:06
@zenweasel why the reaction sample data creates two sample shops, with one of them a blank site? Just an example, for no purpose?
Brent Hoover
@zenweasel
Apr 08 2016 02:07
Yes. To show that you can create multiple shops
xiaoc li
@brianxcli
Apr 08 2016 02:16
thx
Spencer Norman
@spencern
Apr 08 2016 04:16
Is there a good way to turn off multi-site? Specifically the prefixed product pages
xiaoc li
@brianxcli
Apr 08 2016 06:22
Do you mean multi shops?
Spencer Norman
@spencern
Apr 08 2016 06:28
yes, thanks! I mean multi-vendor/multi-shop
xiaoc li
@brianxcli
Apr 08 2016 06:34
What is annoying you? In theory, multiple shops can be achieved by several ways. And I don't think there is a switch for that.
Spencer Norman
@spencern
Apr 08 2016 06:36
What I’d like to see is a way to for a single vendor shop to have routes setup without the shop name in the url/slug for the product
e.g. if I have this: example.com/getoutfitted/tag/shop
I’d like to be able to have it be example.com/tag/shop
instead
xiaoc li
@brianxcli
Apr 08 2016 06:40
Yes, I've just learned a way for that. go to packages/reaction-router/common/init.js, find ReactionRouter.initPackageRoutes() method. Just change prefix to whatever you want. But I'm not sure if it's good to modify reaction libs.
But anyway, you have to for what you want
Spencer Norman
@spencern
Apr 08 2016 06:42
ah, this is great. :+1:
xiaoc li
@brianxcli
Apr 08 2016 06:43
Reaction uses the shop names for its route groups.
Spencer Norman
@spencern
Apr 08 2016 06:43
actually, this doesn’t seem to work
I get a 404 when trying to visit the products list via this method. Perhaps there are requirements for having the shop name in the url in the products subscription
xiaoc li
@brianxcli
Apr 08 2016 06:45
I'll have a look at it. Maybe the tags have links.
Spencer Norman
@spencern
Apr 08 2016 06:45
To clarify, it does work to remove the shop name from the url, but it causes the product pages to error
xiaoc li
@brianxcli
Apr 08 2016 06:52
Oh, its because the tags still hold the original links...
Spencer Norman
@spencern
Apr 08 2016 06:53
I’m not sure what you mean. I’m having trouble getting any products to show up after setting the prefix to ””
xiaoc li
@brianxcli
Apr 08 2016 06:53
Yes, you definitely will.
Because tags are <a> links, although the routes don't have shop names, but the links are still the same, need to find where defines tags
Spencer Norman
@spencern
Apr 08 2016 06:56
my links are updating fine (e.g. now linking to /tag/shop instead of /shopname/tag/shop) but the route doesn’t seem to be rendering correctly
xiaoc li
@brianxcli
Apr 08 2016 06:57
I see
Spencer Norman
@spencern
Apr 08 2016 06:58
it’s a bit confusing to me because where the route is defined (https://github.com/reactioncommerce/reaction/blob/development/packages/reaction-product-variant/server/register.js#L12)
it doesn’t appear that it relies on the shopname in any way
xiaoc li
@brianxcli
Apr 08 2016 07:00
It's FlowRouter, adding the prefix to route groups
Spencer Norman
@spencern
Apr 08 2016 07:00
oh?
xiaoc li
@brianxcli
Apr 08 2016 07:01
Refer the file I posted right now, the packages registry is loaded by router initialization
Spencer Norman
@spencern
Apr 08 2016 07:02
Looking at the route table, it appears that it’s adding an additional / to all my routes
xiaoc li
@brianxcli
Apr 08 2016 07:02
It defines group prefix: prefix: '/' + prefix
Spencer Norman
@spencern
Apr 08 2016 07:02
interesting
do you know of any way to eliminate the additional /
xiaoc li
@brianxcli
Apr 08 2016 07:03
You can read FlowRouter source file, it attaches the original path to to prefix
No idea of that.
Spencer Norman
@spencern
Apr 08 2016 07:07
oh, actually that was simple, I missed where it added the / + prefix. :sparkles:
xiaoc li
@brianxcli
Apr 08 2016 07:07
Oh, instead, you can set the prefix to ""...
Yeah, haha.
Spencer Norman
@spencern
Apr 08 2016 07:08
yeah, I just needed to update 163 instead of 91
thanks for the help :clap:
xiaoc li
@brianxcli
Apr 08 2016 07:09
no worries
xiaoc li
@brianxcli
Apr 08 2016 08:34
I remember who asked about footer?
Lukas Sägesser
@ScyDev
Apr 08 2016 11:01

I'm having massive problems with using a custom theme. It's a one page layout with some 3rd party CSS and JS dependencies.
But those just don't get loaded properly. What is the right way to do this?

Can I somehow just serve a static HTML/CC/JS theme without Meteor interfering in resource loading?

xiaoc li
@brianxcli
Apr 08 2016 13:19
I just read through the meteor guide. I'm afraid that's the way of meteor doing for pages. All htmls' heads are combined into one head, and so are the bodies. There's literally only one html needed to have a head and a body, while others define templates. Or else there will be confusions. Static htmls are just inaccessible.
Lukas Sägesser
@ScyDev
Apr 08 2016 16:28
@brianxcli was that answer to my question or to an earlier discussion?
Owen Hoskins
@owenhoskins
Apr 08 2016 19:00
Hey all. I've just checked out the meteor-one-three branch: is there any special considerations needed to get it running? I've got a bunch of errors in the console, starting with Uncaught Error: Cannot find module 'util'. I would love to jump on this band wagon asap :smile:
Owen Hoskins
@owenhoskins
Apr 08 2016 19:10
Could it be that some npm install commands are in order?
Aaron Judd
@aaronjudd
Apr 08 2016 20:36
@owenhoskins ok, so you’ll need this locally: https://github.com/kadirahq/meteor-dochead/pull/32/files
just clone / download this: https://github.com/ongoworks/meteor-dochead/tree/1.3-remove-browserify (into packages) (edited)
that branch is my fixes for dochead...
and you’ll need to run meteor npm install before running meteor/reaction the first time
still some testing & cleanup ahead, but it’s at a place where we can start collaborating on it
and some .jsx files are commented out, for @mikemurray to decide how to handle. Some external reaction packages will need to be switched to the meteor-one-three branches as well (reactioncommerce packages that aren’t included in the app/packages)
but as of this am, it’s working well, tests pass.
Aaron Judd
@aaronjudd
Apr 08 2016 21:00
actually looks like you don’t need my dochead package update.. just tested and is now working with the older kadira:dochead@1.4.0.
xiaoc li
@brianxcli
Apr 08 2016 21:49
@ScyDev Yes it was. I hope it answered you question some way?
Azmi Hayaza
@hayaza
Apr 08 2016 23:53
hi all. Are there any live sites running reaction ?