<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>PHPOnlineSupport - Recent questions and answers in Magento</title>
<link>http://phponlinesupport.com/qa/ecommerce/magento</link>
<description>Powered by Portrave Solutions Pvt. Ltd.</description>
<item>
<title>Answered: Js broken in Backend Magento 2.2.2</title>
<link>http://phponlinesupport.com/273/js-broken-in-backend-magento-2-2-2?show=274#a274</link>
<description>You go to database of M2 site, run this SQL command:&lt;br /&gt;
SELECT * FROM `core_config_data` WHERE `path` LIKE '%dev%'&lt;br /&gt;
Change 'dev/js/merge_files' to '0'&lt;br /&gt;
Then run deploy theme command with SSH to see if it works?</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/273/js-broken-in-backend-magento-2-2-2?show=274#a274</guid>
<pubDate>Wed, 31 Jan 2018 04:58:11 +0000</pubDate>
</item>
<item>
<title>How to Add Customer Attribute in Magento?</title>
<link>http://phponlinesupport.com/260/how-to-add-customer-attribute-in-magento</link>
<description>


&lt;p&gt;This is the question I am frequently asked. How to add custom attributes in Magento registration &amp;amp; accounts pages?&amp;nbsp;&lt;/p&gt;

&lt;p&gt;Sometimes Magento store owners want to add extra fields to registration page to collect extra information to better understand their customer's needs. For example, they may need their birth date, email address, their website address, image or files. There are many extensions available that allow you to add Magento custom registration fields. The one I recommend is from FME extension who are the industry leaders in Magento. Magento customer attributes extension by FME empowers you to add 11 different field types and validate their input. You can make some of the fields optional and mandatory and sort their positions.&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For full features, see:&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://marketplace.magento.com/fme-registration-fields-add-extra-customer-attributes.html&quot;&gt;Magento Add Customer Attribute by FME&lt;/a&gt;&lt;/p&gt;
</description>
<category>Modules</category>
<guid isPermaLink="true">http://phponlinesupport.com/260/how-to-add-customer-attribute-in-magento</guid>
<pubDate>Wed, 15 Nov 2017 06:13:37 +0000</pubDate>
</item>
<item>
<title>Answered: Ability to sort products by quantity sold</title>
<link>http://phponlinesupport.com/19/ability-to-sort-products-by-quantity-sold?show=247#a247</link>
<description>Please refer this inchoos's tutorial&lt;br /&gt;
&lt;a href=&quot;http://inchoo.net/magento/magento-products/sort-show-products-by-sold-quantity-in-magento/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://inchoo.net/magento/magento-products/sort-show-products-by-sold-quantity-in-magento/&lt;/a&gt;</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/19/ability-to-sort-products-by-quantity-sold?show=247#a247</guid>
<pubDate>Wed, 31 May 2017 08:48:31 +0000</pubDate>
</item>
<item>
<title>Answered: Gocardless integration with magento</title>
<link>http://phponlinesupport.com/159/gocardless-integration-with-magento?show=243#a243</link>
<description>


&lt;p&gt;Please try&amp;nbsp;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.magentocommerce.com/magento-connect/gocardless-payment-gateway.html&quot;&gt;Gocardless Payment Gateway&lt;/a&gt; module.&lt;/p&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/159/gocardless-integration-with-magento?show=243#a243</guid>
<pubDate>Tue, 30 May 2017 06:39:52 +0000</pubDate>
</item>
<item>
<title>Answered: Direct download Magento Extension without PEAR</title>
<link>http://phponlinesupport.com/233/direct-download-magento-extension-without-pear?show=234#a234</link>
<description>You can install the extension through FTP (like FileZilla). You can paste the extension key in this unofficial link and you can download the extension files.&lt;br /&gt;
&lt;br /&gt;
This is unofficial 3rd party site, there is no guarantee about security. but i tested many extensions, i did't faced any security problems....&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://freegento.com/ddl-magento-extension.php&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://freegento.com/ddl-magento-extension.php&lt;/a&gt;</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/233/direct-download-magento-extension-without-pear?show=234#a234</guid>
<pubDate>Tue, 11 Apr 2017 03:54:31 +0000</pubDate>
</item>
<item>
<title>Translation and size products ?</title>
<link>http://phponlinesupport.com/231/translation-and-size-products</link>
<description>


&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;My e-shop is in french and i want to give the choice for my customer to choose french or english language. I have do all the translation on the Configuration products. What can I do more to add this option ?&lt;/p&gt;

&lt;p&gt;I want to increase the product's size, is that possible ? I share image with really good quality (1500px) and then the quality is decreasing with the product publication..&lt;/p&gt;

&lt;p&gt;Thank you for the help,&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family:helvetica neue,helvetica,arial,sans-serif; font-size:14px&quot;&gt;I didn't find the right solution from the internet.&lt;/span&gt;&lt;/p&gt;
</description>
<category>Modules</category>
<guid isPermaLink="true">http://phponlinesupport.com/231/translation-and-size-products</guid>
<pubDate>Thu, 06 Apr 2017 14:35:59 +0000</pubDate>
</item>
<item>
<title>Answered: Multiple Table Rates Extension</title>
<link>http://phponlinesupport.com/229/multiple-table-rates-extension?show=230#a230</link>
<description>Well thats a tricky question, and is a bit hard to solve. I had once&lt;br /&gt;
got the same problem from a client, after hours of troubleshooting&lt;br /&gt;
this is what I end up with. You will see the following SQL in the&lt;br /&gt;
file, which is returning all the results for shipping options.&lt;br /&gt;
&lt;br /&gt;
SELECT `shipping_matrixrate`.* FROM `shipping_matrixrate` WHERE (&lt;br /&gt;
(dest_country_id='GB' &amp;nbsp;AND dest_region_id='' &amp;nbsp;AND&lt;br /&gt;
STRCMP(LOWER(dest_city),LOWER('')) = 0 &amp;nbsp;&amp;nbsp;AND 'EH1244444' LIKE&lt;br /&gt;
dest_zip )) AND (condition_name='package_weight') AND&lt;br /&gt;
(condition_from_value&amp;lt;=62) AND (condition_to_value&amp;gt;=62) AND&lt;br /&gt;
(website_id='1') ORDER BY `dest_country_id` DESC, `dest_region_id`&lt;br /&gt;
DESC, `dest_zip` DESC, `condition_from_value` DESC&lt;br /&gt;
&lt;br /&gt;
Assuming what we have in the database is that of 4* and 3* char checking&lt;br /&gt;
And with PHP extract the first 4 characters of the zip input by customer and execute the query like this (in your case its &amp;quot;EH12&amp;quot; which is the first 4 letters of zip code)&lt;br /&gt;
&lt;br /&gt;
SELECT `shipping_matrixrate`.* FROM `shipping_matrixrate` WHERE (&lt;br /&gt;
(dest_country_id='GB' &amp;nbsp;AND dest_region_id='' &amp;nbsp;AND&lt;br /&gt;
STRCMP(LOWER(dest_city),LOWER('')) = 0 &amp;nbsp;&amp;nbsp;AND 'EH1244444' LIKE&lt;br /&gt;
dest_zip )) AND (condition_name='package_weight') AND&lt;br /&gt;
(condition_from_value&amp;lt;=62) AND (condition_to_value&amp;gt;=62) AND&lt;br /&gt;
(website_id='1') AND dest_zip!=&amp;quot;EH12%&amp;quot; ORDER BY `dest_country_id` DESC,&lt;br /&gt;
`dest_region_id` DESC, `dest_zip` DESC, `condition_from_value` DESC&lt;br /&gt;
&lt;br /&gt;
If there is records returned, it means you will get duplicate if you run the original query (since the 3 letter &amp;quot;EH1&amp;quot; of customer input will return both 3 and 4 char records as match).&lt;br /&gt;
So just add condition only to run the original query if and only if no records is returned by our custom query.&lt;br /&gt;
&lt;br /&gt;
Hope this helps.&lt;br /&gt;
&lt;br /&gt;
mkr</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/229/multiple-table-rates-extension?show=230#a230</guid>
<pubDate>Fri, 31 Mar 2017 10:58:49 +0000</pubDate>
</item>
<item>
<title>Answered: Magento - Apply discount on Shipping Amount with coupon</title>
<link>http://phponlinesupport.com/222/magento-apply-discount-on-shipping-amount-with-coupon?show=223#a223</link>
<description>


