Magento Hosting BLOG

Blog about Magento, Technologies and Hosting Service

Free ASP.NET hosting - ASPHostPortal.com :: ASPHostPortal.com Proudly Announces Free Trial Windows ASP.NET Hosting

clock October 3, 2013 11:09 by author ben

ASPHostPortal.com is a premier Windows and ASP.NET Web hosting company that specializes in Windows and ASP.NET-based hosting. We proudly announces 7 Day Free Trial Windows and ASP.NET Hosting to all new customers. The intention of this FREE TRIAL service is to give our customers a "feel and touch" of our system. This free trial is offered for the next 7 days and at anytime, our customers can always cancel the service.


The 7 Day Free Trial is available with the following features:

- Unlimited Domains
- 5 GB Disk Space
- 60 GB of Bandwidth
- 2 MS SQL Database
- Unlimited Email Account
- Support ASP.NET 4.5
- Support MVC 4.0
- Support SQL Server 2012
- Free Installations of ASP.NET And PHP Applications

ASPHostPortal.com believes that all customers should be given a free trial before buying into a service and with such approach, customers are confident that the product / service that they choose is not faulty or wrong. Even we provide free trial service for 7 days, we always provide superior 24/7 customer service, 99,9% uptime guarantee on our world class data center. On this free trial service, our customer still can choose from our three different data centre locations, namely Singapore, United States and Amsterdam (The Netherlands)

Anyone is welcome to come and try us before they decide whether or not they want to buy. If the service does not meet your expectations, our customer can simply cancel before the end of the free trial period.

For all the details of packages available visit ASPHostPortal.com

About ASPHostPortal.com:

ASPHostPortal.com is a hosting company that best support in Windows and ASP.NET-based hosting. Services include shared hosting, reseller hosting, and sharepoint hosting, with specialty in ASP.NET, SQL Server, and architecting highly scalable solutions. As a leading small to mid-sized business web hosting provider, ASPHostPortal strive to offer the most technologically advanced hosting solutions available to all customers across the world. Security, reliability, and performance are at the core of hosting operations to ensure each site and/or application hosted is highly secured and performs at optimum level.



Magento Hosting :: Understanding Magento Full Page Cache

clock August 28, 2013 07:51 by author Mike

Magento Full Page Cache (FPC) is a very useful technique or mechanism that allows us to copy web content by storing the output of a given URL to a temporary container (caching) to help reduce bandwidth usage, cpu load, memory comsuption, database stress, perceived lag among other benefits.

We need to understand what the run function in Mage_Core_Model_App does and how it is architected:

/**
* Run application. Run process responsible for request processing and sending response.
* List of supported parameters: * scope_code - code of default scope (website/store_group/store code)
* scope_type - type of default scope (website/group/store)
* options - configuration options
*
* @param array $params application run parameters
* @return Mage_Core_Model_App
*/
public function run($params)
{
$options = isset($params['options']) ? $params['options'] : array();
$this->baseInit($options);
Mage::register('application_params', $params);

if ($this->_cache->processRequest()) {
$this->getResponse()->sendResponse();
} else { $this->_initModules();
$this->loadAreaPart(Mage_Core_Model_App_Area::AREA_GLOBAL, Mage_Core_Model_App_Area::PART_EVENTS);
if ($this->_config->isLocalConfigLoaded()) {
$scopeCode = isset($params['scope_code']) ? $params['scope_code'] : '';
$scopeType = isset($params['scope_type']) ? $params['scope_type'] : 'store';
$this->_initCurrentStore($scopeCode, $scopeType);
$this->_initRequest();
Mage_Core_Model_Resource_Setup::applyAllDataUpdates();
}

$this->getFrontController()->dispatch();
}
return $this;
}

The most important part in that function is:

$this->_cache->processRequest()

What that line does is that checks if you have defined a caching node like this under app/etc/cache.xml:

cache.xml is just an arbitrary name I chose for this blog post (It’s not really arbitrary as you will see later).

The request processor node gets checked whenever the cache model gets instantiated:

