These are chat archives for reactioncommerce/reaction

1st
Apr 2015
Aaron Judd
@aaronjudd
Apr 01 2015 06:33
@boboci9 @spencern re: less, install errors a few days ago, see: Nemo64/meteor-bootstrap#42
@boboci9 committed update for the disabled registry entries.
Bogi
@boboci9
Apr 01 2015 09:06
thanks @aaronjudd I will take a look
Bogi
@boboci9
Apr 01 2015 12:05
This message was deleted
Bogi
@boboci9
Apr 01 2015 12:11

there is one small issue :( if you add this to the registry:

    {
        template: 'flatRateCheckoutShipping',
        provides: 'shippingMethod',
        enabled: false
    }

the enabled false is not saved in the db

only this get's saved
{
        template: 'flatRateCheckoutShipping',
        provides: 'shippingMethod'
}
Bogi
@boboci9
Apr 01 2015 13:29
Even when I force add this enabled false it won't overwrite the existing flatRateCheckoutShipping, do you have any ideas?
Aaron Judd
@aaronjudd
Apr 01 2015 14:43

@boboci9 you mean that when you try to change the status from code, it's not working? I'm guessing it needs to be added to the schema, or the codebase will reject the update (I was just testing by manually adding to the db).

  'registry.$.enabled':
    type: Boolean
    optional: true

add to packages.coffee schema declaration

if that works correctly for you, I'll commit that. Also you shouldn't need to have two "flatRateCheckoutShipping", your new shipping method template can be anything you want.. leaving one disabled, and your custom one enabled
Aaron Judd
@aaronjudd
Apr 01 2015 15:01
you can always write directly to the db, bypassing the schema, with the syntax collection._collection.update (just a useful thing to know)
Bogi
@boboci9
Apr 01 2015 16:32
@aaronjudd the schema changes will allow the correct insert so that is good, but I'm not sure how I should safely disable the "flatRateCheckoutShipping" that is coming directly with the reaction-shipping package, I'm not sure what you meant
Aaron Judd
@aaronjudd
Apr 01 2015 17:12
I just meant that "enabled: false" + use a unique template name "multiVendorCheckoutShipping" and you should be good
You could of course, disable the 'reaction-shipping" package if you aren't going to use it all
Bogi
@boboci9
Apr 01 2015 17:14
I just wanted to disable the flatRateCheckoutShipping from the reaction-shipping
the rest of the package could remain, not sure if it would break down anything if I would get rid of it entirely
but I'm pretty sure I will have to update the collection._collection.update directly in this case to disable tha shipping method from the reaction-shipping
Aaron Judd
@aaronjudd
Apr 01 2015 17:17
I'd keep reaction-shipping as I'm planning on adding more functionality to it over the next release that should generally be useful. so anyways, yes - just enabled: false should be what you need. Is that not working the way you expect now?
Bogi
@boboci9
Apr 01 2015 17:17
let me try it this way too
Aaron Judd
@aaronjudd
Apr 01 2015 17:21
you can pull the schema update now, so no need to use the bypass
Bogi
@boboci9
Apr 01 2015 17:27
ok thanks

I used

ReactionCore.Collections.Packages._collection.update({name:"reaction-shipping", 'registry.provides': 'shippingMethod'},{$set: {'registry.$.enabled':false}});

and it's working with it so thank you

Aaron Judd
@aaronjudd
Apr 01 2015 18:04
:+1:
Bogi
@boboci9
Apr 01 2015 18:05
During the work with the Accounts have you encountered any issues with inserting account with profile object?
Aaron Judd
@aaronjudd
Apr 01 2015 18:05
yes, I’m seeing a few issue - going to tackle this today
not specifically insert account - but that would most likely be some schema error that’s getting suppressed
Bogi
@boboci9
Apr 01 2015 18:06
I've been having this issue, if my account object doesn't have an account.profile the insert works fine, otherwise everuthing seems to stop with an insert
the schema in teh reaction core contains the profile
profile:
    type: Object
    optional: true
  'profile.addressBook':
    type: [ReactionCore.Schemas.Address]
    optional: true
and my insert goes messing up everything even if I have account.profile={}
I get RangeError: Maximum call stack size exceeded
if I add delete account.profile before the insert everything works fine
Bogi
@boboci9
Apr 01 2015 18:11
I've been having this issue for several days now, but can't seem to find a good workaround for it
Aaron Judd
@aaronjudd
Apr 01 2015 18:12
if you want to add your insert code into a GH issue, I’ll test as I go through it today -> sounds like maybe profile is getting created when it shouldn’t, and then you’d need an update and addToSet, rather than insert / set
Bogi
@boboci9
Apr 01 2015 18:14
I am using this for the multi-vendor setup adding an account for every shop that the users buys products from at checkout so I check if there is no account for this user and shop I only then insert otherwise I update the existing account
I will start an issue and put my code there, maybe it helps
Aaron Judd
@aaronjudd
Apr 01 2015 18:19
I have been on the fence a bit on this… we could make shopId an array [shopid], and take care of multi-accounts that way.. but have been leaning towards something like what you are attempting, only because it might be a weird user experience, and an unknow requirement of data isolation between shops.
Bogi
@boboci9
Apr 01 2015 18:21
I have added in an issue a suggestion to make the shopId an array because I am getting the follwoing issue:
I have a user buying products from multiple shops -> if I create an account for each shop the user will have several different profile info stored,then if the user wants to edit his account I don't know what profile data to show and edit
Aaron Judd
@aaronjudd
Apr 01 2015 18:21
or just not even use shopId in accounts.. I guess it all comes down to “ one account per shop “ vs “ one account to rule them all"
Bogi
@boboci9
Apr 01 2015 18:23
but we would still need some shopId to see where did the user shop from, or we should take this info from the orders if needed? not sure?
Aaron Judd
@aaronjudd
Apr 01 2015 18:23
well, that’s all in the orders, and the items also have a shopId
so you know what shop they checked out on, and also where the products came from
Everest Liu
@evliu
Apr 01 2015 18:24
i’d agree with aaron, it would be good to not have repeated information that can be derived, have a singular point of truth so inconsistencies don’t arise. that could introduce new bugs
Bogi
@boboci9
Apr 01 2015 18:24
yes you know that but it would be a nasty query to get the customers of a shop, maybe it would be better with a shopId array in the accounts?
yes I'm all about getting rid of inconsistent data that's why I suggested the shopId array in #354 but I'm not sure that we should take it out completely
we would totally ignore the ideas you had regarding the initial customers collection
Everest Liu
@evliu
Apr 01 2015 18:32
very true as well
Aaron Judd
@aaronjudd
Apr 01 2015 19:00
well I started to reply to this, but now am writing a detailed doc on it, I'll post when I've completed the entire thought and when I've re-read all the previous discussions. there's a few scenarios that need to be accounted for (marketplace, independant tld, sub-domain shops) , so I'll try to get a more holistic overview
Jacob Gadikian
@faddat
Apr 01 2015 19:10
All of the permutations of sub shops
is a difficult thing indeed. I’ve tried to imagine the right way to structure many small shops affiliated with a larger one. haven’t been conclusive about how to do it yet though— and not really just a “reaction” issue but instead— how can you do it while creatign little or no confusion and much sales? :)
Bogi
@boboci9
Apr 01 2015 20:54
an other idea would also be to have the buyers array in the Shops collection ( a list of account arrays that have bought from the shop much like members) and we could get seller statistics more easily
Everest Liu
@evliu
Apr 01 2015 21:26
Spencer Norman
@spencern
Apr 01 2015 21:26
April fools?
Everest Liu
@evliu
Apr 01 2015 21:27
is it?
nice
Spencer Norman
@spencern
Apr 01 2015 21:27
not sure, I would guess yes based on the original source and the day, but I'm not sure
I'd imagine that meteor.com would probably cover something of that magnitude
Everest Liu
@evliu
Apr 01 2015 21:28
haha, very true, but josh owens does a lot in the meteor world too, but yes, it definitely was not on the meteor site
Spencer Norman
@spencern
Apr 01 2015 21:28
hah, click the link at the bottom (coverage on tech crunch)
would have been better if it linked here: TechCrunch Article
Everest Liu
@evliu
Apr 01 2015 21:29
haha, that’s huge
Spencer Norman
@spencern
Apr 01 2015 21:29
woah, that's a big embed
lol
Everest Liu
@evliu
Apr 01 2015 21:29
but serious, that would have been such a funnier link
Spencer Norman
@spencern
Apr 01 2015 21:30
"Note: No one quoted above was actually reached for comment."
Everest Liu
@evliu
Apr 01 2015 21:31
lol
now rick has taken over my gitter screen
Spencer Norman
@spencern
Apr 01 2015 21:31
sorry
Everest Liu
@evliu
Apr 01 2015 21:31
haha, five monitor set up at work here, thus gitter sometimes gets its own
Spencer Norman
@spencern
Apr 01 2015 22:30
Anyone running current dev versions of reaction with Meteor 1.1?
Aaron Judd
@aaronjudd
Apr 01 2015 22:32
@spencern yes
Spencer Norman
@spencern
Apr 01 2015 22:33
ok, updating now. I've already updated the custom.bootstrap.import.less, so hopefully smooth
Everest Liu
@evliu
Apr 01 2015 22:37
how did you update it? isn’t it generated?
nvm, that’s the other custom file
yea, i just added some random values for the two variables
Spencer Norman
@spencern
Apr 01 2015 22:38
yeah, I followed @aaronjudd's pointer to Nemo64/meteor-bootstrap#42 to update it
Everest Liu
@evliu
Apr 01 2015 22:40
oh yea, i was looking for that but couldn’t find it
did you just delete custom.bootstrap.import.less or did you add the variables in?
Spencer Norman
@spencern
Apr 01 2015 22:42
I just added the variables in
just went line-by-line from that screenshot
Everest Liu
@evliu
Apr 01 2015 22:47
👍