-
Acquiring and running a website is thought to be easy but keeping it well maintained and updated is sometimes very difficult. So, if you got a website, you got to be really very careful to maintain it well updated as per latest norms. If you see your website is experiencing any sort of problems like in response and performance. Just follow the given steps and try to troubleshoot the issues you are facing with your website and make your users smiling.
Anyone can easily identify if a website is facing any problem likely any typical issues normally slow down the response and the reduced performance affect using any tools like Google Developers Chrome DevTools, Web Page Analyzer, and Pingdom Website Speed Test etc.
Free Diagnostic Tools For Identifying Website’s Issues
You can either ask your website designer or any web design and development Company to fix the issues or use a free diagnostic tools on your own for identifying website response and performance issues if you see the reduced performance of your website. Once you run this tool for identifying the issues, you should know how to resolve those issues too. So, you will find here some typical resources, objects, elements, files, and other problem creating sources that really reduce the performance of websites. Thus, the websites underperform or show very sluggish response while running. Using the diagnostic tools will eliminate or at least reduce them quite a lot to let the websites function effectively.
Serve The Slowest Modem Connections
You should always make you’re your website must be accessible to the wide number of users, and keep one thing in your mind that there will be several users who simply might be using 56Kbps modem connections to access their Internet resources. Your website’s fastest load time will certainly serve the users having the slowest internet connections.
Improve Network Utilization
You will find certain items mentioned below are usually known to cause typical network utilization issues for any website. Below mentioned suggestions will support you to diminish such known bottlenecks:
1. Cookies – cookies are although very useful tools for your website, they are considered as slow downing response times of any website. You can easily manage your cookies by minimizing cookie file size just by restricting them to 3000 bytes or lesser as possible. Try eliminating the unnecessary cookies, also set them at any appropriate domain level, and function still content from a domain unable to serve cookies.
2. Images – You should also optimize the images you use for websites through following strategies:
- CSS nymphs are unified by grouping different images into a single file and then placing them within your CSS aids to decrease the number of requests.
- Data URI offers a technique to comprise data in-line and lets generally to separate elements likely images and style sheets which is called in a single HTTP request rather than from numerous HTTP requests.
- Identify the precise width and height in the code of the accurate image size; resizing images if they are larger than the specified coded dimensions.
3. Total HTML Files Size – Manage the total size of HTML files to below 50K to maintain load times down to least and to make sure response times of less than 10 seconds to serve the slowest modem 56K connections.
White Papers provided by Sprint
- You should try to keep the overall objects on each HTML web page document just under 20. The more objects you have the more inactivity can be projected, which will sluggish down response times. Object overhead adds to more than 80 percent of complete page inactivity issues.
- Try keeping the total size of the webpage files to 100K or even under to make sure loading and response times must stay under 20 seconds for slowest modem 56K connections.
Improving of Web Page Performance
Further, subsequent items will add support to improve webpage loading and response times and will provide your visitors a much better online practice.
- Optimize and enhance the order of CSS and script files to make sure link calls to external CSS files in the similar path and have them involved in the <head>. Inline styling contained by the <body> will too slow down reducing, so be definite all CSS is enclosed within the external CSS files. Entire script files should be positioned at the bottom of the <body> and simply before the closing </body> tag; this lets for an advanced demonstration of web page content.
- It’s necessary to remove unused CSS rules that are not employed by any web page, which requires to be loaded initially before any <body> content is loaded.
- Merging your CSS into a single file and resizing the CSS will continue a long way to improving style load times. Combining, refactoring, minifying, and GZIP compression are the major sources of optimizing your CSS.
- Try to merge your script <script> files to as much few as possible, as each external script file will increase more overhead to your web pages. Optimization techniques for script files contain the identical possibilities as CSS, Combining, refactoring, minifying, or even embed scripts where appropriate.
- An expiry date set in static HTTP resource headers will make noteworthy enhancements for browser response times and performance of the website as well.
- For instance, when, old web pages are renamed or shifted to any new locations, easy redirects are used at the least to cut out the round-trip times.
- Make sure the file name parameters are working in place of query strings to allow proxy caching for static resources.
- Another thing to be worried about resource hog fairly comparable to redirects is the bad request or Not Found responses that happen when your front end code has not been updated to return objects or resources that have shifted or have been renamed.
Final Words
There you go, by fulfilling the above methods one can easily troubleshoot typical performance issues faced by your website. Hopefully, you can easily manage all such activities well so that your website can functional easily and your online users can get the fruitful benefits from your website whatever services you are providing them. Thus, they will easily browse your entire website to fulfill their requirements for landing on your domain.
-
The web designing and development is highly competitive and day by day flouring and acquiring great success in different formats. The modern and innovative ideas and skills are added from time to time and websites are designed to meet the actual needs of the owner. Further, the web designers are coming up with their new innovations and to provide something new in all aspects as they can present. Still, they face some familiar web designing and development issues which they intensely focus on their technical skills and plan their work with relevant strategies to resolve the problems confronted them.
Here are some common and familiar problems that are faced by the web designers during designing and development process of different modes of websites.
Website Accessibility
A website is fundamentally designed or developed to represent an organization, business, personal profile or for any anonymous reasons. Such websites are easily accessible throughout the world everyone can view from their spots. The website owners also represent their respective culture, language, location, or physical or mental capabilities through their websites. However, sometimes web accessibility turns into major challenges and the designers try their level best to restore to normal and enhance the accessibility of websites in a precise way. The designers make sure that the websites are not just accessible globally but also make them fully functional with their entire features.
Smooth Web Page Movement
A common problem occurs when any visitor landing on the website and cannot move to any other pages easily and certain issues arise while shifting to different pages. The web designers must make sure the visitor must initially land on the homepage easily whether through any root page directly, or may be via any referral approach, or through some social channels. The designers should also make sure the visitors may navigate within the website without any difficulty and manually find any information or content what they are looking for. Their movement throughout the website from one web page to every other page, back and forth, should really be smooth and fast.
Image Issues
Using images within the website is a great worth and commonly used to represent the words through a single image but still, the image is also defined by specific descriptions. Because sometimes image is not decipherable to the search engines and the provided description makes easier to get the message. So, the use of proper image size also matters and the image is well defined through the inclusion of proper description or caption and Alt tag increases the complete authenticity of the website. Because leaving the junk documents or damaged hyperlinks on any website can mess up and creates another major challenge in terms of functioning the website and its performance. All such unnecessary issues create a burden on the website and actually devour up the bandwidth of the user as well.
Plenty of Inline CSS & JavaScript
Sometimes, a single flaw can make a great mess and have to fix it using different strategies. Such as plenty of inline CSS and JavaScript creates great problem while the functioning of the website. It is highly necessary to resort too lengthy inline CSS and Javascript coding because it’s excessive tends to boom the common file length of the website which, and slows down the website and depreciate the quality of user experience as well. As some web developer is not any better in the compulsion to use such formats. It is done with certain skills and proficiency to apply present website technologies along with CSS3 and HTML5. Google and other search engines frequently support a website that loads swiftly and the fast loading speed also supports in lifting the ranking of the websites.
Ignoring SEO Standards
Sometimes, if the web designers ignore the SEO standards, your website suffers a lot in terms of getting good recognition in different search engines especially Google. So your website acts swiftly in search engines and to keep away from any sort of harm to your brand. The web developer must equip your website with all the necessary SEO plugins, provide with all the required SEO accessibilities to rank your website in good manners.
Conclusion
The web designing and the development team should provide complete development to the website owners when then approach them for a precise website of their needs. Being a professional website design agency, they should create the error-free websites for their clients so that they can run and the visitors landing on the website should get the best experience in all aspects. Further, they should provide necessary solutions for if there arise certain issues afterward.
-
OpenCart Provides You The Best E-Commerce Solution
Mar 12, 2018
OpenCart is a recognized online e-store management system that provides ecommerce solutions. It is basically a PHP-based platform, uses MySQL database and HTML components. OpenCart provides support for various languages and currencies, and it is open source available for free under the GNU General Public License.
Today, e-commerce website development agency is working with you on the market majorly WordPress, Magento, or Joomla etc. So, why people are still going with OpenCart for starting their ecommerce platform? Suppose, if you are presently shopping around for the e-commerce platform, OpenCart might be a good solution for you to consider. Here, you will find some basic and ideal reasons to why OpenCart is the best and powerful solution for creating your online store.
Provides Easiest Development
OpenCart is an ideal system based platform working on the Model View Controller (MVC) pattern. So, it provides the easiest development along with extensions or customizes OpenCart if you are aware of PHP and MySQL. You can easily make a new extension, generate four files: Controller, Model, View, and a Language File.
Easy To Use
OpenCart has provided a very easy and friendly administrative dashboard for its users just comparable to other ecommerce platforms i.e. Shopify and PrestaShop. Entire menus on this platform are very simple and user-friendly for instance Catalog, Sales, Extensions, System etc. Overall, it provides you a certain platform the best to meet your needs for starting ecommerce platforms of your own.
Easy To Make Changes
OpenCart also supports your for making your required changes whenever you feel to make alterations in your website. You should absolutely get somebody to work on the changes who have awareness of PHP, MySQL, and HTML with CSS. This way, you can be able to work on the OpenCart customization as per your requirements whenever you feel necessary.
Lots of Options Available
OpenCart provides you great options to you as a famous CMS for an e-commerce solution. It got well-discussed tools and you will find assistance on a lot of information such as documentation, forums, and articles to provide various services. There are numerous posts in the forum, along with a lot of topics and over 90,000 members. This will assist you to search for a required fix or advice in the official forum if you encounter any issues with your OpenCart website.
Thousands of Extensions And Modules
The official OpenCart website makes available about 12,325 extensions, modules, and templates for your requirements and you can purchase your required ones. So, you don’t need to develop your own module as you will find from the forums and store easily in existing OpenCart modules. You will also find alterations, new features, parsers, and certain marketing tools, etc. as the prices start from $10 per module while some are free of cost.
Ready Made Templates Available
OpenCart lets you available with a large number of readymade templates for you if you are not interested in spending more budget for any template. A selection of provided templates will do at this stage and provide an individual design for your e-store. So, you can do with the templates that suit the best for your website.
Multi-Store Mode
OpenCart also provides you the services of multi-store mode to your ecommerce website which is very beneficial for you. It makes it simple to handle various online e-stores even if they have a diverse design, products, modules, customer databases, and languages etc. You can easily manage all of your e-stores from a single admin panel just similar to Magento’s dashboard. It allows you to handle multiple e-stores from one place and provides complete control.
SEO-FRIENDLY
OpenCart provides you smart SEO friendly environment for your ecommerce web store as per requirements of Google’s Algo. It supports your e-commerce e-store to boost the ranking of your website in Google. All you got to do is create an SEO URL from scratch and you can even choose the suffix Title, H1 tag, meta description, good PageSpeed and YSlow scores, robots.txt, and an XML sitemap creator. You will also find a Google Analytics dashboard extension within the admin panel which supports you to boost your website’s visibility to online shoppers. You will certainly find no problem with on-page SEO when you use OpenCart but you may require working with off-page SEO for better search results.
Make Your E-Store Multi-Language
OpenCart also makes available with multi languages to your e-store. This way you can easily translate to any of the languages in the world as it is a language-neutral CMS thanks to UTF-8. The admin panel has a folder named under “Catalog,” where you will find “language” folders that store translations. Translation files consist of simple .php files along with text variable values.
-
Drupal Code Based Development
Mar 5, 2018
APCu and OpCache optimization for a large Drupal site PUBLIC:
Put this in your /etc/php.d/opcache.ini or similar file:
php
# enhance opcache beyond defaults
opcache.enable=1
opcache.memory_consumption=256
opcache.max_accelerated_files=100000
opcache.max_wasted_percentage=10
opcache.revalidate_freq=240
opcache.validate_timestamps=0
opcache.fast_shutdown=1
opcache.interned_strings_buffer=8
opcache.enable_cli=1
If you use an APCu user bin to cache various drupal cache bins in memory you will want to further optimize / tune things with it in /etc/php.d/apcu.ini or similar file. This also has support for you in drupal for upload progress without needing pecl.
php
apc.rfc1867=1
apc.rfc1867_prefix=upload_
apc.rfc1867_name=APC_UPLOAD_PROGRESS
apc.rfc1867_freq=0
apc.rfc1867_ttl=3600
Get HTTP_REFERER as Drupal normal path without language prefix PUBLIC
php
/**
* Get HTTP_REFERER as Drupal normal path without language prefix.
*/
function referer_path() {
if (!empty($_SERVER['HTTP_REFERER'])) {
$url = parse_url($_SERVER['HTTP_REFERER']);
if ($url['path'][0] == '/') {
$url['path'] = substr($url['path'], 1);
}
list(, $path) = language_url_split_prefix($url['path'], language_list());
return $path;
}
}
Drupal Coding Processes
Get field data from user object in Drupal 8 PUBLIC:
Get the proper field data from a user object using Drupal development as a programming hub you want to involve? Make the body and website data be presented to you and consider making moves that provide you data which you require.
php
// Load the current user.
$user = \Drupal\user\Entity\User::load(\Drupal::currentUser()->id());
// get field data from that user
$website = $user->get('field_website')->value;
$body = $user->get('body')->value;
// some default getters include
$email = $user->get('mail')->value;
$name = $user->get('name')->value;
$uid= $user->get('uid')->value;
POST example with Guzzle and session cookies PUBLIC:
php
<?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/core/vendor/autoload.php');
use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;
$base_url = 'http://example.com';
try {
$client = new Client([
'base_url' => $base_url,
'cookies' => true,
'allow_redirects' => true,
'debug' => true
]);
$response = $client->post("/user/login", [
'cookies' => true,
"body" => [
"name"=> "username",
"pass"=> "password",
'form_id' => 'user_login_form'
]
]);
$token = $client->get('rest/session/token', [
'cookies' => true
])->getBody(TRUE);
$token = (string)$token;
$node = array(
'_links' => array(
'type' => array(
'href' => $base_url . '/rest/type/node/page'
)
),
'title' => array(0 => array('value' => 'New node title')),
);
$response = $client->post('entity/node', [
'cookies' => true,
'headers' => [
'Accept' => 'application/json',
'Content-type' => 'application/hal+json',
'X-CSRF-Token' => $token,
],
'json' => $node
]);
if ($response->getStatusCode() == 201) {
print 'Node creation successful!';
} else {
print "unsuccessful... keep trying";
print_r(get_defined_vars());
}
} catch(RequestException $e) {
echo $e->getRequest();
echo "\n\n";
if ($e->hasResponse()) {
echo $e->getResponse();
}
}
?>
Codes in Drupal Development
Page redirect after submit form with AJAX PUBLIC:
If you use ajax that is provision of form submission, the use of drupal_goto() is not implemented properly. The only thing happening is the error 200. Forcefully moving on page redirect can be used as a useful helper provided to you by CTools (this approach especially looks useful when your form comes as a display in your lightbox).
php
/**
* Implements hook_boot()
*/
function mymodule_boot() {
//Save current path
$_SESSION['current_path'] = current_path();
}
function mymodule_custom_ajax_form_submit($form, &$form_state) {
//Close lightbox and redirect to the current page
$path = $_SESSION['current_path'];
ctools_include('ajax');
ctools_add_js('ajax-responder');
$commands[] = ctools_ajax_command_redirect($path);
print ajax_render($commands);
exit;
}
-
Magento Code and Programming Practice
Feb 26, 2018
Magento addAttributeToFilter:
Get all product collection with the below code:
Make the choice of items through a collection that consistently provides you a comprehensive array of products in collection. This can make better association and improved market value that you can make known on the database you implement.
$collection = Mage::getModel('catalog/product')->getCollection();
$collection->addAttributeToSelect('*');
Add different types of filters on collection. Example shown below:
// Equal To (eq)
$collection->addAttributeToFilter('status', array('eq' => 1));
// Not Equal To (neq)
$collection->addAttributeToFilter('visibility', array('neq' => 1));
// Greater Than (gt)
$collection->addAttributeToFilter('price', array('gt' => 3.99));
// Less Than (lt)
$collection->addAttributeToFilter('price', array('lt' => 3.99));
// Greater Than or Equal To (gteq)
$collection->addAttributeToFilter('price', array('gteq' => 4.99));
// Less Than or Equal To (lteq)
$collection->addAttributeToFilter('price', array('lteq' => 4.99));
// Contains (like) - also uses % wildcards
$collection->addAttributeToFilter('sku', array('like' => 'DVD%'));
// Does Not Contain (nlike) - also uses % wildcards
$collection->addAttributeToFilter('sku', array('nlike' => 'ABC%'));
// In Array (in)
$collection->addAttributeToFilter('id', array('in' => array(1,3,12)));
// Not In Array (nin)
$collection->addAttributeToFilter('id', array('nin' => array(1,2,12)));
// Is NULL (null)
$collection->addAttributeToFilter('description', 'null');
// Is Not NULL (notnull)
$collection->addAttributeToFilter('description', 'notnull');
Magento Snippets for Development
Magento Product Thumbnail Image Switcher:
Thumbnail image switchers that are icons, which you click on when you want to proceed to change procedures laid out with use of this snippet gets another image lined up. In addition, another code fragment used to attain the addresses of all customers who you engage with to have a choice of accessing them when you want to consult for transaction purposes.
Step:1
Go to file media.phtml
'app/design/frontend/default/default/template/catalog/product/view/media.phtml'
Step:2
Find the code below
<a href="#" onclick="popWin('<?php echo $this->getGalleryUrl($_image) ?>', 'gallery', 'width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;">
</a>
Replace it with
<a href="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile()); ?>" title="<?php echo $_product->getName();?>" onclick="$('image').src = this.href; return false;">
<!--nested img tag stays the same-->
</a>
Get Collection of All Customer Addresses In Magento:
Use following code when you intend to retrieve all addresses of customers with a knowhow of their email ID.
<?php
$websiteid = Mage::app()->getwebsite->getid();
$store = Mage::app()->getStore();
$customer = Mage::getModel("customer/customer");
$customer->website_id = $websiteid;
$customer->setStore($store);
$customer->loadByEmail("dexte@yahoo.com");
$address = Mage::getModel("Customer/Entity_Address_Collection");
$address->setCustomerFilter($customer);
$addtess->load();
?>
Coding through Magento Snippets
Getting Top and Sub Categories in Magento:
Avail top, sub categories through the Magento development code snippet below, and see different distinctions showing your particulars with certain names mentioned in your database. In addition, display category bestsellers are another group you can use, as they are always being on display on the database, which show after execution of the following code snippet.
Place this code in you top.phtml (\app\design\frontend\base\default\template\catalog\navigation)
<?php $_helper = Mage::helper('catalog/category') ?>
<?php $_categories = $_helper->getStoreCategories() ?>
<?php $currentCategory = Mage::registry('current_category') ?>
<div id="navMainWrap">
<?php if (count($_categories) > 0): ?>
<ul id="navMain"><?php foreach($_categories as $_category): ?>
<li class="navLevel1" id="navJewelry">
<a class="navLevel1Link" href="<?php echo $_helper->getCategoryUrl($_category) ?>">
<?php echo $_category->getName() ?>
</a>
<?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?>
<?php $_subcategories = $_category->getChildrenCategories() ?>
<?php if (count($_subcategories) > 0): ?>
<div class="navSubWrap">
<div class="navSub clearFix">
<ul class="col1 clearFix">
<li><p class="colHead">
Shop by Category</p>
</li>
<?php foreach($_subcategories as $_subcategory): ?>
<li>
<a href="<?php echo $_helper->getCategoryUrl($_subcategory) ?>">
<?php echo $_subcategory->getName() ?>
</a>
</li>
<?php endforeach; ?> </ul>
<div class="navSubBnr">
<!--<img>-->
</div>
</div>
</div>
<?php endif; ?>
</li>
<?php endforeach; ?> </ul>
<?php endif; ?>
</div>
Magento Display Category BestSellers:
$curr_categoryid = Mage::registry('current_category')->getId();
$cat_Id= $curr_categoryid;
$category = Mage::getModel('catalog/category')->load($cat_Id);
$products = Mage::getResourceModel('reports/product_collection')
->addOrderedQty()
->addAttributeToSelect('*')
->setOrder('ordered_qty', 'desc')
->addCategoryFilter($category);
Display GrandTotal Of Shopping Cart in Magento:
Grand total of shopping carts when you make purchases through an ecommerce site to buy through web shops or online retailers.
getQuote();
$total = $quote->getGrandTotal();
$total = $this->helper('checkout')->formatPrice($total);