Every day I get new ideas but unfortunately there is the time factor and my personal goals that don’t allow me to complete everything I want. At the beginning of this week I got interesting email from Ronald about something that was in my head since I’ve created Magento extension for custom cart validations. So this time I said to myself “Now is the moment!”:
I read your article on custom cart validation in Magento on http://www.sessiondigital.de/blog/magento-create-custom-cart-validation-rules-developers-module/ and I have a question.
I have been breaking my head over a way to enable Magento to sell products in multiples of X, but with any product combination possible. An example would be wine bottles. Any combination of wine bottles is possible, but checkout is only possible if the total quantity is a multiple of 6. If that rule is not validated, a message for the customer is displayed and checkout is disabled.
Would your method be the way to go here, and if so, can you point me in the right direction? Do you have a working example?
Your help is much appreciated.
Continue reading “Magento: Allow checkout if cart quantity multiplies in predefined number”
During last 2 weeks I worked a lot with bundle products. My task was to get the maximal and minimal prices of bundle product. I used those prices in order to create meta data for schema.org – AggregateOffer. I had to find a way how to get the maximal and minimal price of bundle product. Below you will find a snippet that provides a solution. The snippet was taken from “app/design/frontend/base/default/template/bundle/catalog/product/price.phtml” in Magento CE 1.9 .
* @var $_priceModel Mage_Bundle_Model_Product_Price
$_priceModel = $_product->getPriceModel();
list($_minimalPriceTax, $_maximalPriceTax) = $_priceModel->getTotalPrices($_product, null, null, false);
list($_minimalPriceInclTax, $_maximalPriceInclTax) = $_priceModel->getTotalPrices($_product, null, true, false);
// Debug info
Last few weeks me and my team had to install around 10 third party Magento extensions. We have our own local setup and development workflow, but one of the key elements is MODMAN. All extensions (ours and the third party extensions) are linked in Magento by modman. With our current setup and the situation with the number of the new third party extensions we were forced to create modman files for all new extensions. We had to create manually the definitions in the modman files in order to define how the extensions files should be linked in Magento. There was no room for mistakes, but during the process we started experiencing problems, because of the human factor. From time to time we were missing to write modman definitions for some template, layout and css files.
I spotted the need that we need reliable and automated tool, which allows us to create modman files without missing any definitions. At the beginning I was thinking to write my own shell scrip, but as I didn’t want to reinvent the wheel I decided to use my professional network and to ask the Magento community (thanks to one of my first mentors Stefan Stefanov for always reminding me to search for existing concepts / tools / frameworks rather than reinventing the wheel). I asked for help in twitter. The first minute I published my tweet I got answers from Magento community members.
Continue reading “Magento: Generate modman files”
Today I worked on task that required the region filed to be removed from all Magento address forms. I found some Magento modules that were doing the trick, but I also wanted to delve a bit more deeper and to see if I can do this by configuration from Magento admin. Luckily in the most recent version of the platform ( Magento CE 1.9 ) this is possible.
By some simple actions in the Magento admin you will be able to exclude the region field from:
- Customer add / edit address form
- Customer register form
- Billing and Shipping address form on the checkout page
Below I am going to show 2 different solutions how to hide the region filed. The first is more suitable for Magento admins / store owners and the second is something that the developers can use in their data upgrade scripts.
For the both example below I assume that we have to remove the region if the country is Germany.
Continue reading “Magento: Remove the region from address form”
Not long ago, my team and I had to change our local Magento development environment to something new and experimental. We changed our local setup so right now we run Magento with docker. So far it’s still experimental and we change the Docker setup quite often. This means that we destroy and recreate the local environment quite often. One of the side effects is that we frequently destroy all sessions, and as a side effect, we get logged out from the Magento admin area a lot.
Furthermore, we are running Magento 188.8.131.52 and this version comes with a built-in protection to save the Magento admin credentials in the browser. Basically, by removing the protection we were able to save the login credentials and to login much faster. I decided to save some clicks and I created a simple Magento extension that automatically logs in developers when they try to reach the admin area. Basically, I wrapped in the extension code for the admin auto login that can be found on the Internet, but I polished the code up a bit and added some configuration settings.
You can download CeckosLab_AutoLogin by cloning it from GitHub or installing it with Modman.
Continue reading “Magento: Admin auto login extension”
About 2 months ago I decided to do something unusual for me and to leave my comfort zone. As I’ve mentioned in some of the previous posts, I’ve started a self-improvement journey, and one of my goals is to improve my relationships with women. I’ve read some books about dating and raising my self-esteem, and what I really liked in those books was the idea not to do any “black magic” (a.k.a. try to trick the girls, operate from false confidence or just lie to get laid). The message in the books was to become a better person in order to get better relationships with the family, friends, co-workers and love partners. Another message was to be more conscious, to be self-aware, to operate from true confidence, to draw strong personal and professional boundaries, to not try to manipulate and to not accept manipulation.
So what was this wired introduction I began my thoughts with? Well, I’ve decided to try and approach constantly women that I like. The idea was not to approach any women that I meet, but to do it with women I really desire. The point of this whole story was to test and overcome my approaching anxiety. As a side effect of this experiment I could find a partner, so I really had the mindset to see if things would work out, then develop a relationship. I also wanted to do this experiment in a decent way, so if I got a date, then stop the experiment (call me a serial dater).
But where did I get this idea from? I’ve read Mark Manson’s book, – Models: Attract Women Through Honesty. In his book, Mark suggests some really cool things that match my values. One thing he writes is if you want to have an amazing and honest partner, then become an amazing and honest person yourself. He shares that he had a serious approach anxiety and he suggests to try and do the experiment of approaching women by doing “baby steps” in order to get comfortable with the anxiety. For example, one day say “hello” to an unknown woman, another day try to have a conversation with an unknown woman, go to a club and talk to women (if things develop well, then go on a date) and etc.
Continue reading “Dating: Getting more comfortable with the rejection”
Today, while I was browsing YouTube, I accidentally stumbled upon a video from April 2012. The video was from a hackathon organised by Osijek Software City and the main character was me. I had completely forgotten about the great time that I had back in 2012 and watching this video again made my day.
Also, I mustn’t forget to say “thanks” to my friends from Inchoo who invited me to attend this event. I remember that the trip from Bulgaria to Osijek was long and I felt very tired, but it was definitely worthy. I met new people at the hackathon and I had some great personal and technical conversations. As a matter of fact, I met my friend Vedran Subotic at this event who, two years after “opened the door” for my moving to München, Germany.
On the hackathon I had to work alone because most of the attendees had teams and the attendees who were alone were too far from my professional expertise. I wanted to do something with Magento but the potential team members were good at C#.
Continue reading “From the archives: Osijek Software City hackathon – April 2012”
Almost every Wednesday I visit an event organized by the Facebook group – Munich – International friends. The event is called “The round table” and the main goal is to meet and socialize with new people. Most of the people on this event are foreigners and the common language is English, so it’s really good for non German speakers.
Before 3 weeks I went to the event after work and I wasn’t in mood to communicate and to socialize, because I had busy work day. For my good I met one of the most active group members, who was offering decks with special cards. The cards actually were free passes or free drink vouchers for different night clubs in München. You can check this website for more information – http://www.muenchenontherocks.de Initially I didn’t welcome the idea and even didn’t want to look at the cards, but later I change my mind. I got the idea to get one deck and later (when I am bored), from time to time to pull a card and to visit a club, which I would visit for first time.
Continue reading “An idea how to discover the nightlife of München”
In the last 3 weeks I was dating Sara – a very cute girl from the UK. I really liked her physically and I think that there was a good personality behind the “mask”. I was really optimistic that the dating could develop into a relationship but unfortunately she had her own preferences and a couple of days ago she decided to stop dating me.
This story provoked me to make some conclusions and to check how I was dealing with rejection. Of course when I got rejected I didn’t feel good, as a matter of fact I had this “bitter taste” mood for 2-3 days. But I am actually really happy how I handled this rejection because “My Old Self” would have felt the bitter taste for weeks. I also got the offer “let’s just be friends”, but this time I was different… sorry ladies, but I don’t want to lurk around you and watch other guys approach you and you flirt/date them. I prefer to focus my energy somewhere else and not be a part of the “HAREM”. Been there, done that!
Continue reading “Dating: No means No, so step back – an excerpt of rejection texting ping-pong”
Before 2 years ago I experienced my “enough moment”, epiphany relationship, “wake up call” … you name it. This was the boiling point for me and I have hit the emotional bottom. This story provoked me to take the path of the self-improvement. I closed myself in my shell for about an year and made an audit of my relationships, attitude, behaviour, goals, dreams and etc. I got more connected with myself. I also reviewed my past mistakes and was thinking about the situations when somebody was hurt by me. I’ve hit the books and the blogs for self-improvement as well.
I managed to rise my self-esteem and this contributed for my personal and professional development. I also started to do more healthy choices on the “dating market”. I read a lot about emotional unavailability, people pleasing, “Nice Guy” syndrome and etc, so after a while I started to notice some things and to cut off on time if the potential partner was not “healthy”.
Continue reading “Self-improvement: It’s totally ok NOT to chase recently separated / in breakup folks”