These are chat archives for reactioncommerce/reaction

3rd
Apr 2018
njbotkin
@njbotkin
Apr 03 2018 01:28
@willmoss1000 https://docs.reactioncommerce.com/reaction-docs/master/prerender seems like it should work.
When people say "SSR" they often mean different things. There's SSR where you just serve flat HTML to search engines, and there's SSR where you send flat HTML to real browsers, and later in the page load you "interactivize" the HTML, and it becomes your dynamic app. Those docs deal with the flat SSR, and the Reaction team is still working on interactive SSR. I made this (https://github.com/njbotkin/reaction-ssr-preview) to be a bit of a compromise.
Brent Hoover
@zenweasel
Apr 03 2018 01:33
The prerender integration is pretty simple since they do most/all of the work for you. All we do is add a flag to tell the pre-render engine that the page is done rendering
njbotkin
@njbotkin
Apr 03 2018 01:35
@lauragobrightly I'm not one of the Reaction devs, and I haven't researched this yet, so I don't know. KeystoneJS looks nice? If you guys settle on something, please come back and tell us what it was!
ngdangduy13
@ngdangduy13
Apr 03 2018 03:37
hello i want to ask a question about the flow of the checkout session ? I want to remove the 4th step in checkout session ? how can i do it
Brent Hoover
@zenweasel
Apr 03 2018 03:38
That’s covered in the documentation in the Customization Guide. Look at the workflow section. https://docs.reactioncommerce.com/reaction-docs/master/plugin-workflow-7
kathiresh
@kathiresh
Apr 03 2018 05:21
Hi All, Tags nav bar is not responsive if more than 15 tags are there., Is there a way to show 'More' in tags ?
Esteban Montes
@emontesg
Apr 03 2018 05:51
Can the users add products to the market ?
or only the admin ?
Brent Hoover
@zenweasel
Apr 03 2018 05:52
by “user” do you mean customers or marketplace admin?
Esteban Montes
@emontesg
Apr 03 2018 05:52
yes customers
Brent Hoover
@zenweasel
Apr 03 2018 05:53
No, customers can’t currently add products
Esteban Montes
@emontesg
Apr 03 2018 05:53
only the admin ?
Brent Hoover
@zenweasel
Apr 03 2018 05:53
Only users with the createProduct permission, which is by default, only admin
Esteban Montes
@emontesg
Apr 03 2018 05:54
ok but i can set this permision to any user ?
Brent Hoover
@zenweasel
Apr 03 2018 05:56
Yes, that should work. I think there is a default customer permission array somewhere that you could modify so that all customers get that permission
Esteban Montes
@emontesg
Apr 03 2018 05:57
ok thank yo u
Brent Hoover
@zenweasel
Apr 03 2018 05:59
:+1:
kathiresh
@kathiresh
Apr 03 2018 06:30
How can we use REST API's in reaction. Need to use reaction API's from REST to create a product/tag. Implemented simple:rest. but how can I pass 'req.body' to reaction?
Brent Hoover
@zenweasel
Apr 03 2018 06:32
I feel like that’s a question better posed to someone responsible for the simple:rest package
kathiresh
@kathiresh
Apr 03 2018 06:36
Thanks @zenweasel . How can we implement rest APIs in reaction with out simple:rest? Need to create a product/tag by using REST. Is there any options available?
Brent Hoover
@zenweasel
Apr 03 2018 06:37
Using simple:rest can’t you just call Methods?
Nithyanandakumar
@nithin-ideas2it
Apr 03 2018 07:00
@zenweasel , Thank you. I also looking for something like this.. Just to make a REST Call for methods. Let us check.
Nithyanandakumar
@nithin-ideas2it
Apr 03 2018 07:23

@zenweasel, Can't we call the methods from external server like simple REST?

Good to know about Meteor's http package. Our need is to just to make a simple rest call.

We need write our own logic to achieve this by implementing own API and need to call something like below?

JsonRoutes.add('post', '/create/tag', function (req, res) {
var tagName = req.body.tagName;
const newTagId = Meteor.call("shop/createTag", tagName, false);

Just want know the right Approach?

Brent Hoover
@zenweasel
Apr 03 2018 07:24
You can call the method via DDP. There are several DDP libraries out there
You could write your own REST => DDP bridge to map whatever external calls you wanted to Meteor calls
As I mentioned above, you can call methods using the simple:rest package above. But you can’t change those methods without modifying core code, so if you need to do something like grab request you need to do something else
The question is, why are you doing this?
Nithyanandakumar
@nithin-ideas2it
Apr 03 2018 07:37
reactioncommerce/reaction is with rocking features, But what need to do if we want to sync product from third party service? Please correct if i am wrong?
Brent Hoover
@zenweasel
Apr 03 2018 08:06
Yeah, agreed. I think that’s a valid use case if that product expects a REST API
KunalDE
@KunalDE
Apr 03 2018 08:25
We have added the products but it's not shown at Shop Tab.
Loan Laux
@loanlaux
Apr 03 2018 08:29
@KunalDE Are they published and set to "Visible"?
Brent Hoover
@zenweasel
Apr 03 2018 08:33
have you added the “Shop” tag to the product?
KunalDE
@KunalDE
Apr 03 2018 08:33
Yes, we have added.
Loan Laux
@loanlaux
Apr 03 2018 08:34
Can you post one of the products' JSON data, straight from the Products collection in MongoDB?
Loan Laux
@loanlaux
Apr 03 2018 08:40
I understand @KunalDE. But could you post an extract from your Products collection? It'll allow me to understand better why these products aren't showing up.
KunalDE
@KunalDE
Apr 03 2018 08:46
{
"_id" : "uqJ47zrJDC25SSZ8x",
"type" : "simple",
"ancestors" : [ ],
"shopId" : "J8Bhq3uTtdgwZx3rz",
"title" : "Elysee Oud by Arabian Oud",
"requiresShipping" : true,
"handle" : "uqJ47zrJDC25SSZ8x",
"isDeleted" : false,
"isVisible" : true,
"createdAt" : ISODate("2018-04-03T06:15:44.582Z"),
"updatedAt" : ISODate("2018-04-03T08:26:47.698Z"),
"workflow" : {
"status" : "new"
},
"description" : "Let yourself be charmed by the delicate fragrances of Arabian Oud Elysee Oud in Spray. A special fragrance that will introduce you to the scents that follow: Oriental, floral, musky, fruity, citrus, amber. We have succeeded in producing a sublime perfume made of Grapefruit, apple, lemon, musk, amber, flannel.",
"pageTitle" : "Oriental & Floral"
}
{
"_id" : "2ZpSeC5rWW74HbEnd",
"ancestors" : [
"uqJ47zrJDC25SSZ8x"
],
"price" : 252,
"type" : "variant",
"isVisible" : true,
"isDeleted" : false,
"inventoryManagement" : true,
"inventoryPolicy" : true,
"shopId" : "J8Bhq3uTtdgwZx3rz",
"taxable" : true,
"taxCode" : "00000",
"optionTitle" : "Untitled Option",
"workflow" : {
"status" : "new"
},
"title" : "Elysee Oud",
"weight" : 4,
"inventoryQuantity" : 10
}
{
"_id" : "o585qwkJ3q8vDY68e",
"type" : "simple",
"ancestors" : [ ],
"shopId" : "J8Bhq3uTtdgwZx3rz",
"title" : "Solid Black by Arabian Oud",
"requiresShipping" : true,
"handle" : "o585qwkJ3q8vDY68e",
"isDeleted" : false,
"isVisible" : true,
"createdAt" : ISODate("2018-04-03T06:19:10.370Z"),
"updatedAt" : ISODate("2018-04-03T08:27:16.550Z"),
"workflow" : {
"status" : "new"
},
"pageTitle" : "Solid Black",
"description" : "Add a flavor to your strong character with this unique perfume from Peach and Tangerine mixed with Roses magic and orange flower to finally base on Sandal, Musk and Vanilla. We express your personality with the strength and rigidity of the ingredients of this distinctive fragrance of the peach and mandarin layer mixed with the magic of roses and orange blossoms and their attractiveness. Finally based on a base of sandalwood, musk and vanilla adds to your personality a flavor of the flavors of power to be distinguished among the audience."
}
{
"_id" : "Z5gc4ssEdnhfomBhT",
"ancestors" : [
"o585qwkJ3q8vDY68e"
],
"price" : 260,
"type" : "variant",
"isVisible" : false,
"isDeleted" : false,
"inventoryManagement" : true,
"inventoryPolicy" : true,
"shopId" : "J8Bhq3uTtdgwZx3rz",
"taxable" : true,
"taxCode" : "00000",
"optionTitle" : "Untitled Option",
"workflow" : {
"status" : "new"
},
"title" : "Esprit de Parfum",
"weight" : 4,
"inventoryQuantity" : 10
}
{
"_id" : "yazF3NH8cYnS3vdHD",
"type" : "simple",
"ancestors" : [ ],
"shopId" : "J8Bhq3uTtdgwZx3rz",
"title" : "",
"requiresShipping" : true,
"handle" : "yazF3NH8cYnS3vdHD",
"isDeleted" : false,
"isVisible" : false,
"createdAt" : ISODate("2018-04-03T06:20:52.940Z"),
"updatedAt" : ISODate("2018-04-03T06:20:52.940Z"),
"workflow" : {
"status" : "new"
}
}
{
"_id" : "GMpQzdxPQmQ9x5Q6W",
"ancestors" : [
"yazF3NH8cYnS3vdHD"
],
"price" : 0,
"type" : "variant",
"isVisible" : false,
"isDeleted" : false,
"inventoryManagement" : true,
"inventoryPolicy" : true,
"shopId" : "J8Bhq3uTtdgwZx3rz",
"taxable" : true,
"taxCode" : "00000",
"optionTitle" : "Untitled Option",
"workflow" : {
"status" : "new"
}
}
{
"_id" : "NQNuqA7XvokhSdupJ",
"type" : "simple",
"ancestors" : [ ],
"shopId" : "J8Bhq3uTtdgwZx3rz",
"title" : "Ultimate by Arabian Oud",
"requiresShipping" : true,
"handle" : "NQNuqA7XvokhSdupJ",
"isDeleted" : false,
"isVisible" : true,
"createdAt" : ISODate("2018-04-03T06:31:45.421Z"),
"updatedAt" : ISODate("2018-04-03T08:28:38.103Z"),
"workflow" : {
"status" : "new"
},
"pageTitle" : "Esprit de Parfum",
"description" : "Perfume gives you the maximum luxury possible to delight your life moments with a wonderful layer of bergamot and black pepper with a mixture of orange and jasmine flower and a
Ya sure. The product collection is given below.
luxurious base of amber and lute reach you to the point of recovery."
}
{
"_id" : "HDBrRAZsNytoMXjmf",
"ancestors" : [
"NQNuqA7XvokhSdupJ"
],
"price" : 360,
"type" : "variant",
"isVisible" : true,
"isDeleted" : false,
"inventoryManagement" : true,
"inventoryPolicy" : true,
"shopId" : "J8Bhq3uTtdgwZx3rz",
"taxable" : true,
"taxCode" : "00000",
"optionTitle" : "Untitled Option",
"workflow" : {
"status" : "new"
},
"title" : "Arabian Oud",
"weight" : 4,
"inventoryQuantity" : 10
}
Harshal Yeole
@harshalyeole-tudip
Apr 03 2018 08:47

Hi,

I am using v1.8.0.

I need to add gotham-book font for the website. so I have included following code in imports/plugins/included/default-theme/client/styles/fonts.less file.

@font-face { font-family: "gotham-book"; src: url("/resources/fonts/GothamBook/GothamBook.eot"); src: local("☺"), url("/resources/fonts/GothamBook/GothamBook.eot#iefix") format("embedded-opentype"), url("/resources/fonts/GothamBook/GothamBook.woff2") format("woff2"), url("/resources/fonts/GothamBook/GothamBook.woff") format("woff"), url("/resources/fonts/GothamBook/GothamBook.ttf") format("truetype"), url("/resources/fonts/GothamBook/GothamBook.svg") format("svg"); font-weight: normal; font-style: normal; }

But when I run reaction this gives lots of errors on Mac OS like:

  • Placeholder goes invisible.
  • Cursor in the inputbox never appears.

What am I doing wrong here?

Any help will be much appriciaed.

Loan Laux
@loanlaux
Apr 03 2018 08:48
@KunalDE I'm not sure I see any tags set in there. Can you confirm?
KunalDE
@KunalDE
Apr 03 2018 08:51
This is from Products collection.
Brent Hoover
@zenweasel
Apr 03 2018 08:52
2018-04-03_16-51-48.png
You should see an entry like the above if it’s been correctly placed within a tag
Specifically there should be an entry in the hashtags field. Which should be an array
Loan Laux
@loanlaux
Apr 03 2018 08:53
@harshalyeole-tudip You shouldn't be modifying anything outside /imports/plugins/custom. I'd say try putting your @font-face snippets in your custom theme first. Then, see if there's any variable to override default fonts in a clean way. I know there's @headings-font-family, so I wouldn't be surprised if there was a more generic one as well.
Harshal Yeole
@harshalyeole-tudip
Apr 03 2018 08:54
@loanlaux
Ok, I will try that.
KunalDE
@KunalDE
Apr 03 2018 08:55
@zenweasel , you mean that there should be hashtags filed in the Products collection, to see the product at Shop.
Brent Hoover
@zenweasel
Apr 03 2018 08:55
@KunalDE Correct
Shop is a tag
Perhaps not the best-named tag….
KunalDE
@KunalDE
Apr 03 2018 08:57
@zenweasel , Ok but when we add the products from Admin Panel then add tags Shop then it should not inserted automatically in Products Collection.
William Moss
@willmoss1000
Apr 03 2018 08:57
@njbotkin cheers! Yes, I've seen that and set the tokens but no luck. Your plugin looks pretty sweet. For my understanding, how does it compare to https://github.com/artlimes/meteor-chrome-headless-spiderable/?
Brent Hoover
@zenweasel
Apr 03 2018 08:58
If you add a tag to a product, it is added to the hashtags array on the product
KunalDE
@KunalDE
Apr 03 2018 09:01
@zenweasel , Ok thank you. We will try it.
Brent Hoover
@zenweasel
Apr 03 2018 09:08
meteor/meteor#9726
Preliminary reports say “This really works"
in that “anything that makes a difference” file. Try at your own risk
Loan Laux
@loanlaux
Apr 03 2018 09:09
Interesting one
kathiresh
@kathiresh
Apr 03 2018 09:09
@zenweasel , Could you please suggest on the issue: Products created in one shop showing up in all shops #4092 reactioncommerce/reaction#4092
Brent Hoover
@zenweasel
Apr 03 2018 09:09
yeah, pretty much the cheapest performance upgrade
@kathiresh I don’t know what to tell you. It’s in the queue to get worked on and marked with an impact-major
kathiresh
@kathiresh
Apr 03 2018 09:18
Thank you @zenweasel . For now we are proceeding with the fix. Lets us wait for the update.
William Moss
@willmoss1000
Apr 03 2018 09:46
quick check - is archiving working for everyone? I seem unable to archive an item (not a new item as perreactioncommerce/reaction#3933) - it's staying on the product grid.
I'm also unable to restore previously archived items?
Harshal Yeole
@harshalyeole-tudip
Apr 03 2018 10:01

@harshalyeole-tudip You shouldn't be modifying anything outside /imports/plugins/custom. I'd say try putting your @font-face snippets in your custom theme first. Then, see if there's any variable to override default fonts in a clean way. I know there's @headings-font-family, so I wouldn't be surprised if there was a more generic one as well.

@loanlaux Tried adding the font-face in custom theme, still the issue persists.

Loan Laux
@loanlaux
Apr 03 2018 10:02
Could you send the rest of the CSS that's actually overriding the fonts @harshalyeole-tudip?
Harshal Yeole
@harshalyeole-tudip
Apr 03 2018 10:05

See, here's what happening,

The font can be applied to the website, they are visible on Mac OS as well,

but then comes the issues as well:

  • Placeholder goes invisible.
  • Cursor in the inputbox never appears.

To solve this, if I inspect element and change the font family, issues are gone.

Loan Laux
@loanlaux
Apr 03 2018 10:06
Could you please send the CSS that's doing the override?
Otherwise I'm afraid I can't do much about it.
Harshal Yeole
@harshalyeole-tudip
Apr 03 2018 10:07
ok sure
.accounts-signin-signup { font-family: gotham-book; display: inline-block !important; padding-top: 2px; }
.footer-email { background: transparent; border: none; font-family: gotham-book; font-size: 17px; width: 90%; margin-bottom: 0; &:focus{ outline: none; } }
Loan Laux
@loanlaux
Apr 03 2018 10:10
Have you checked if the font is effectively loaded? Is it under the /public directory?
Harshal Yeole
@harshalyeole-tudip
Apr 03 2018 10:10
yes, its under /resources/fonts/GothamBook/ directory
Loan Laux
@loanlaux
Apr 03 2018 10:11
You mean /public/resources/fonts/GothamBook/?
Harshal Yeole
@harshalyeole-tudip
Apr 03 2018 10:11
yes
Loan Laux
@loanlaux
Apr 03 2018 10:12
Can you dowload the woff/ttf files if you try to access the URL you're using in @font-face?
Harshal Yeole
@harshalyeole-tudip
Apr 03 2018 10:12
And i checked on the browser network tab,
I have downloaded them and store in the given path
Loan Laux
@loanlaux
Apr 03 2018 10:16
That's because your browser can work with just the woff files, so it doesn't need the rest
Honestly I have no idea what's going on, but it doesn't seem to be a Reaction-related issue
Harshal Yeole
@harshalyeole-tudip
Apr 03 2018 10:16
ok
Loan Laux
@loanlaux
Apr 03 2018 10:17
Good luck with that!
Harshal Yeole
@harshalyeole-tudip
Apr 03 2018 10:17
Ok thanks for youe time Loan. :)
Harshal Yeole
@harshalyeole-tudip
Apr 03 2018 10:45
@loanlaux
I tried adding another fonts (roboto) it worked without any issues, do you think there might be some issues with Gotham fonts?
Loan Laux
@loanlaux
Apr 03 2018 10:55
Most probably
Harshal Yeole
@harshalyeole-tudip
Apr 03 2018 11:24
ok
MWPAWAR
@MWPAWAR
Apr 03 2018 11:47
Hi,
Reaction.Router.pathFor is always loads the whole page right?
In my case, I created some Header/Footer which contains some links. But after clicking on them I just need to load the inner page not Header/Footer
Is there way I can achieve this?
dimos
@dimram
Apr 03 2018 13:11
Hi Guys
i am trying to install reaction without success on CENTOS 7
i am getting an error you cannot run it as root
and i have created a user and tried to run it again without success ..
njbotkin
@njbotkin
Apr 03 2018 15:02
@willmoss1000 hey, neat, I hadn't seen that. My plugin gently sidesteps the problem of spidering by only attempting to render pages that clients request. It'd be cool to try to integrate it with https://github.com/artlimes/reaction-commerce-caching-plugin, then you'd be on your way to a real caching solution.
@dimos permissions were a problem for me, too, but it was specifically MongoDB that was acting up. I was using a shared filesystem that it didn't like.
While it's not recommended, you can add --allow-superuser to your reaction command (just a thin layer over the meteor command) when running as root. Not a good long-term fix, but at least it may help in troubleshooting.
William Moss
@willmoss1000
Apr 03 2018 15:09
@njbotkin I see, so with your plugin the page is spiderable too, and google should be able to crawl it? (sorry for asking you to spell it out!)
njbotkin
@njbotkin
Apr 03 2018 15:11
@willmoss1000 should be, though I didn't intend it for that. The plugin should really check for user agent, and if it's a search engine only serve HTML.
William Moss
@willmoss1000
Apr 03 2018 15:13
@njbotkin ok great. Think I'll see if I can get the artlimes thing working, prerender isn't being very friendly. Will deffo see if I can get your plugin working at some-point and let you know. Should make the experience way nicer
Harshal Yeole
@harshalyeole-tudip
Apr 03 2018 15:46

Hi,

I am using reaction v1.8.0 of reaction and I ahve installed cutom plugin.

But there is some weird behaviour of header, that it is re-rendered on click of any category added using admin end.

According to normal websites, header should be fixed and only rendered once.

I have found that the header comes from NavBar component of path imports/plugins/core/ui-navbar/client/components/navbar.js

and this is registered in the custom plugin register.js file imports/plugins/custom/reaction-commerce/register.js

How can I fix this?

dimos
@dimram
Apr 03 2018 16:09
@njbotkin thanks for reply...
@njbotkin i have created a user and run meteor installation as non root user ... now i am getting this error
{ Error: Command failed: meteor --raw-logs
at checkExecSyncError (child_process.js:601:13)
at execSync (child_process.js:641:13)
at _callee$ (/usr/lib/node_modules/reaction-cli/dist/commands/run.js:72:43)
at tryCatch (/usr/lib/node_modules/reaction-cli/node_modules/regenerator-runtime/runtime.js:65:40)
@njbotkin i have tried also with --allow-superuser without success....
njbotkin
@njbotkin
Apr 03 2018 16:28
So. sudo reaction --allow-superuser gives you that?
Ishmael Nkosikhona Sibisi
@cyber-claws
Apr 03 2018 16:55
Hi guys, Can I ask, How does one get a EJSON of a file from an external source. .i.e. unlike Assets.getBinary(fileName); that gets the EJSON of your local asset file, I need something like getBinary(https://url.tofile)
Harshal Yeole
@harshalyeole-tudip
Apr 03 2018 17:24
Any help?
William Moss
@willmoss1000
Apr 03 2018 17:34
@harshalyeole-tudip I get that too. Re-rendering of the header all the time. Haven't had a chance to look into it though. You using the swag-shop plugin?
Lorenzo Campanis
@lcampanis
Apr 03 2018 17:40
@jshimko is the prequel build gone in 1.10? how is it replaced?
Harshal Yeole
@harshalyeole-tudip
Apr 03 2018 17:42
@willmoss1000 Yes
Lorenzo Campanis
@lcampanis
Apr 03 2018 17:43
So only a prod image is now built and deployed? Any replacement?
Harshal Yeole
@harshalyeole-tudip
Apr 03 2018 17:43
Yes in 1.10 this issue is gone... @willmoss1000 @lcampanis