&lt;p&gt;Navigate to &lt;strong&gt;Admin -&amp;gt; Promotions -&amp;gt; Shopping Cart Price Rule&lt;/strong&gt;, from there fill in the fields as needed. When you get to the &quot;Action&quot; tab:&lt;/p&gt;

&lt;ul&gt;

&lt;li&gt;Apply: Percent of Product Price Discount&lt;/li&gt;

&lt;li&gt;Discount Amount: The % off you want (just the number), e.g. 50&lt;/li&gt;

&lt;li&gt;Apply to Shipping Amount: Yes (this targets the shipping)&lt;/li&gt;&lt;/ul&gt;

&lt;p&gt;Now you want to make sure you don't target any products with the discount, so continue on the &quot;Action&quot; tab in the &quot;Apply the rule only to cart items matching the following conditions&quot; section, create a rule that applies to none of your products (e.g. SKU is Blank).&lt;/p&gt;

&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;http://phponlinesupport.com/?qa=blob&amp;amp;qa_blobid=911434978229834429&quot; style=&quot;height:292px; width:600px&quot;&gt;&lt;/p&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/222/magento-apply-discount-on-shipping-amount-with-coupon?show=223#a223</guid>
<pubDate>Wed, 08 Mar 2017 10:20:58 +0000</pubDate>
</item>
<item>
<title>Answered: Magento stock history</title>
<link>http://phponlinesupport.com/210/magento-stock-history?show=211#a211</link>
<description>According to my opinion, we could do use the following extension:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://www.bubbleshop.net/de/magento-stock-movements.html?r=1&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://www.bubbleshop.net/de/magento-stock-movements.html?r=1&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/r-martins/magento-stock-history&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/r-martins/magento-stock-history&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I have used this once in one of my projects. But I think these depends on a dump log which can be cleared anytime in future. Not that a really reliable solution going forward though. I'm not sure if you are going to do this.</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/210/magento-stock-history?show=211#a211</guid>
<pubDate>Tue, 14 Feb 2017 03:36:09 +0000</pubDate>
</item>
<item>
<title>Answered: How to know core is modified?</title>
<link>http://phponlinesupport.com/196/how-to-know-core-is-modified?show=198#a198</link>
<description>You can compare like this to see how much is actually modified. Take care to compare with the exact same patched version always for best results.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://inchoo.net/magento/quickly-check-if-magento-core-files-are-modified/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://inchoo.net/magento/quickly-check-if-magento-core-files-are-modified/&lt;/a&gt;</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/196/how-to-know-core-is-modified?show=198#a198</guid>
<pubDate>Wed, 28 Dec 2016 03:56:21 +0000</pubDate>
</item>
<item>
<title>Answered: Image gallery issue (wordpress - magento and fishpig module)</title>
<link>http://phponlinesupport.com/194/image-gallery-issue-wordpress-magento-and-fishpig-module?show=195#a195</link>
<description>


&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;http://www.johnathankayne.com/js/fishpig/wordpress/lightbox.js&quot;&gt;http://www.johnathankayne.com/js/fishpig/wordpress/lightbox.js&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;lightbox script is missing in your theme, when you add lightbox.js then its working.&lt;/p&gt;
</description>
<category>Modules</category>
<guid isPermaLink="true">http://phponlinesupport.com/194/image-gallery-issue-wordpress-magento-and-fishpig-module?show=195#a195</guid>
<pubDate>Wed, 07 Dec 2016 09:09:25 +0000</pubDate>
</item>
<item>
<title>Encrypt &amp; Decrypt Magento data</title>
<link>http://phponlinesupport.com/180/encrypt-decrypt-magento-data</link>
<description>Dear members,&lt;br /&gt;
&lt;br /&gt;
Anyone who is able to help me out, would be much helpful. I have googled much for a solution, but am not able to find any.&lt;br /&gt;
&lt;br /&gt;
Here is a little different (and tough) requirement from one of my client. &lt;br /&gt;
&lt;br /&gt;
They want to encrypt all the user data in the database for enhanced security. I initially thought it is not that complicated, but looking a bit deeper, there a tons of areas which would be effected by this. All the places where the data is displayed, including the grid, text boxes, both on front-end and back-end. The insert/update/select moreover the filters/search/export/import functionalities and any other modules (like mailchimp) which is using the data. All seems to be a real mess.&lt;br /&gt;
&lt;br /&gt;
The most probable solution that I can find is to just forget Magento as a whole and look on the Zend DB engine. From where it supplies/inserts/updates data from tables, if this can be overided we have a chance (to hardcode) atleast.&lt;br /&gt;
&lt;br /&gt;
Any ideas from anyone?&lt;br /&gt;
&lt;br /&gt;
Thanks in advance, and I would certainly post if I get a solution which would be helpful for anyone looking for the same.&lt;br /&gt;
&lt;br /&gt;
Thank you...</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/180/encrypt-decrypt-magento-data</guid>
<pubDate>Fri, 18 Nov 2016 08:35:25 +0000</pubDate>
</item>
<item>
<title>Answered: Full Page Cache for Magento?</title>
<link>http://phponlinesupport.com/167/full-page-cache-for-magento?show=179#a179</link>
<description>


&lt;p&gt;Magento is the most widely used platform that holds a collective market share of about 20% of all the ecommerce websites. Magento 2 has already been introduced in November 2015 and research has stated that this percentage will rise further in the coming future. With the earlier version slowly getting phased out, it is certain that more and more business owners will embrace the 2.0 platform all over the globe.&lt;/p&gt;

&lt;p&gt;The eCommerce platform of Magento caters to all the aspects that businesses require to operate online. In fact, it is an ideal platform for all categories of businesses to develop their respective websites. Commercial prospect of &lt;a rel=&quot; nofollow&quot; href=&quot;http://www.portrave.com/hire-experts&quot;&gt;technically sound With Experienced Dedicated Magento Developers&lt;/a&gt; is rising exponentially in this situation. If you want to increase the speed of your Magento store with the smallest amount of work possible then this Magento full page cache extension is the extension that you need. It's simple to install and automatically configures itself so you don't have to do anything to start seeing amazing performance.&lt;/p&gt;
</description>
<category>Modules</category>
<guid isPermaLink="true">http://phponlinesupport.com/167/full-page-cache-for-magento?show=179#a179</guid>
<pubDate>Fri, 18 Nov 2016 07:04:51 +0000</pubDate>
</item>
<item>
<title>Answered: Encrypt customers magento password after data import</title>
<link>http://phponlinesupport.com/175/encrypt-customers-magento-password-after-data-import?show=176#a176</link>
<description>


