Static blocks not working – Magento 1.9.x

After updating Magento to version 1.9.x, or installing security patch SUPEE-6788 on an older version, lots of people are noticing that their static block shortcodes are no longer working. So may be some developers frustrated or confused why this happen. The solution is simple magento people added security feature on the newer version.
Simply navigate to

System => Permissions => Blocks

And add the block type you wish to display.

Burger menu not working on ipad/tablet in wordpress

If you are working with wordpress enfold theme then may be you get the issue of menu on the tablet/ipad in landscape mode. Them menu does not appears as a burger so try this media query, may be it will help :


@media only screen and (max-width: 1024px) { /*** put your css code here ****/}

How to change sign-up fee text in WooCommerce Subscriptions

Try this:

function change_subscription_product_string( $subscription_string, $product, $include )
{
if( $include['sign_up_fee'] ){
$subscription_string = str_replace('sign-up fee', 'your text', $subscription_string);
}
return $subscription_string;
}
add_filter( 'woocommerce_subscriptions_product_price_string', 'change_subscription_product_string', 10, 3 );

lessphp fatal error: load error! help in wordpress

Sometime we get error for CherryFramework or other themes lessphp fatal error: load error

The solution is below :

Delete these files from ftp:

Cherry theme main folder:
less/style.less.cache
less/bootstrap.less.cache

Child theme folder:
style.less.cache
bootstrap/less/bootstrap.less.cache

Magento – Show Inventory Levels on Product Pages

Today I will show you how we can add Quantity on hand information on the product detail page.Normal Magento shows ‘Availability-In Stock’ by default. We need to change that Qty on hand like the below image

qtyonhand

For this you need to do the below steps :
Go to app/design/frontend/base/default/template/catalog/product/view/type/default.phtml.
Get a copy of that file and move it to your custom theme, making sure to add folders as needed to maintain the correct path. Here is the code snippet for adding Quantity on Hand to your product pages.

Replace below code

<?php if ($_product--->isAvailable()): ?>

with

<?php if ($_product--->isAvailable()): ?>
<?php $quantity1 = intval(Mage::getModel('cataloginventory/stock_item')--->loadByProduct($_product)->getQty()); ?>

<div class=”add-to-box”>

<?php if($quantity1 > 0) { ?>

<p class=”availability in-stock”>
<?php echo $this->__(‘Qty on Hand:’) ?>
<?php echo $quantity1;?>
</span>
</p>

<?php } elseif($quantity1 == 0) { ?>
<p class=”availability in-stock”><?php echo $this—>__(‘Qty on Hand:’) ?></p>
<?php foreach ($_product ->getTypeInstance(true)->getUsedProducts ( null, $_product) as $simple) { $stock = intval(Mage::getModel(‘cataloginventory/stock_item’)->loadByProduct($simple)->getQty()); echo $simple->getName().” “.$simple->getSize().” have a stock of $stock”; echo ‘<br>’; } ?>
</p>
<?php } ?>
</div>

How to change the Magento Admin URL

Here is a quick guide on how to change admin url path in Magento. To protect your Magento backend against hackers and brute-force attacks, we recommend that you change the default URL to the Magento Admin Panel is must. It is a quick and easy way to add an extra layer of security to your site.

Generally, Magento have ‘admin’ as the administrator path. So, the admin URL will be http://www.example.com/admin/

Here is process how you can do this :

1) Changing local.xml
– Open app/etc/local.xml
– Find the following:-

<admin>
<routers>
<adminhtml>
<args>
<frontName><![CDATA[admin]]></frontName>
</args>
</adminhtml>
</routers>
</admin>

– Go to this line
<frontName><![CDATA[admin]]></frontName>

and change “admin” as you desired the admin path like

<frontName><![CDATA[siteadmin]]></frontName>

and then upload file. After file update clear magento cache.

The process is now complete and you can login your magento with new url path

http://www.example.com/siteadmin/

Limit wordpress title to 25 characters

I will show you how you can limit the post titles on the wordpress. Please use below code and check the output

<?php if (strlen(get_the_title()) > 25) { echo substr(get_the_title(),0, 25 ).’…’; } else { echo get_the_title();} ?>

I hope this solution will work for you!!

Magento internal server error after backup

If you get 500 internal issue in magento after taking backup then it is the issue of magento folders and files permissions.

Download attached file and upload it on the magento root folder and then run that. After then your problem will be resolved.

Download

A nice entry

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.

Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim.

Read more

How to fix empty dashboard issue in WordPress?

To fix the bug:

Open file /wp-admin/includes/screen.php
Find the following PHP statement: _help_sidebar; ?>
Replace it with the statement: _help_sidebar; ?>
Save your changes.