/**
* Class constructor. Initialize cache instance based on options
*
* @param array $options
*/
public function __construct(array $options = array())
{

$this->_defaultBackendOptions['cache_dir'] = Mage::getBaseDir('cache');
/**
* Initialize id prefix
*/
$this->_idPrefix = isset($options['id_prefix']) ? $options['id_prefix'] : '';
if (!$this->_idPrefix && isset($options['prefix'])) { $this->_idPrefix = $options['prefix'];
}
if (empty($this->_idPrefix)) {
$this->_idPrefix = substr(md5(Mage::getConfig()->getOptions()->getEtcDir()), 0, 3).'_';
}

$backend = $this->_getBackendOptions($options);
$frontend = $this->_getFrontendOptions($options);

$this->_frontend = Zend_Cache::factory('Varien_Cache_Core', $backend['type'], $frontend, $backend['options'],
true, true, true );
if (isset($options['request_processors'])) {
$this->_requestProcessors = $options['request_processors']; } if (isset($options['disallow_save']))
{ $this->_disallowSave = $options['disallow_save'];
}
}


This piece of code:

if (isset($options['request_processors'])) {
$this->_requestProcessors = $options['request_processors'];
}

Is what matters most.

The next thing that magento does is to find / initialize the class you have defined and it expects that you have an extractContent function defined in your model. How you do that is totally up to you but look at Magento’s implementation and get a hint or two.

Magento Full Page Cache has its own config model that loads your module’s (see no arbitrary) cache.xml file which gets initialized whenever you dispatch this event core_block_abstract_to_html_after and do you know where that event gets dispatched? If you thought in the toHtml method in Mage_Core_Block_Abstract then you should be writing this article not me.


Anyhow, the Enterprise_PageCache_Model_Observer::renderBlockPlaceholder observes that event and initializes the Enterprise config model. It has a method called _initPlaceholders which iterates through all of the cache.xml nodes and finds the definition of the holes and fillers. This model is the one that basically takes control of filling the holes you defined in the cache.xml which has a syntax similar to this:



So now we know how Magento finds the cache, config, events and adds the container name in the page. However we don’t know what the containers are? Essentially they are the ones responsible for filling the holes you have defined. Each container has two important methods applyWithoutApp and applyInApp that Vinai has explained exceptionally well here. But it will be awesome if you go take a look and be amazed because trust me YOU will need to, to fully understand it.

The function that will probably will matter most for you is:

/**
* Render block content from placeholder
*
* @return string|false
*/
protected function _renderBlock()
{
}


As that is the one that will get your dynamic content (read holes).



Magento Hosting :: Add an administrator password a Magento admin user using MySQL

clock July 29, 2013 11:29 by author ben

Magento is a very powerful and fast growing ecommerce script, created by Varien. It is an open-source platform using Zend PHP and MySQL databases. Magento offers great flexibility through its modular architecture, is completely scalable and has a wide range of control options that its users appreciate.

In this section, we are going to build a MySQL script that you can use for adding a new admin account within seconds.

It is recommended to have a salted password hash ready.

Paste into the MySQL script:


Don’t forget to set your own values on lines 4-8, 26, 27.

Note: If you use Magento CE 1.3.2.4-1.4.*, remove lines 16 and 17.

Now you are ready to run script:


That is it! Now you can execute script any time you need to add admin account.

Alternatively

If you are not comfortable using script than another way can meet your needs:

1. Click Insert button to make new admin_user record. Fill out necessary fields using existing record values and this manual as template.


2. Next we need to add record to admin_role table.

Here user_id – is ID of user that we have created. parent_id is role_id of Administrators record:

Test your new admin account.



Magento Hosting - ASPHostPortal.com :: Magento API Roles Not Updating

clock June 28, 2013 06:14 by author Mike

Magento is an opensource e-Commerce web application trusted by the world's leading brands. Magento has become a popular choice in the last few years because of all the choices and features it gives while developing an ecommerce website. If you or a 3rd party developer needs to access your Magento powered ecommerce store, then you’ll want to do so via the built-in API. Granting access to the Magento API is a fairly simple task. Giving a Role custom or full access is done under Web Services > Roles. Choose your Role, then select the Role Resources tab. From this screen you can set the access that this particular Role has.

While creating a Role and giving access to the Catalog section I noticed that the Role Resources were never updating, no matter if I gave full or custom permissions. The version of Magento was 1.6.2 (latest at the time of development). There is apparently a bug with the code that affects 1.6.X versions of Magento Community Edition (CE).

