Sunday, January 31

Best ways to promote your Magento Extensions


Top 10 ways to Promote your Magento Extensions.

1. Submit the extensions in Magento Connect. Magento market place(Magento connect) played a major role on promoting the Magento extensions.

2. Create a separate Store to sell the Magneto extensions. Because customer can't purchase the paid modules directly from Magento Connect.

3. Participate various forums and submit the Magento extensions links. Forums are a great way to spread the word across the globe.

4. Write a detailed description about the extensions with HQ screen shot in Magento connect as well as your store.

5. Become a Industry partner in Magento to positioned the extension in top of the search results in Search Engines.

6. Get reviews from the customer also very important one. Great customer reviews helps to promote the Magento Extensions.

7. Sharing the Magento Extensions in various social website Like Facebook, Twitter, LinkedIn, etc.. Building and Maintaining the professional Business Page 
in social media will helps to promote the Magneto Extensions.

8. Create a Demo website for the both Frontend and Backend. Make a Videos of the extension so that customer can well understand about the modules.

9. Write a blog about the Magneto Extension and promote it in various social media websites.

10. Write more guest blogging about your Magneto Extension will also helps a lot to promote your Magento Extensions. 
               

Friday, January 22

Magento2 How to get custom attribute value in Product View page


In Magento2 product detail page you can able to see the product description, short description, price, etc.. these are all the attributes already exists in Magento. But every business may need some more additional attribute based on their products. let's say if you want to create additional attribute and you want to show those attributes in product view page, you need to follow the below steps.

Let's assume I want to specify the product warranty in product detail page.

Step 1 : Create a new attribute 'warranty' in Magento back end under STORES->Attributes->Product.

Step 2 : Assign the newly created attribute 'warranty' to the default attribute set. You can see the attribute set option under STORES->Attributes->Attribute set.
I assume you already know how to create and assign the attribute to attribute set. So we don't want to go deeper.

Step 3: Now we can able to see the attribute while creating the products. we can give whatever value for the attribute.

Step 4: Edit the catalog_product_view.xml file and update the below content. you can add this section inside the product.info.main container. you can add your block next to product.info.overview block. So it will be shown next to the short description.



getWarranty
warranty
warranty 
warranty 
itemprop="warranty "



Step 5: Create a new file warranty.phtml under mageno2root/vendor/magento/module-catalog/view/frontend/templates/product/view with the below content.

<?php
$_helper = $this->helper('Magento\Catalog\Helper\Output');
$_product = $block->getProduct();
$_code = $block->getAtCode();
$_className = $block->getCssClass();
$_attributeLabel = $block->getAtLabel();
$_attributeType = $block->getAtType();
$_attributeAddAttribute = $block->getAddAttribute();

if ($_attributeLabel && $_attributeLabel == 'default') {
$_attributeLabel = $_product->getResource()->getAttribute($_code)->getFrontendLabel();
}
$_attributeValue =$_product->getResource()->getAttribute($_code)->getFrontend()->getValue($_product);
?>
<?php if ($_attributeValue): ?>
<div class="product attibute <?php echo $_className?>">
<?php if ($_attributeLabel != 'none'): ?><strong class="type"><?php echo $_attributeLabel?></strong><?php endif; ?>
<div class="value" <?php echo $_attributeAddAttribute;?>><?php echo $_attributeValue; ?></div>
</div>
<?php endif; ?>

That's it. Now we can able to see the warranty value in product detail page next to short description section.

Hope it helps for someone who starts to work in Magento2.

If you are looking for a post to get an attribute value Magento1.x Here you go

Friday, June 5

Why Magento Upgrade?

Magento Keep on working and releasing the versions frequently. whenever we recommend people to upgrade the Magento to latest version, the first question is “Why do we need to upgrade the Magento”. what is the purpose of upgrading Magento. if you take any ecommerce not only ecommerce any software it always good to keep update to latest version.
In this article we will see why Magento version upgrade is very ant for the store owner.
  • In every release Magento introduce new features, bug fixing.
  • By upgrading Magento to latest version, we can make our store more secured from online vulnerabilities, hackers and malwares.
  • Improved features and functionalities will help to improve the sales.
  • With the help of new versions we can able to install more number of modules. some of the module may not support for the old version.
  • We can get more advantages of Magento Extensions.
  • We can get more flexibility and control over the system.
  • Latest version will come up with the performance improvement. so it helps to improve the sale.
  • Magento’s latest version will come up with the responsive design. so we can get more Customer from mobile devices. it improve the sales.
