I felt like I didn't stop running at all all weekend long. This was even with taking Friday off from work to do work around the house and try to get caught up with everything. I guess I just stress too much when it comes to actually hosting a party, but I pretty much had to detail clean my house. I was also attempting to bake a vegan cake for the first time ever and that so that was a big project for me, getting all the stuff I needed to make the cake.
Oh, I guess it goes to mention if you're reading this and not my friend on facebook that it was my birthday this past Saturday. I had a party with a theme, which is kind of unusual for me. I don't really do parties at all, I'm bad enough going to a party and trying to be sociable with people let alone trying to host something.
It's stressed me out to the point in the past where hosting a party has sent me to the bathroom dry heaving in a panic attack and puking blood into the toilet. Not pretty. But it's something you're supposed to do if you have a birthday is have a party and have people over and be social and happy and so I had a party. It was pretty fun, I didn't get too stressed out and only managed to embarrass myself a little bit. My sister came in and I was going around and introducing everyone and came to E and couldn't remember her name, and I really should remember her name we went on a couple of dates but that's the way my brain works and of course it let me down. I can remember a lot of stuff but recall is always shoddy and actual names for actual things like people are always fleeting and it always takes me time to come up with things and if I have to go around a crowded room and come up with names for everyone then recite them I will eventually fail on one of the names. I hate myself so much sometimes, it sucks to be broken like this and know that I'll never be fixed. I'm learning to live with it and deal with it but it still tears me up sometimes.
Anyway, the theme of the party was reflective crafting - I spent 123 dollars on reflective gear from Seattle Fabrics. People brought their riding gear and their needles and thread and put reflective accents on everything. It was a lot of fun. I was kind of bummed that I didn't get the chance to use the sewing machine that Snak Shack brought. I really wanted to do piping on the insides of my jeans so that it would show up once I had them double cuffed but started in on my bag first. By the time I finished with the bag and the machine was free he was already on the way out. I still have a lot of reflective gear left over so I think that I might be throwing another one of these soon. MacGyver has an industrial strength sewing machine and has volunteered to bring it to another night later in the month, so there's a good incentive to have another one.
After the party I headed to Pizza Luce to have dinner with my sister. It was OK, my first experience with gluten free anything. I didn't really like it all that much, I feel for her having to live without wheat. After that was another friend's birthday party to meet up with someone who couldn't make it to my party but who had a present for me. And after that it was off to another friend's house for a fire in the backyard and then an attempt at playing pool on a playstation 3 with a motion capture device. A pretty full birthday.
The next day was my brother and my sister-in-law's baby shower. Which meant that I had to get a present because I'm always bad at getting presents on time and put it off until the last minute. I have no idea what to get for baby stuff so I ended up copping out and getting a gift card where they were registered rather than trying to pick anything out. I'm such a horrible uncle. But the whole day was rushing again, I woke up and made chai first thing because I had to have it for the meeting later on in the day. After making chai I went in search of the baby stuff store Pacifier, then finally let myself break for breakfast once I knew for sure that I'd gotten something for the baby shower.
I went by the Wienery for lunch and made sure to tweet about it as I was waiting for my Land Phil to be be made. I've realized that I kind of neglect twitter because I just don't use it that often. I need more information from my posts to know if I want to click a link or not. But I know that part of having a full social media online presence is actually using the different tools and all I do for what they are meant for. So my new years resolution was to use twitter more, so far I'm doing pretty good at it.
After lunch was the baby shower, which was a lot of fun. I got to see several people that I don't see very often which was nice, and my friend Reverb gave me a nice card for my birthday. I had to leave pretty much right as they were starting to open the presents which was fine by me because my present was so craptacular. I had to get home and actually bottle the chai and try to get centered before my next meeting.
So it was back home to bottle the chai, then I chilled for a bit, then off to the MInnehaha Free Space for the Icarus Project meeting. That was really nice, too.
I think I'm going to be going back next week. It's kind of part therapy group part organizing meeting for mental health advocacy and outreach, which I like a lot. I don't know how actually being in therapy will go for me, it's something they've suggested to me often in my treatment for bipolar, that I should look at getting counselling of some sort for the depression. I've kind of shrugged it off for a variety of reasons, but a big part of that is that I don't feel like going to someone with the whole reason I'm there is therapy. I just can't see myself going to a single person and talking actually doing anything. Group therapy seems like it would be better, but I wonder if it will be kind of the same way that group treatment was for me. Basically all that did was show me how small my own problems were compared to other peoples, which made my own problems then easier to deal with. I mean, really, what do I have to be depressed about, right? So learning some coping mechanisms and getting some perspective will be good. I like the idea that they do outreach and advocacy, too, I'm hoping to get involved in some of that, too.
And after that it was just nothing - I ended up just heading home and watching media all night.
Back at work today it was more work on our first real heavy project with eCommerce. We're working on an integration with a point of sale system for a local boutique store. The store carries all sorts of things, and they have a really specific design that calls for a carousel of products on the category and product pages at the bottom of each page that shows related products. In theory concrete 5 eCommerce would be great, it's got a flexible system for attributes that allows us to have a really wide variety of products and present them in a nice graphical system.
The devil turns out to be in the details. They need to integrate with the point of sale system to update their inventories - many items are luxury items and there may only be 2 or 3 in stock at a time and the inventory changes daily. So they want to by syncing up the inventory counts 3 or 4 times a day.
Turns out that's not how the import add on is supposed to be used. What happens when you import the products is that it will delete and re-add any attribute on each product. So the product data and id stays the same but it's attribute ids and attribute value ids all get deleted and recreated. This really wouldn't be a big deal, at least you wouldn't think it's a big deal. I mean, what's the problem if you have all the correct size options and color choices added as attributes and people can choose the ones they want to order then you have a working eCommerce system, right?
The answer is no, you can't do that with eCommerce for concrete 5. The problem comes in the reporting. The reports for your orders are also keyed on that attribute value and needed for order completion. Yet when you import new data and product inventory counts you delete the keys from the database and no longer have any information.
I filed support tickets and the response was basically 'yeah, it won't do that' which is not what we need 2 months into the project. We've been waiting for months on getting proper data out of the point of sale system, and now that we have that we were finding that the entire platform that we were building it on might not be workable. We could maybe change the reporting system to be logs of emails sent so you could read the inventory numbers from there but this seemed unworkable too. It's not a whole lot of time to recode it on another platform but it would be pretty shitty to redo everything at this point in the game because we find out that the platform doesn't support what we need for it to be doing.
So what could I do?
The first thing was that I figured out how to update the product attributes instead of deleting and re-adding them, and then gave that code back to the developer so that he could incorporate it in his add on. But then the customer pointed out that options were showing up that had zero quantity for sale, and wanted these options removed from the list of available options. I tried simply removing them, but again, you lose the index so it was the same problem with reporting.
The answer was pretty clear after a little thinking - extend the select product attribute a little bit. Concrete 5 does offer a very flexible attribute system for keeping track of extra data, and this is exactly the case where a custom attribute type makes the most sense. It wasn't even really that much of a change, really.
The select attribute in concrete 5 is made up of really 3 key parts. There is the attribute itself that displays the form, then there is a list object that lists off options, and then there are option objects. What I need to do is add a simple boolean field for status - on or off. Does this option currently display or not?
So the first part of changing it was to make my own copy of the select attribute and start copying and pasting new database table names in, then changing a few function names and adding a few new functions in the right places and wiff bang boom in a day's worth of programming I had my very own select attribute type that also honors the status of each option, and an import script that verifies the status of each individual option.
From here it's not honestly that far of a step to conceptualize how the core commerce product model could be extended to get inventory counts from a product option and you could have true multi-inventory for concrete 5 eCommerce. But I'm not going to be the guy to program that, I'm way too small time of a programmer to attempt anything crazy like a re-write of eCommerce. I'm just saying if you wanted to do product multi-inventory right, this is how you would want to do it.
I wonder how you could actually get cross-indexed multi-inventory working, that would be really interesting to do with concrete 5's attribute sytsem. You'd have to figure out some way of making a table that joins the two indexes. I don't know... Maybe you'd always be limited to only having single-level attribute/stock qty relationships. I'm sure someone could figure it out. That someone is not me.
Me, I felt pretty good for getting what I did accomplished. It was really tricky to get the product option import working. For some reason the select attribute is built so that at one point in it's saving of the attribute it has to pull in the values from the post array. So I have to fake the whole post array of the select attribute's type form options area in order to make sure that the proper options are saved. I now know way too much about how the select attribute works - it had been a little bit of voodoo sometimes trying to work with it before but now I feel like I really have a pretty good handle on it.
And I have a pretty good handle on csv import of a product database to a live inventory concrete 5 ecommerce installation. That seems like a good skill to have.
Of course it can't just all work, and when I finally went to test everything tonight after working all day on it another error started coming up. The client had tried to define a discount that is a percentage off the order, but left it disabled. When you go to check out on the very first page of the checkout process there are two errors listed, both saying invalid discount. I stepped through it with the debugger and can't figure out why it's throwing the error, I also checked our slightly modified version of eCommerce against the source in meld diff viewer and didn't see any changes that could be related to discounts - I didn't touch anything there or anything in the checkout process. My boss was going to look at it in the morning tomorrow and let me know if anything jumps out to him, hopefully he sees what I can't.
Now that that's done I can get back to the new theme that I was chomping at the bit to get last week. Isn't that always the way? Sitting around waiting for work and then the instant that you get the work some fire starts up with a completely unrelated project that was working just fine that has to be put out right away. They are chomping at the bit to go live with the new site and the product import so it was top priority both Thursday and today. I'm a little nervous to see it actually go live, I hope everything goes smoothly.