&lt;pre&gt;&amp;lt;?php

error_reporting(E_ALL | E_STRICT);
$mageFilename = 'app/Mage.php';
if (!file_exists($mageFilename)) {
    echo $mageFilename.&quot; was not found&quot;;
    exit;
}
require_once $mageFilename;
Varien_Profiler::enable();
Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);
umask(0);
Mage::app(); 

//get all customers

$customers = Mage::getModel('customer/customer')-&amp;gt;getCollection();


//Loop to get a single customer informations

foreach ($customers as $customer){
   
   
   // Get customers extanded Data by email
    $customerpass = Mage::getModel('customer/customer')
 -&amp;gt;setWebsiteId(Mage::app()-&amp;gt;getStore()-&amp;gt;getWebsiteId())
 -&amp;gt;loadByEmail($customer-&amp;gt;getEmail());


// Get current password (No hashed PW)
$pass = $customerpass-&amp;gt;getData(&quot;password_hash&quot;);
 $salt = &quot;at&quot;;
 $password = md5($salt.$pass).&quot;:&quot;.$salt;
   
   //Save hashed password     
        $customer-&amp;gt;setPasswordHash($password)-&amp;gt;save();
}

echo &quot;Thats it!&quot;;

?&amp;gt;&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/175/encrypt-customers-magento-password-after-data-import?show=176#a176</guid>
<pubDate>Wed, 16 Nov 2016 06:03:47 +0000</pubDate>
</item>
<item>
<title>Answered: How to Encrypt and decrypt information in Magento</title>
<link>http://phponlinesupport.com/171/how-to-encrypt-and-decrypt-information-in-magento?show=174#a174</link>
<description>Maybe you are talking about the SSL thing?&lt;br /&gt;
&lt;br /&gt;
If this is already a running site with data populated in the database, I wont recommend doing something like this. This is likely to create issues with the old data unless you do the encryption manually on already happened entries.</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/171/how-to-encrypt-and-decrypt-information-in-magento?show=174#a174</guid>
<pubDate>Wed, 16 Nov 2016 05:59:23 +0000</pubDate>
</item>
<item>
<title>Answered: How to know if my magento shop is safe?</title>
<link>http://phponlinesupport.com/169/how-to-know-if-my-magento-shop-is-safe?show=170#a170</link>
<description>Use &lt;a href=&quot;https://www.magereport.com&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://www.magereport.com&lt;/a&gt; to scan your magento sites and keep things updated as per the report. These guys updates their stuff with latest security measures correctly.</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/169/how-to-know-if-my-magento-shop-is-safe?show=170#a170</guid>
<pubDate>Wed, 02 Nov 2016 09:49:00 +0000</pubDate>
</item>
<item>
<title>Answered: Fishpig autologin not working with Magento</title>
<link>http://phponlinesupport.com/157/fishpig-autologin-not-working-with-magento?show=158#a158</link>
<description>Could be a problem with your plugins on WP. Try manually disabling your plugins . If that resolves the issue, reactivate each one individually until you find the problem.&lt;br /&gt;
&lt;br /&gt;
If that does not resolve the issue, access your server via FTP or SFTP, navigate to /wp-content/themes/ and rename the directory of your currently active theme. See if that solves, if that solved it is your theme specific issue.&lt;br /&gt;
&lt;br /&gt;
Additionally, check the following also.&lt;br /&gt;
&lt;br /&gt;
To get the auto-login functionality working, you only require the default content in your .htaccess file and do not need to add any custom code in here. The following is all you need:&lt;br /&gt;
&lt;br /&gt;
# BEGIN WordPress&lt;br /&gt;
&amp;lt;IfModule mod_rewrite.c&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;RewriteEngine On&lt;br /&gt;
&amp;nbsp;&amp;nbsp;RewriteBase /wp/&lt;br /&gt;
&amp;nbsp;&amp;nbsp;RewriteRule ^index\.php$ - [L]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
&amp;nbsp;&amp;nbsp;RewriteCond %{REQUEST_FILENAME} !-d&lt;br /&gt;
&amp;nbsp;&amp;nbsp;RewriteRule . /wp/index.php [L]&lt;br /&gt;
&amp;lt;/IfModule&amp;gt;&lt;br /&gt;
# END WordPress.&lt;br /&gt;
&lt;br /&gt;
Here are a list of points/solutions taken from the documentation.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a) Can you login manually via your browser by going to your WordPress Admin directly?&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b) Re-Enter the username and password after logging in manually at System &amp;gt; Configuration &amp;gt; WordPress &amp;gt; Auto Login&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;c) Disable all WordPress plugins&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;d) Are you using Cloudflare? Cloudflare can very easily stop the auto login system working.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;e) If this is a development site, are you using HTTP authentication? The auto login system doesn't work with HTTP authentication enabled.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f) Upgrade Magento WordPress Integration to the latest version.</description>
<category>Modules</category>
<guid isPermaLink="true">http://phponlinesupport.com/157/fishpig-autologin-not-working-with-magento?show=158#a158</guid>
<pubDate>Wed, 07 Sep 2016 07:02:24 +0000</pubDate>
</item>
<item>
<title>Answered: Find products without categories</title>
<link>http://phponlinesupport.com/149/find-products-without-categories?show=150#a150</link>
<description>


&lt;pre&gt;&amp;lt;?php
require_once('app/Mage.php');
umask(0);
Mage::app('admin');
set_time_limit(0);

$i=0;
$sql = &quot;select
    type_id,sku
 from catalog_product_entity a
 left join catalog_category_product cp on cp.`product_id` = a.entity_id
 left join catalog_product_relation cpr on cpr.child_id = a.entity_id
 where
       cp.product_id is null
   and cpr.parent_id is null
   and a.type_id = 'configurable'&quot;;
$connection = Mage::getSingleton('core/resource')-&amp;gt;getConnection('core_read');
//echo count($connection-&amp;gt;fetchAll($sql));exit;

foreach ($connection-&amp;gt;fetchAll($sql) as $arr_row) {
        $pid = $arr_row['sku'];
        $product = Mage::getModel('catalog/product')-&amp;gt;loadByAttribute('sku',$pid);
        if($product-&amp;gt;getTypeId()!='configurable') continue;
        $i++;
        echo $i .&quot;) &quot;. $product-&amp;gt;getName() . &quot; - &quot; . $product-&amp;gt;getSku() . &quot;&amp;lt;br&amp;gt;&quot;;
}
?&amp;gt;&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/149/find-products-without-categories?show=150#a150</guid>
<pubDate>Mon, 05 Sep 2016 02:18:56 +0000</pubDate>
</item>
<item>
<title>Answered: Why am I seeing skin image on the WYSIWYG editor?</title>
<link>http://phponlinesupport.com/147/why-am-i-seeing-skin-image-on-the-wysiwyg-editor?show=148#a148</link>
<description>