The fix is fairly simple and requires a small code adjustment on the core code. Generally, it’s best to copy over the core code you are editing to a local version as your edits will get overwritten if you update the core code. But, since we know that this has been patched in 1.7, it’s best to let Magento overwrite it when we do upgrade.

Below is the code edit: Inside app/code/core/Mage/AdminHtml/Block/Api/Tab/RolesEdit.php we will look inside the constructor for a function call to getPermission.

The old line of code should be:

if (array_key_exists(strtolower($item->getResource_id()), $resources) && $item->getPermission() == 'allow')

The new line of code should be:

if (array_key_exists(strtolower($item->getResource_id()), $resources) && $item->getApiPermission() == 'allow')

This's all step fixed the issue for others running 1.6.X and not being able to edit an API User’s Role Resouces.



Magento Hosting :: SEO Tips for Setting Up Magento eCommerce and Making the Magento product import fully automatic

clock June 14, 2013 06:21 by author ben

Magento eCommerce is quickly becoming one of the more popular eCommerce platforms for businesses of all sizes. Launched in March of 2008, this platform seems to have it all—catalog management, mobile commerce, analytics and reporting, checkout, etc.—and offers both a free version as well as a paid enterprise-level version. However, there is one thing that Magento eCommerce doesn’t get right: SEO.

Search engine optimization (SEO) is one of the most important aspects of Internet marketing. Fortunately, Magento eCommerce isn’t a lost cause. Although it may not be search-engine-ready right away, there are a few things a company owner can do to help get it ready.

Getting Magento eCommerce Ready for SEO

  • Rewrite the Default URL.

You should always look at your URL configuration and make sure it is ready to go for the search engine bots. Long URLs, or URLs in their dynamic forms, can be confusing to search engines and then cause them to miss information that a URL can offer. Fixing a URL configuration is known as “rewriting” the URL, and this can often be completed with a variety of tools. With the Magento platform, it’s as easy as clicking the System section à Configuration panel à Web option à and setting the feature to “Yes.

You may also want to turn off your Store ID code additions so they are not included in your URL. You can find this option in the web configuration setting,

Finally, it’s a good idea to take advantage of 301 redirects to make sure that whether your visitors type in the domain with a “www” and used without the “www” they are taken to the same place. To do this, you must access your site’s .htaccess file and set up rewrites so that search engines know how to index your URLs. You can learn more about the .htaccess file here.

  • Customize aspects of all the different pages for SEO.

As with all things SEO, the content on the magneto platform needs to be optimized for search engines. This means that you should focus on a few specific keywords and make sure that your meta tags, title of your pages, and URL are all optimized for that keyword. You can do this by going to the backend of your site and going from Catalog à the Manage categories section. You will also want to make sure that your images are optimized by using your keywords in the titles of your images. You can find this by going from Images à to Product information.

  • Help speed up your site.

Having a site that loads and works quickly is becoming more and more important in the eyes of Google, but it’s also important if you want to keep your users engaged and decrease frustration. The Magento platform is not known for its speed, but fortunately there are a few things you can do to help speed up the system. First, go to the cache management section and enable all of the caching choices. Next, consider whether or not your web host can handle the volume Magento offers. Finally, combine all of your CSS files into a single page to help improve speed.

Making the Magento product import fully automatic.

If we got the above working, we need to get the working fully automatic. We want to import our products and do a complete reindex of magento every night. First we create a file that can be executed by the shell that imports the products and reindexes it. Call it something like import.sh (sh from shell):

echo mag_import.php 7
php /PATH/TO/YOUR/MAGENTOINSTALLATION/shell/mag_product_import.php 7
echo indexer.php reindexall
php /PATH/TO/YOUR/MAGENTOINSTALLATION/shell/indexer.php reindexall

Try and run the file with the following:

bash /PATH/TO/YOUR/MAGENTOINSTALLATION/shell/shell_dayly.sh

If that all works properly, we can setup our cronjob to do it automatically every night. Enter the following into you shell:

crontab -e

Now, if something happens to our import, somethings goes wrong, etc, we wan't to get notified. Add the following line at the top of the crontab file.

[email protected]

