Articles for get

Tweet There is an easy way to get current domain name in Zend Framework. To get domain name in Zend Framework – use following snippet in your view file. echo $this->serverUrl();

Tweet When creating a Magento theme, one has to worry about all aspects. Some of the most important things when creating a theme is personalization. In order to personalize your website for a current user, you can do various things, but most important one is knowing your clients name. So, in order to get customer [...]

Tweet Before reading this article it is advised to read “How to run Magento in WordPress“, as it could help you overcome some basic problems that might emerge. This snippet shows you how to get Magento categories and show them in WordPress so you can use them as a menu. Copy following snippet into your [...]

Tweet If you are using a Magento and you want to know what is the current category in order to show it to your user, you can do it by using following snippet. 1 2 3 4 5 6 //if there is no current category return if(!Mage::registry(’current_category’)) return;   //if current category is defined $magentoCurrentCategory [...]

Tweet It could be useful to get current page URL and current page title. Especially if we want to make sharing plugin for our website. Often, we need that information in order to pass them as a parameter to sharing services like Twitter, Delicious, Facebook, etc… So, in order to get these information, you can [...]

Tweet Sometimes there is a need to get posts outside of WordPress. In order to get latest couple of posts and present them as news outside of WP, I have written a function that might be useful. This function has two parameters. First one is database connection, and second is optional array of parameters used [...]

PHP get current URL

In: PHP

30 Jul 2010

Tweet Very often you need to know exact URL of your current page. To get URL of current page, you should just implement following function and apply it, as shown in example below. 1 2 3 4 5 6 function get_URL() { $s = empty($_SERVER["HTTPS"]) ? ” : ($_SERVER["HTTPS"] == "on") ? "s" : ""; [...]

Make Magento Checkout Awesome