Why do we need to upgrade Magento 1.14.2
Magento 1.14.2 comes with lots of New features and functionality
Magento 1.14.2 includes the latest version of Zend Framework 1 and also comes with the Redis cache integration. It also servers Full Page cache in most of the pages. it improve the product quality and it adds the previous patches in to the core code.
New Features
Google Tag Manager:
Google Tag Manager tools is used to track many tags, snippets of code that are related to marketing campaign event. we can use google tag manager to track audience measurement, personalization, retargeting and search engine marketing.
Universal Analytics with Enhanced E-Commerce:
Enhanced E-Commerce is a plugin for google universal analytics with checkout funnel visualization and segmentation tools.  with the help of this tool we can able to track customers shopping behaviour that includes,
Products sales revenue
Performance of product positioning
Banner view and click data

Enhancements to the existing features:
Visual Merchandiser :
Visual merchandiser is updated to new automatic sorting features which helps to store owner to bring the following products in to the top.
  • Best Sellers
  • Sort by color
  • Newest products
  • lowest stock item
  • highest margin items
Google Shopping:
Google shopping is a google adwords service that publish product feeds from merchant web catalogs. The Google API configuration now includes different section for google shopping.
Magento 1.14.2 has lots of performance and security improvements. for more details please refer the Magneto 1.14.2 Release notes.

Friday, August 15

How to Speed up Magento E-Commerce Store


Speed up the Magento store is always the challenging one. Everyone know to set the configuration in magento backend to optimize the site. apart from that we need to follow the below Hosting Environments and some other general tips.

First we should host the site in Dedicated server
Host the site in your customer country
Go to Mysql Admin Manager and Repair all the tables and Optimize the table
Only Install necessary Apache modules
use apache mod_expires and be sure to set how long the files should be cached.
Enable Gzip Compression in your htaccess file
Use Content Delivery Network(CDN) for a static content. like css,js,images
Please try to avoid external javascript and Iframe. Because every DNS lookup takes extra time.
Enable Apache KeepAlives.
Must Enable the Compilation mode in your Magento admin
Minimize the http redirects
Make your output should be W3C validated. because Errors may slowdown the browser
Turn off your Web server logs, it reduces the disk writes.
Try to Update the magento to latest version.
Increase the Query cache size in your Mysql Server
Set php_value_memory_limit to 128M in your php configuration to ensure we don't run out of memory.
Use Different server for Magento Application and MySQL.
Use Load Balancer to avoid the down time when more number of hits in the site.
If your site heavily crawled by the search engines, then you can tweak your robots.txt.
Ref: http://www.byte.nl/blog/magento-robots-txt/
Minimize the js and css files
specify the image dimensions for your images
try to Implement anyone of the cache like APC,Varnish,etc...
try to go with some other third party booster module like AITOC Magento Booster, Nitrogento



Thursday, June 19

Top 5 Issues Affecting Mangento Performance

Below are Most common Top 5 Issues, which causes 84% performance Issues. Most of the issues are due to inefficient operations, memory misuse, redundant or useless Looping.

1.    Calculating the size of an array on each iteration of a loop
2.    SQL queries inside a loop
3.    Loading the same model multiple times
4.    Redundant data set utilization
5.    Inefficient memory utilization

Reference : http://info.magento.com/rs/magentocommerce/images/Conquer_the_5_Most_Common_Magento_Coding_Issues_to_Optimize_Your_Site_for_Performance.pdf

Sunday, June 8

Magento Performance Optimization - A Complete Overview



Optimizing the magento speed is always the challenging one. In this article we will go through some of the steps to fine tune your server to allow magento to run more quickly.

1. Apache mod_expires
Whenever the user visits the site , always the web browser keep the cache of the web pages. All the web pages should have content expiry header that tells the browser when the cache will expires. If the header is not set properly always the page will request the content from the source with every page hit. in order to ensure magento set correct content expiry header, we need to add the following block of code in htaccess file.

ExpiresActive On
ExpiresDefault "access plus 1 month"

2. Apache KeepAlive
Apache KeepAlive functionality is used to allow the TCP connection between client and server  to remain open connection to allow multiple request to be served over the same connection. this can be used to decrease the page load time on web pages especially with lots of images, since it removes the over head of having multiple connections opened. to use this functionalities, edit the /etc/apache2/apache2.conf  and find keep alive entries and enabled as follows. 

KeepAlive On
KeepAliveTimeout 2

the timeout parameter is unit of seconds.   

3. GZip Compression
Web pages can be compressed using Gzip between client and server, reducing the amount of data that needs to be transferred. even though the act of compressing and decompressing adds a performance overhead, there is a net gain in reducing the traffic for large pages. to use GZip compression, enable the mod_deflate module in apache and add the following to the vhost for the site.

SetOutputFilter DEFLATE
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary

4. MySQL Tuner:
MySQL tuner is a perl script that allows to analysis your database and gives recommendation which variables you should adjust in my.cnf to increase the performance. this can really help to increase the performance without the expensive hardware changes. to install and run this script follow the command.

bash$ wget http://mysqltuner.com/mysqltuner.pl
bash$ perl mysqltuner.pl