Below the Magento line we add our import cron:

0 0 * * * bash /PATH/TO/YOUR/MAGENTOINSTALLATION/shell/import.sh

Now save the crontab (depends on the editor how) and your all set.

Note: if you want to see error regarding the import, lines that could not be processed open /PATH/TO/YOUR/MAGENTOINSTALLATION/var/log/import.log or browse to the file in the shell and type:

tail -f import.log



Magento Hosting - Installing Magento Extension Properly

clock February 8, 2013 06:34 by author andy_yo

Many customers got the problem during installing the extension because they did installation in wrong way. So in this article We will show you the right way to install a magento extension properly.

About ASPHostPortal.com
ASPHostPortal.com is Microsoft No #1 Recommended Windows and ASP.NET Spotlight Hosting Partner in United States. Microsoft presents this award to ASPHostPortal.com for ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2012, ASP.NET 4.5, ASP.NET MVC 4.0, Silverlight 5 and Visual Studio Lightswitch. Click here for more information

 

When installing an extension, you should follow these steps:

1. Backup your site before installing any extension. Some extension might crash your site if you install it in wrong way or it contains the bad code.
* if it is posible then install and review the extension on a stagging server or development site first. This will help you to avoid down time of live site if there is a problem during installing the extension.

2. Make sure you enable magento cache. To do this, go to Admin -> System -> Cache Management
This is also an importance step that some customers missed. If the cache is disabled then magento can start setting up during uploading the extension files. Some importance files might have not uploaded yet and causes the system do setting up in wrong way.

3. If you install the extension via magento connect then go to Admin -> System -> Magento Connect -> Magento Connect Manager. There are some articles show you the detail steps in this way so I will don’t discuss further.
In almost cases you will need to install the extension manually via FTP or SSH. By this way you will need to upload the extension files to your magento location. All extension files should be organized in these folders: app, skin, js and no file should be replaced for the first time you install the extension.

* If you see another folder than app, skin or js folders, be careful before you upload it. Ask the extension provider for making sure it is nescessary and will not effect to your system.

* If the system alerts a file might be replaced in the first time you install the extension, be careful because you might replace the core file and it will crash your site.

4. When all extension files are uploaded, you will need to check the template and skin files to see if they are placed in right folder. Your custom theme might be in these folders:
- magento/app/design/frontend/<theme_package>/<theme_name>
- magento/skin/frontend/<theme_package>/<theme_name>
If your extension template and skin files are in difference theme package:

- <extension_files>/skin/frontend/<other_package>/default

- <extension_files>/app/design/frontend/<other_package>/default

Then you will need to copy these folder to your theme package.

* Some extension might just work in backend and does not have template or skin files. So don’t worry if you don’t see them.

5. Now you can refresh or disable the cache to let magento run extension setting up and start configuring the extension.

6. Logout and login the backend again. Some customers leave this step so they get access denied or 404 error page when accessing the extension configuration panel.

7. Some extension can start working now but some need to do certain configrations in backend or in adjust the custom theme. Follow the user guide of the extension to configure the extension.

8. If you need to customize the extension template or skin, you should copy the files to your custom theme folders. If you do it in the default theme you might lose your work when you upgrade or reinstall the extension.

Here is just some key steps that show you how to install a magento extension properly. Some extension might need to do some special configration or adjust your custom theme so you will need to read the installation and user guide carefully. If you not sure what you are doing then stop and ask the extension provider for help or you might crash your site and lose money in down time. If you don’t have base knowledge about magento then it is better to purchase for installation service. This will keep your head free and avoid risk on your site and business.



About ASPHostPortal.com

We’re a company that works differently to most. Value is what we output and help our customers achieve, not how much money we put in the bank. It’s not because we are altruistic. It’s based on an even simpler principle. "Do good things, and good things will come to you".

Success for us is something that is continually experienced, not something that is reached. For us it is all about the experience – more than the journey. Life is a continual experience. We see the Internet as being an incredible amplifier to the experience of life for all of us. It can help humanity come together to explode in knowledge exploration and discussion. It is continual enlightenment of new ideas, experiences, and passions

Corporate Address (Location)

ASPHostPortal
170 W 56th Street, Suite 121
New York, NY 10019
United States

Sign in