Git sync/fetch remote branches

In: Git on 17.10.2014 by Dejan Jacimovic

To synchronise all remote branches with local version in git, all you need to do is run following commands: for remote in `git branch -r`; do git branch –track $remote; done git fetch –all git pull –all Thanks Wookie88 for answer on stackoverflow and TL;DR version.

Continue reading

Automatically log in Magento administrator to WordPress administration panel

In: Magento, PHP, WordPress on 06.10.2014 by Mladen Ilic

When integrating Magento and WordPress to work together, it is useful to integrate login as well. This way Magento administrators can log in just in one place and be automatically logged in WordPress as well. Probably the best way to check if administrator is logged in is in WordPress. To check if Magento administrator is […]

Continue reading

Prevent access for users which are not logged in WordPress

In: PHP, WordPress on 22.09.2014 by Dejan Jacimovic

We all have our small and big WordPress projects. Sometimes we want to allow our clients to see what has been done so far, but we don’t want anybody else to see it. The easiest way to define this is: prevent access for users which are not logged in WordPress administration. Sure – you can […]

Continue reading

Remove Magento pricing for options in dropdown on both simple and configurable products

In: JavaScript, Magento, PHP on 22.09.2014 by Mladen Ilic

Sometimes we and/or our customers want to remove price changes from product options and have them display only on change on our price label in Magento. For configurable products, prices are added to label from js module Product.Config. To remove them, we have to rewrite module’s function getOptionLabel. We need a new javascript file, inside js folder, […]

Continue reading

Git ignore local changes and pull from remote

In: Git on 15.08.2014 by Dejan Jacimovic

Sometimes you just want to ignore changes you made locally and have the same situation you have on your git remote server. It is a simple thing to do, but don’t forget you will delete all the changes you have made locally before running this command.

Continue reading

Show post number instead of a date in WordPress

In: WordPress on 11.08.2014 by Dejan Jacimovic

It is not usual to show the number of the published post, however, it is not necessarily a bad thing. Sometimes, we just don’t publish on daily or weekly basis and this “published” date might make our posts look outdated. Therefore, we can build a simple procedure which will tell us how many of this […]

Continue reading

Separate first and last name in Excel

In: Excel on 02.08.2014 by Dejan Jacimovic

Assuming that we have column A containing first and last name with a potential middle name, we can assume that taking first name can be conducted by getting the value from beginning until first space.

Continue reading

Magento list random products

In: Magento on 14.05.2014 by Dejan Jacimovic

We often need to list randomly chosen products on our Magento store. Lucky for us, Magento has provided this functionality, and this is easy to achieve from CMS block or CMS page. All we need to do is choose a category from which we’d like to list our products, and use following snippet in that […]

Continue reading
Page 1 of 2112345...1020...Last »