In the next articles we will continue the below performance optimization technique.
  • MemCached
  • PHP APC
  • Database Session Storage
  • Query caching


Saturday, May 24

How to get Magento Admin Log Details


If you are running the magento store with multiple administrator, its very difficult to find who edited the product,category,sales or some other admin activities.

When I googled the module to find the admin log details, I didn't get any module. one day when i surfing in to magento admin panel, surprisingly I saw the admin log details.

with the help of admin log, we can easily discover which administrator logged and which page/category/product they visited and modification they made.we can view the detailed information on the history, date and time of the action made. so if something happened wrong in your store, we can find out who/what could caused the problem.

In Magento admin panel under system->admin action log we can see all the admin activities with detailed information.

Please refer the below screen-shot for reference.




Monday, May 7

How to add Order Profit column in Magento

here is the step by step tutorial to get order profit column in magento backend.

This column will show the profit gained per order (i.e, the difference between Cost and Selling Price)
1) Copy the app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php file to app/code/local/Mage/Adminhtml/Block/Sales/Order/Grid.php, by maintaining the directory structure
2) There is a protected function _prepareColumns, kindly paste the below code inside it

//below code for showing profit
//start
 $this->addColumn('entity_id', array(
    'header' => Mage::helper('sales')->__('Profit'),
    'index' => 'entity_id',
    'type'  => 'currency',
    'currency' => 'order_currency_code',
    'renderer'  => new Mage_Adminhtml_Block_Sales_Order_Renderer_Profit() //for the value
));
//end

3) Create a file app/code/local/Mage/Adminhtml/Block/Sales/Order/Renderer/Profit.php (directory structure should be maintained).
Copy the following code as it is in it.
class Mage_Adminhtml_Block_Sales_Order_Renderer_Profit extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
    public function render(Varien_Object $row)
    {
        $order_id = $row->getData($this->getColumn()->getIndex());
 
        if(!empty($order_id))
        {
            $sales_model = Mage::getModel('sales/order')->load($order_id);
            $subtotal = $sales_model->getSubtotal();//get order subtotal (without shipping)
            $items = $sales_model->getAllItems(); //get all order items
            $base_cost = array();
            if(!empty($items))
            {
                foreach ($items as $itemId => $item)
                {
                    $qty = intval($item->getQtyOrdered()); //get items quantity
                    if(empty($qty))
                    {
                        $qty = 1;
                    }
                    $b_cost = $item->getBaseCost();//get item cost
                    $base_cost[] = ($b_cost*$qty); //get all items cost
                }
            }
            $total_order_cost = '';
            if(!empty($base_cost))
            {
                $total_order_cost = array_sum($base_cost); //get sum of all items cost
            }
            $profit = '';
            if(!empty($total_order_cost))
            {
                $profit = ($subtotal-$total_order_cost); //get profit , subtraction of order subtotal
            }
 
            $_coreHelper = $this->helper('core');
            $profit = $_coreHelper->currency($profit);
 
            return $profit;
        }
 
    }
}
And you are done, now a Profit column will be seen in Sales > Orders in adminend.


How to get Table Name in Magento

Here is the small snippet of code to get the table name of the particular module.

let us assume my module name is "dckapbanner".

here is the script to get the table name of the "dckapbanner" module.

<?php
 
$resource = Mage::getSingleton('core/resource');
$tableName = $resource->getTableName('dckapbanner/dckapbanner');
 
?>

Thursday, March 29

How to install SSL Certificate in Magento


Here we will see how to install SSL certificate in Magento. Before we go to Magento SSL certificate we have to know all what is SSL and why we need SSL in our website.

What is SSL?

SSL is an acronym for Secure Sockets Layer, an encryption technology that was created by Netscape. SSL creates an encrypted connection between your web server and your visitors’ web browser allowing for private information to be transmitted without the problems of eavesdropping, data tampering, or message forgery. Once you have done the SSL install, you can access a site securely by changing the URL from http:// to https://. When an SSL certificate is installed on a website, you can be sure that the information you enter (credit card or any other information), is secured and only seen by the organization that owns the website.

Why need SSL?

If you are transmitting sensitive information on a web site, such as credit card numbers or personal information, you need to secure it with SSL encryption. It is possible for every piece of data to be seen by others unless it is secured by an SSL certificate.

 Add SSL certificate magento: Please follow the below steps for add SSL certificate in magento Here I show you with example of SSL Certificate add into cpanel.

Step1: Open your CPanel and Goto ssl-tls manager menu. 


Step2: Select Activate SSL on Your Web Site (HTTPS).


Step3: And enter the CRT and KEY for certificate and press install certificate button and install it. 


Step4: After this go to magento admin panel in System->Configuration->web in base url and set https where write http and set Use Secure URLs in Frontend = yes. 



Now you can have ssl certification in your magento site. you can see this in near by your address bar.

Thank You : Just Web Development