&lt;p&gt;If you check the url of the image closely, you should see something like this...&amp;#8203;
&lt;br&gt;
&lt;br&gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;img alt=&quot;traveler cal1&quot; &lt;span style=&quot;color:rgb(255, 0, 0)&quot;&gt;src=&quot;{{media url=&quot;http://some-direct-link-to-product&lt;span style=&quot;color:rgb(255, 0, 0)&quot;&gt;.png&quot;}}&quot; &lt;/span&gt;/&amp;gt;&lt;/span&gt;&amp;#8203;Some description of product&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;
&lt;br&gt;
&lt;br&gt;If you use a direct path which is copy-pasted, it could be identifying as a broken image processing the media_url path by the editor.
&lt;br&gt;While it should be actually something like this &amp;lt;p&amp;gt;&amp;lt;img alt=&quot;ohaus logo&quot; &lt;span style=&quot;color:rgb(255, 0, 0)&quot;&gt;src=&quot;{{media url=&quot;wysiwyg/&lt;/span&gt;&lt;span style=&quot;color:rgb(255, 0, 0)&quot;&gt;&lt;span style=&quot;color:rgb(255, 0, 0)&quot;&gt;some-link-to-product&lt;span style=&quot;color:rgb(255, 0, 0)&quot;&gt;.png&lt;/span&gt;&lt;/span&gt;&quot;}}&quot;&lt;/span&gt; /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;To rectify this, in the WYSIWYG editor view client can right-click on the image (or skin image), pick &quot;Insert/Edit image&quot; option from menu. Give the full source in the text box &quot;Image Url&quot;. You can upload and add pick the image in the same window here. Giving a direct url in that text box will eliminate the &lt;span style=&quot;color:rgb(255, 0, 0)&quot;&gt;{{media url&lt;/span&gt; from the WYSIWYG source.&lt;/p&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/147/why-am-i-seeing-skin-image-on-the-wysiwyg-editor?show=148#a148</guid>
<pubDate>Fri, 02 Sep 2016 10:47:56 +0000</pubDate>
</item>
<item>
<title>Import configurable products in magento</title>
<link>http://phponlinesupport.com/139/import-configurable-products-in-magento</link>
<description>How can I import configurable products which have super-attributes, categories and multiple child products with attributes? I tried many scripts already, not sure what am I doing wrong. All the time the price of main product is only displayed on frontend even if I select the variations from the dropdown (child product combinations). Can anyone help me on this urgently please?</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/139/import-configurable-products-in-magento</guid>
<pubDate>Thu, 25 Aug 2016 03:40:38 +0000</pubDate>
</item>
<item>
<title>Answered: Magento oraganicinternet SCP module 404 issue</title>
<link>http://phponlinesupport.com/113/magento-oraganicinternet-scp-module-404-issue?show=114#a114</link>
<description>Please use this update to solve the problem if you are using an older version of the module.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/organicinternet/magento-configurable-simple/commit/c137e4bf979fcc645466352a6ead41058538267b&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/organicinternet/magento-configurable-simple/commit/c137e4bf979fcc645466352a6ead41058538267b&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Else, for a newer magento version ie.v.1.9+ please use the latest version from Git&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/organicinternet&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/organicinternet&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Enjoy and happy coding!</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/113/magento-oraganicinternet-scp-module-404-issue?show=114#a114</guid>
<pubDate>Tue, 26 Jul 2016 13:04:45 +0000</pubDate>
</item>
<item>
<title>Answered: Onepage checkout jumping problem</title>
<link>http://phponlinesupport.com/111/onepage-checkout-jumping-problem?show=112#a112</link>
<description>


&lt;pre&gt;You are not the one having the same problem. And there is a fix for this too!

Edit your checkout/onepage.phtml and add this code below var checkout = new Checkout(....);&lt;/pre&gt;

&lt;pre&gt;checkout.gotoSection = function (section, reloadProgressBlock) {
            Checkout.prototype.gotoSection.call(this, section, reloadProgressBlock);
            $('opc-' + section).scrollTo();
        };&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/111/onepage-checkout-jumping-problem?show=112#a112</guid>
<pubDate>Tue, 19 Jul 2016 10:30:35 +0000</pubDate>
</item>
<item>
<title>Answered: Truncate products and categories</title>
<link>http://phponlinesupport.com/99/truncate-products-and-categories?show=109#a109</link>
<description>


&lt;pre&gt;&lt;strong&gt;To delete all products programmatically, please use the following code.
Do set the correct $storeId and $storeCode also&lt;/strong&gt;&lt;/pre&gt;

&lt;pre&gt;
&amp;lt;?php

require_once '../app/Mage.php';

$storeId = 1;
$storeCode = &quot;de&quot;;

Mage :: app($storeCode)-&amp;gt;setCurrentStore( Mage_Core_Model_App :: ADMIN_STORE_ID );
$products = Mage :: getResourceModel('catalog/product_collection')-&amp;gt;setStoreId($storeId)-&amp;gt;getAllIds();

if(is_array($products))
{
    foreach ($products as $key =&amp;gt; $pId)
    {
        try
        {
            $product = Mage::getModel('catalog/product')-&amp;gt;load($pId)-&amp;gt;delete();
            echo &quot;successfully deleted product with ID: &quot;. $pId .&quot;\n&quot;;
        }
        catch (Exception $e)
        {
            echo &quot;Could not delete product with ID: &quot;. $pId .&quot;\n&quot;;
        }
    }
}

&lt;/pre&gt;

&lt;pre&gt;&lt;strong&gt;Delete all categories&lt;/strong&gt;&lt;/pre&gt;

&lt;pre&gt;&amp;lt;?php

$idSet = Mage::getModel('catalog/category')-&amp;gt;getCollection()-&amp;gt;getAllIds();

while ($categoryId = array_shift($idSet))
{

    try {
        $category = Mage::getModel(&quot;catalog/category&quot;)-&amp;gt;load($categoryId);
        if (!$category-&amp;gt;hasChildren())
        {
            echo &quot;Delete $categoryId ...&quot;;
            $category-&amp;gt;delete();
            echo PHP_EOL;
        }
        else
        {
            $idSet[] = $categoryId;
        }
    } catch (Exception $e) {
        echo $e-&amp;gt;getMessage();
    }

    echo PHP_EOL;

}

echo PHP_EOL;

?&amp;gt;

&lt;/pre&gt;

&lt;pre&gt;&lt;strong&gt;Or here is another method to do the delete categories. 
(please use one above or below, both does the same job).&lt;/strong&gt;&lt;/pre&gt;

&lt;pre&gt;&amp;lt;?php

require_once dirname(__FILE__) . '/app/Mage.php';
Mage::app()-&amp;gt;setCurrentStore(Mage::getModel('core/store')-&amp;gt;load(Mage_Core_Model_App::ADMIN_STORE_ID));

$resource = Mage::getSingleton('core/resource');
$db_read = $resource-&amp;gt;getConnection('core_read');

$categories = $db_read-&amp;gt;fetchCol(&quot;
    SELECT entity_id
    FROM &quot; . $resource-&amp;gt;getTableName(&quot;catalog_category_entity&quot;) . &quot;
    WHERE entity_id&amp;gt;1
    ORDER BY entity_id DESC
&quot;);

foreach ($categories as $category_id) {
    try {
        Mage::getModel(&quot;catalog/category&quot;)-&amp;gt;load($category_id)-&amp;gt;delete();
    } catch (Exception $e) {
        echo $e-&amp;gt;getMessage() . &quot;\n&quot;;
    }
}
?&amp;gt; 
&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/99/truncate-products-and-categories?show=109#a109</guid>
<pubDate>Wed, 13 Jul 2016 08:18:27 +0000</pubDate>
</item>
<item>
<title>Answered: Rich Snippets on Magento</title>
<link>http://phponlinesupport.com/107/rich-snippets-on-magento?show=108#a108</link>
<description>Try this module on Git&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/mborkowski/magentoext-richsnippets&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/mborkowski/magentoext-richsnippets&lt;/a&gt;</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/107/rich-snippets-on-magento?show=108#a108</guid>
<pubDate>Mon, 11 Jul 2016 11:33:49 +0000</pubDate>
</item>
<item>
<title>Answered: Help for Sublime text with Magento</title>
<link>http://phponlinesupport.com/105/help-for-sublime-text-with-magento?show=106#a106</link>
<description>Try this and see if it fits for you.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/serpentblade/sublime-magento&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/serpentblade/sublime-magento&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Good Luck.</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/105/help-for-sublime-text-with-magento?show=106#a106</guid>
<pubDate>Mon, 11 Jul 2016 09:54:22 +0000</pubDate>
</item>
<item>
<title>Answered: Delete all orders from admin panel</title>
<link>http://phponlinesupport.com/103/delete-all-orders-from-admin-panel?show=104#a104</link>
<description>


&lt;p&gt;This is the sql I use to do the job. I strongly recommend you to check this on a demo site and ensure you place some demo orders thereafter to make sure no order contents further that point after you execute that sql is messed up. The order clearing process wither with sql, or plugin is a risky process.&lt;/p&gt;

&lt;pre&gt;   SET FOREIGN_KEY_CHECKS=0;
TRUNCATE `sales_flat_creditmemo`;
TRUNCATE `sales_flat_creditmemo_comment`;
TRUNCATE `sales_flat_creditmemo_grid`;
TRUNCATE `sales_flat_creditmemo_item`;
TRUNCATE `sales_flat_invoice`;
TRUNCATE `sales_flat_invoice_comment`;
TRUNCATE `sales_flat_invoice_grid`;
TRUNCATE `sales_flat_invoice_item`;
TRUNCATE `sales_flat_order`;
TRUNCATE `sales_flat_order_address`;
TRUNCATE `sales_flat_order_grid`;
TRUNCATE `sales_flat_order_item`;
TRUNCATE `sales_flat_order_payment`;
TRUNCATE `sales_flat_order_status_history`;
TRUNCATE `sales_flat_quote`;
TRUNCATE `sales_flat_quote_address`;
TRUNCATE `sales_flat_quote_address_item`;
TRUNCATE `sales_flat_quote_item`;
TRUNCATE `sales_flat_quote_item_option`;
TRUNCATE `sales_flat_quote_payment`;
TRUNCATE `sales_flat_quote_shipping_rate`;
TRUNCATE `sales_flat_shipment`;
TRUNCATE `sales_flat_shipment_comment`;
TRUNCATE `sales_flat_shipment_grid`;
TRUNCATE `sales_flat_shipment_item`;
TRUNCATE `sales_flat_shipment_track`;
TRUNCATE `sales_invoiced_aggregated`;
TRUNCATE `sales_invoiced_aggregated_order`;
TRUNCATE `sales_payment_transaction`;
TRUNCATE `sales_order_aggregated_created`;
TRUNCATE `sendfriend_log`;
TRUNCATE `tag`;
TRUNCATE `tag_relation`;
TRUNCATE `tag_summary`;
TRUNCATE `wishlist`;
TRUNCATE `log_quote`;
TRUNCATE `report_event`;
ALTER TABLE `sales_flat_creditmemo` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_creditmemo_comment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_creditmemo_grid` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_creditmemo_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_invoice` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_invoice_comment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_invoice_grid` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_invoice_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_address` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_grid` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_payment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_status_history` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_address` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_address_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_item_option` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_payment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_shipping_rate` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_shipment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_shipment_comment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_shipment_grid` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_shipment_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_shipment_track` AUTO_INCREMENT=1;
ALTER TABLE `sales_invoiced_aggregated` AUTO_INCREMENT=1;
ALTER TABLE `sales_invoiced_aggregated_order` AUTO_INCREMENT=1;
ALTER TABLE `sales_payment_transaction` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_aggregated_created` AUTO_INCREMENT=1;
ALTER TABLE `sendfriend_log` AUTO_INCREMENT=1;
ALTER TABLE `tag` AUTO_INCREMENT=1;
ALTER TABLE `tag_relation` AUTO_INCREMENT=1;
ALTER TABLE `tag_summary` AUTO_INCREMENT=1;
ALTER TABLE `wishlist` AUTO_INCREMENT=1;
ALTER TABLE `log_quote` AUTO_INCREMENT=1;
ALTER TABLE `report_event` AUTO_INCREMENT=1;
SET FOREIGN_KEY_CHECKS=1;&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/103/delete-all-orders-from-admin-panel?show=104#a104</guid>
<pubDate>Mon, 11 Jul 2016 09:07:04 +0000</pubDate>
</item>
<item>
<title>Answered: truncate customers</title>
<link>http://phponlinesupport.com/101/truncate-customers?show=102#a102</link>
<description>


&lt;pre&gt;    SET FOREIGN_KEY_CHECKS=0;
-- reset customers
TRUNCATE customer_address_entity;
TRUNCATE customer_address_entity_datetime;
TRUNCATE customer_address_entity_decimal;
TRUNCATE customer_address_entity_int;
TRUNCATE customer_address_entity_text;
TRUNCATE customer_address_entity_varchar;
TRUNCATE customer_entity;
TRUNCATE customer_entity_datetime;
TRUNCATE customer_entity_decimal;
TRUNCATE customer_entity_int;
TRUNCATE customer_entity_text;
TRUNCATE customer_entity_varchar;
TRUNCATE log_customer;
TRUNCATE log_visitor;
TRUNCATE log_visitor_info;

ALTER TABLE customer_address_entity AUTO_INCREMENT=1;
ALTER TABLE customer_address_entity_datetime AUTO_INCREMENT=1;
ALTER TABLE customer_address_entity_decimal AUTO_INCREMENT=1;
ALTER TABLE customer_address_entity_int AUTO_INCREMENT=1;
ALTER TABLE customer_address_entity_text AUTO_INCREMENT=1;
ALTER TABLE customer_address_entity_varchar AUTO_INCREMENT=1;
ALTER TABLE customer_entity AUTO_INCREMENT=1;
ALTER TABLE customer_entity_datetime AUTO_INCREMENT=1;
ALTER TABLE customer_entity_decimal AUTO_INCREMENT=1;
ALTER TABLE customer_entity_int AUTO_INCREMENT=1;
ALTER TABLE customer_entity_text AUTO_INCREMENT=1;
ALTER TABLE customer_entity_varchar AUTO_INCREMENT=1;
ALTER TABLE log_customer AUTO_INCREMENT=1;
ALTER TABLE log_visitor AUTO_INCREMENT=1;
ALTER TABLE log_visitor_info AUTO_INCREMENT=1;
SET FOREIGN_KEY_CHECKS=1;&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/101/truncate-customers?show=102#a102</guid>
<pubDate>Mon, 11 Jul 2016 08:54:47 +0000</pubDate>
</item>
<item>
<title>Answered: Magento Customer-Collection and Product-Collection?</title>
<link>http://phponlinesupport.com/97/magento-customer-collection-and-product-collection?show=98#a98</link>
<description>


&lt;p&gt;&lt;strong&gt;Use this code for Customer Collection&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;?php
&lt;br&gt;// Get customer model, run a query
&lt;br&gt;$collection = Mage::getModel('customer/customer')-&amp;gt;getCollection()-&amp;gt;addAttributeToSelect('*');
&lt;br&gt;$result = array();&lt;/p&gt;

&lt;p&gt;// Get customer details. getName, getEmail so on.
&lt;br&gt;foreach ($collection as $customer) {
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $result[] = array($customer-&amp;gt;getEmail());
&lt;br&gt;}&lt;/p&gt;

&lt;p&gt;// Used if you need email as comma separated file. (Use the customer details as you wish, code beneath is just an example. You could just use the built in exporter.)
&lt;br&gt;// output headers so that the file is downloaded rather than displayed
&lt;br&gt;header('Content-Type: text/csv; charset=utf-8');
&lt;br&gt;header('Content-Disposition: attachment; filename=email_' . date(&quot;d.m.Y-H:i:s&quot;) . '.csv');&lt;/p&gt;

&lt;p&gt;// create a file pointer connected to the output stream
&lt;br&gt;$output = fopen('php://output', 'w');&lt;/p&gt;

&lt;p&gt;foreach($result as $fields) {
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // output the column headings
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fputcsv($output, $fields);
&lt;br&gt;}&lt;/p&gt;

&lt;p&gt;?&amp;gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And for Product Collection&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;?php
&lt;br&gt;# Product collection
&lt;br&gt;$products = Mage::getResourceModel('catalog/product_collection');&lt;/p&gt;

&lt;p&gt;# Select all (*) filter by visibility (not equal to 1 (1 == Not visible individually, 2 == Catalog, 3 == Search)) and where status = 1 (enabled)
&lt;br&gt;$products-&amp;gt;addAttributeToSelect('*')-&amp;gt;addAttributeToFilter('visibility', array('neq' =&amp;gt; 1))-&amp;gt;addAttributeToFilter('status', 1);&lt;/p&gt;

&lt;p&gt;# Filter by attributes. Ex: 'like' =&amp;gt; %param% / param% or like could be eq (equal) neq (not equal) so on.
&lt;br&gt;$products-&amp;gt;addAttributeToFilter(
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; array(
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array('attribute' =&amp;gt; 'custom_attr', 'like' =&amp;gt; $param . '%')
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )
&lt;br&gt;);&lt;/p&gt;

&lt;p&gt;# Could set page size (how many products to return). Nice for pagination
&lt;br&gt;$products-&amp;gt;setPageSize(10);&lt;/p&gt;

&lt;p&gt;# You could also sort desc/asc so on by using this method:
&lt;br&gt;$products-&amp;gt;addAttributeToSort('created_at', 'desc');&lt;/p&gt;

&lt;p&gt;# Or
&lt;br&gt;$products-&amp;gt;setOrder('entity_id','desc');&lt;/p&gt;

&lt;p&gt;# Loop through result:
&lt;br&gt;foreach($products as $_product) {
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&quot;%s &amp;lt;br /&amp;gt;\r\n&quot;, $_product-&amp;gt;getName());
&lt;br&gt;}&lt;/p&gt;

&lt;p&gt;?&amp;gt;&lt;/p&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/97/magento-customer-collection-and-product-collection?show=98#a98</guid>
<pubDate>Mon, 11 Jul 2016 08:39:45 +0000</pubDate>
</item>
<item>
<title>Answered: How to get the current category/product/cms page</title>
<link>http://phponlinesupport.com/71/how-to-get-the-current-category-product-cms-page?show=94#a94</link>
<description>


&lt;pre&gt;Hey Shoot this...

&amp;lt;?php
$currentCategory = Mage::registry('current_category');
$currentProduct = Mage::registry('current_product');
$currentCmsPage = Mage::registry('cms_page');
?&amp;gt;&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/71/how-to-get-the-current-category-product-cms-page?show=94#a94</guid>
<pubDate>Fri, 08 Jul 2016 07:11:24 +0000</pubDate>
</item>
<item>
<title>Answered: getBaseUrl – Magento URL Path</title>
<link>http://phponlinesupport.com/80/getbaseurl-magento-url-path?show=93#a93</link>
<description>


&lt;pre&gt;&amp;lt;?php
// http://example.com/
echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
// http://example.com/js/
echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);
// http://example.com/index.php/
echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
// http://example.com/media/
echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
// http://example.com/skin/
echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
?&amp;gt;&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/80/getbaseurl-magento-url-path?show=93#a93</guid>
<pubDate>Fri, 08 Jul 2016 07:07:00 +0000</pubDate>
</item>
<item>
<title>Answered: Get The Root Category In Magento</title>
<link>http://phponlinesupport.com/81/get-the-root-category-in-magento?show=92#a92</link>
<description>


&lt;pre&gt;&amp;lt;?php
$rootCategoryId = Mage::app()-&amp;gt;getStore()-&amp;gt;getRootCategoryId();
$_category = Mage::getModel('catalog/category')-&amp;gt;load($rootCategoryId);
// You can then get all of the top level categories using:
$_subcategories = $_category-&amp;gt;getChildrenCategories();
?&amp;gt;&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/81/get-the-root-category-in-magento?show=92#a92</guid>
<pubDate>Fri, 08 Jul 2016 07:05:42 +0000</pubDate>
</item>
<item>
<title>Answered: Get The Current URL In Magento</title>
<link>http://phponlinesupport.com/82/get-the-current-url-in-magento?show=91#a91</link>
<description>


&lt;pre&gt;&amp;lt;?php echo Mage::helper('core/url')-&amp;gt;getCurrentUrl(); ?&amp;gt;&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/82/get-the-current-url-in-magento?show=91#a91</guid>
<pubDate>Fri, 08 Jul 2016 07:04:31 +0000</pubDate>
</item>
<item>
<title>Answered: Category Navigation Listings in Magento</title>
<link>http://phponlinesupport.com/83/category-navigation-listings-in-magento?show=90#a90</link>
<description>Make sure the block that you’re working is of the type catalog/navigation. If you’re editing catalog/navigation/left.phtml then you should be okay.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;leftnav&amp;quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;?php $helper = $this-&amp;gt;helper('catalog/category') ?&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;?php $categories = $this-&amp;gt;getStoreCategories() ?&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;?php if (count($categories) &amp;gt; 0): ?&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;ul id=&amp;quot;leftnav-tree&amp;quot; class=&amp;quot;level0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;?php foreach($categories as $category): ?&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;li class=&amp;quot;level0&amp;lt;?php if ($this-&amp;gt;isCategoryActive($category)): ?&amp;gt; active&amp;lt;?php endif; ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;a href=&amp;quot;&amp;lt;?php echo $helper-&amp;gt;getCategoryUrl($category) ?&amp;gt;&amp;quot;&amp;gt;&amp;lt;span&amp;gt;&amp;lt;?php echo $this-&amp;gt;escapeHtml($category-&amp;gt;getName()) ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;?php if ($this-&amp;gt;isCategoryActive($category)): ?&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;?php $subcategories = $category-&amp;gt;getChildren() ?&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;?php if (count($subcategories) &amp;gt; 0): ?&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;ul id=&amp;quot;leftnav-tree-&amp;lt;?php echo $category-&amp;gt;getId() ?&amp;gt;&amp;quot; class=&amp;quot;level1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;?php foreach($subcategories as $subcategory): ?&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;li class=&amp;quot;level1&amp;lt;?php if ($this-&amp;gt;isCategoryActive($subcategory)): ?&amp;gt; active&amp;lt;?php endif; ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;a href=&amp;quot;&amp;lt;?php echo $helper-&amp;gt;getCategoryUrl($subcategory) ?&amp;gt;&amp;quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;escapeHtml(trim($subcategory-&amp;gt;getName(), '- ')) ?&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;?php endforeach; ?&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;decorateList('leftnav-tree-&amp;lt;?php echo $category-&amp;gt;getId() ?&amp;gt;', 'recursive')&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;?php endforeach; ?&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;decorateList('leftnav-tree', 'recursive')&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/83/category-navigation-listings-in-magento?show=90#a90</guid>
<pubDate>Fri, 08 Jul 2016 07:03:43 +0000</pubDate>
</item>
<item>
<title>Answered: Programmatically change Magento core config data</title>
<link>http://phponlinesupport.com/73/programmatically-change-magento-core-config-data?show=86#a86</link>
<description>


&lt;pre&gt;Here is how to...
Please use this only at your own risk.

&amp;lt;?php
// find 'path' in table 'core_config_data' e.g. 'design/head/demonotice'
$my_change_config = new Mage_Core_Model_Config();
// turns notice on
$my_change_config-&amp;gt;saveConfig('design/head/demonotice', &quot;1&quot;, 'default', 0);
// turns notice off
$my_change_config-&amp;gt;saveConfig('design/head/demonotice', &quot;0&quot;, 'default', 0);
?&amp;gt;&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/73/programmatically-change-magento-core-config-data?show=86#a86</guid>
<pubDate>Wed, 29 Jun 2016 14:54:19 +0000</pubDate>
</item>
<item>
<title>Answered: Run a Magento Code out of installation folder</title>
<link>http://phponlinesupport.com/72/run-a-magento-code-out-of-installation-folder?show=85#a85</link>
<description>


&lt;p&gt;Simple as this.&lt;/p&gt;

&lt;pre&gt;&amp;lt;?php
require_once('app/Mage.php'); //Path to Magento
umask(0);
Mage::app();
// Run you code here
?&amp;gt;&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/72/run-a-magento-code-out-of-installation-folder?show=85#a85</guid>
<pubDate>Wed, 29 Jun 2016 14:51:51 +0000</pubDate>
</item>
<item>
<title>Answered: Mass Exclude/Include Images in Magento</title>
<link>http://phponlinesupport.com/75/mass-exclude-include-images-in-magento?show=84#a84</link>
<description>


&lt;p&gt;By default, Magento will check the 'Exclude' box for you on all imported images, making them not show up as a thumbnail under the main product image on the product view.&lt;/p&gt;

&lt;pre&gt;# Mass Include
UPDATE`catalog_product_entity_media_gallery_value` SET `disabled` = '0' WHERE `disabled` = '1';
# Mass Exclude
UPDATE`catalog_product_entity_media_gallery_value` SET `disabled` = '1' WHERE `disabled` = '0';&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/75/mass-exclude-include-images-in-magento?show=84#a84</guid>
<pubDate>Wed, 29 Jun 2016 14:50:24 +0000</pubDate>
</item>
<item>
<title>Answered: Change the Magento Admin URL</title>
<link>http://phponlinesupport.com/74/change-the-magento-admin-url?show=79#a79</link>
<description>


&lt;p&gt;Yes, you are right. Its fairly easy.&lt;/p&gt;

&lt;p&gt;Open the xml file /app/etc/local.xml, and find the &amp;lt;frontName&amp;gt; tag, and then change the &amp;lsquo;admin&amp;rsquo; part it to something secure&lt;/p&gt;

&lt;pre&gt;&amp;lt;frontName&amp;gt;&amp;lt;![CDATA[new-secret-admin-path]]&amp;gt;&amp;lt;/frontName&amp;gt;
&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/74/change-the-magento-admin-url?show=79#a79</guid>
<pubDate>Wed, 22 Jun 2016 08:27:54 +0000</pubDate>
</item>
<item>
<title>Answered: Load category by id</title>
<link>http://phponlinesupport.com/52/load-category-by-id?show=77#a77</link>
<description>


&lt;pre&gt;&amp;lt;?php
$category = Mage::getModel('catalog/category')-&amp;gt;load(66);
$category_url = $category-&amp;gt;getUrl();
?&amp;gt;&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/52/load-category-by-id?show=77#a77</guid>
<pubDate>Wed, 22 Jun 2016 07:46:24 +0000</pubDate>
</item>
<item>
<title>Answered: Code to check if a customer is logged in Magento?</title>
<link>http://phponlinesupport.com/68/code-to-check-if-a-customer-is-logged-in-magento?show=70#a70</link>
<description>


&lt;pre&gt;&amp;lt;?php 
$logged_in = Mage::getSingleton('customer/session')-&amp;gt;isLoggedIn(); // (boolean) 
?&amp;gt;&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/68/code-to-check-if-a-customer-is-logged-in-magento?show=70#a70</guid>
<pubDate>Wed, 15 Jun 2016 08:07:47 +0000</pubDate>
</item>
<item>
<title>Answered: Download extension manually using pear/mage</title>
<link>http://phponlinesupport.com/50/download-extension-manually-using-pear-mage?show=67#a67</link>
<description>


&lt;p&gt;Pear for 1.4,&amp;nbsp;&lt;/p&gt;

&lt;pre&gt;./pear download magento-community/Shipping_Agent&lt;/pre&gt;

&lt;p&gt;And mage for 1.5. File downloaded into /downloader/.cache/community/&lt;/p&gt;

&lt;pre&gt;./mage download community Shipping_Agent
&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/50/download-extension-manually-using-pear-mage?show=67#a67</guid>
<pubDate>Wed, 15 Jun 2016 07:23:57 +0000</pubDate>
</item>
<item>
<title>Answered: Clear Magento cache/reindex</title>
<link>http://phponlinesupport.com/51/clear-magento-cache-reindex?show=66#a66</link>
<description>


&lt;pre&gt;&amp;lt;?php
// clear cache
Mage::app()-&amp;gt;removeCache('catalog_rules_dirty');
// reindex prices
Mage::getModel('index/process')-&amp;gt;load(2)-&amp;gt;reindexEverything();
/*
1 = Product Attributes
2 = Product Attributes
3 = Catalog URL Rewrites
4 = Product Flat Data
5 = Category Flat Data
6 = Category Products
7 = Catalog Search Index
8 = Tag Aggregation Data
9 = Stock Status
*/
?&amp;gt;&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/51/clear-magento-cache-reindex?show=66#a66</guid>
<pubDate>Wed, 15 Jun 2016 07:19:06 +0000</pubDate>
</item>
<item>
<title>Answered: Load product by id or sku</title>
<link>http://phponlinesupport.com/54/load-product-by-id-or-sku?show=65#a65</link>
<description>


&lt;pre&gt;&amp;lt;?php
$_product_1 = Mage::getModel('catalog/product')-&amp;gt;load(33); // won't include a valid stock item
$_product_2 = Mage::getModel('catalog/product')-&amp;gt;loadByAttribute('sku','pet-base-scale-small-10'); // will include a valid stock item
?&amp;gt;&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/54/load-product-by-id-or-sku?show=65#a65</guid>
<pubDate>Wed, 15 Jun 2016 07:16:03 +0000</pubDate>
</item>
<item>
<title>Answered: Magento Log to custom file</title>
<link>http://phponlinesupport.com/56/magento-log-to-custom-file?show=64#a64</link>
<description>You can do this simply by the following piece of code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php Mage::log('Your Log Message', Zend_Log::INFO, 'your_log_file.log'); ?&amp;gt;</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/56/magento-log-to-custom-file?show=64#a64</guid>
<pubDate>Tue, 14 Jun 2016 09:40:00 +0000</pubDate>
</item>
<item>
<title>Answered: Get Configurable product's Children set (simple products) custom attributes</title>
<link>http://phponlinesupport.com/55/configurable-products-children-simple-products-attributes?show=63#a63</link>
<description>


&lt;pre&gt;&amp;lt;?php
$conf = Mage::getModel('catalog/product_type_configurable')-&amp;gt;setProduct($product);

$col = $conf-&amp;gt;getUsedProductCollection()-&amp;gt;addAttributeToSelect('*')-&amp;gt;addFilterByRequiredOptions();

foreach($col as $simple_product)
{
    var_dump($simple_product-&amp;gt;getId());
}&lt;/pre&gt;

&lt;pre&gt;// Note: input is $product and result is iterating child products&lt;/pre&gt;

&lt;pre&gt;&amp;nbsp;?&amp;gt;&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/55/configurable-products-children-simple-products-attributes?show=63#a63</guid>
<pubDate>Tue, 14 Jun 2016 09:38:11 +0000</pubDate>
</item>
<item>
<title>Answered: Add JavaScript to page</title>
<link>http://phponlinesupport.com/58/add-javascript-to-page?show=61#a61</link>
<description>


&lt;p&gt;There are a couple of ways you can do this in Magento. There may also be any other methods with some modules or so other than what is listed below. Here a few ways that I normally use.
&lt;br&gt;
&lt;br&gt;&lt;strong&gt;Method 1:&lt;/strong&gt;
&lt;br&gt;Find page/html/head.phtml in your theme and add the code directly to page.html.
&lt;br&gt;
&lt;br&gt;&lt;strong&gt;Method 2:&lt;/strong&gt;
&lt;br&gt;page.xml - you can add something like
&lt;br&gt;
&lt;br&gt;&amp;lt;action method=&quot;addJs&quot;&amp;gt;&amp;lt;script&amp;gt;path/to/my/file.js&amp;lt;/script&amp;gt;&amp;lt;/action&amp;gt;
&lt;br&gt;
&lt;br&gt;&lt;strong&gt;Method 3:&lt;/strong&gt;
&lt;br&gt;If you check the stock page.html mentioned above, you can see this line
&lt;br&gt;
&lt;br&gt;&amp;lt;?php echo $this-&amp;gt;getChildHtml() ?&amp;gt;
&lt;br&gt;
&lt;br&gt;In normal cases, the getChildHtml method is used to render a specific child block. But, if this is called with no other paramaters, then getChildHtml will automatically render all the child blocks available. Which also means you can add something like
&lt;br&gt;
&lt;br&gt;&amp;lt;!-- existing line --&amp;gt;
&lt;br&gt;&amp;lt;block type=&quot;page/html_head&quot; name=&quot;head&quot; as=&quot;head&quot;&amp;gt;
&lt;br&gt;&amp;lt;!-- new sub-block you're adding --&amp;gt;
&lt;br&gt;&amp;lt;block type=&quot;core/template&quot; name=&quot;mynewtemplate&quot; as=&quot;mynewtemplate&quot; template=&quot;page/mynewtemplate.phtml&quot;/&amp;gt;...
&lt;br&gt;
&lt;br&gt;to page.xml, and then add the mynewtemplate.phtml file.
&lt;br&gt;Any block added to the head block will be automatically rendered. (this automatic rendering process does not apply for all layout blocks, only for blocks where getChildHtml is called without paramaters) as mentioned above.&lt;/p&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/58/add-javascript-to-page?show=61#a61</guid>
<pubDate>Mon, 13 Jun 2016 08:37:50 +0000</pubDate>
</item>
<item>
<title>Answered: Get Configurable product's Child products</title>
<link>http://phponlinesupport.com/53/get-configurable-products-child-products?show=60#a60</link>
<description>


&lt;pre&gt;This is how you can get the child products out of the configurable ones.

&amp;lt;?php
$allchildProducts = Mage::getModel('catalog/product_type_configurable')-&amp;gt;getUsedProducts(null, $product);
?&amp;gt;
&lt;/pre&gt;

&lt;pre&gt;Please note the input is $product which is the configurable and the result is the list of child products.
&lt;/pre&gt;
</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/53/get-configurable-products-child-products?show=60#a60</guid>
<pubDate>Mon, 13 Jun 2016 08:27:57 +0000</pubDate>
</item>
<item>
<title>Answered: Call Static Block</title>
<link>http://phponlinesupport.com/57/call-static-block?show=59#a59</link>
<description>You can do this simply by calling this method below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
echo $this-&amp;gt;getLayout()-&amp;gt;createBlock('cms/block')-&amp;gt;setBlockId('block-name')-&amp;gt;toHtml(); &lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may thank someone else for this, as I have got this from some other article online long before :)&lt;br /&gt;
&lt;br /&gt;
...Kat</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/57/call-static-block?show=59#a59</guid>
<pubDate>Mon, 13 Jun 2016 08:24:04 +0000</pubDate>
</item>
<item>
<title>Answered: How to fix the Blocks HTML output invalidated issue</title>
<link>http://phponlinesupport.com/40/how-to-fix-the-blocks-html-output-invalidated-issue?show=41#a41</link>
<description>You have a good extension for this purpose.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/tomasinchoo/Inchoo_InvalidatedBlockCacheFix/tags&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/tomasinchoo/Inchoo_InvalidatedBlockCacheFix/tags&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
it is done through observer.</description>
<category>Modules</category>
<guid isPermaLink="true">http://phponlinesupport.com/40/how-to-fix-the-blocks-html-output-invalidated-issue?show=41#a41</guid>
<pubDate>Tue, 31 May 2016 03:32:53 +0000</pubDate>
</item>
<item>
<title>How to configure Magento with the APC cache for performance</title>
<link>http://phponlinesupport.com/39/how-to-configure-magento-with-the-apc-cache-for-performance</link>
<description>Hi Folks,&lt;br /&gt;
&lt;br /&gt;
I'm experienced a bit with Magento. First time trying the APC cache system with magento.&lt;br /&gt;
&lt;br /&gt;
Can anyone guide me with the correct performance tuning APC configuration that we can set for a website.&lt;br /&gt;
&lt;br /&gt;
I know we will have a small difference in memory allocation setup parameter setting from server to server though.</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/39/how-to-configure-magento-with-the-apc-cache-for-performance</guid>
<pubDate>Mon, 30 May 2016 12:24:28 +0000</pubDate>
</item>
<item>
<title>Answered: Magento and PHP7</title>
<link>http://phponlinesupport.com/28/magento-and-php7?show=38#a38</link>
<description>Magneto 2.0 is officially declared as PHP 7 compatible. See the official post here.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://magento.com/blog/technical/new-magento-20-resources-and-support-php7&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://magento.com/blog/technical/new-magento-20-resources-and-support-php7&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
And some help for older version as well.&lt;br /&gt;
&lt;a href=&quot;http://www.code007.ro/making-work-magento-with-php-7-rc1/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://www.code007.ro/making-work-magento-with-php-7-rc1/&lt;/a&gt;</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/28/magento-and-php7?show=38#a38</guid>
<pubDate>Sat, 28 May 2016 18:00:25 +0000</pubDate>
</item>
</channel>
</rss>