Saturday, November 11, 2017

SEO tips you should know to enhance ranking and traffic to your Magento shopping cart website

Learn & Copied from Internet :) Sharing for others ...

1. Update the Latest Version Of Magento Platform

You need to make sure that you are using the latest version of Magento. New releases will have best SEO support because it has improved security, bug fixes. This is the first thing you should give attention if you want to get high rank in search engine.

2. Optimize URLs  

It is better if URLs of your website do not have any codes. Follow these steps to clean URLs: System => Configuration =>Web =>Search Engine Optimization => URL Options, and then set Add Store Code to “No”. After this configuration is saved, product/category codes will not be automatically added to your URLs, which make it more SEO- friendly.
To radically clean URLs, in Search Engine Optimization menu, turn Server URL Rewrites to “Yes” . The phrase “index.php” will be removed from your URLs as well.
3. Use proper keywords
Magento has default sample content for product title and description, but it is not standard for SEO. You need to edit them by go to Configuration => Design => HTML Head. Meta title and description should be keyword-rich and unique. With the title, one rule is putting important keywords near beginning of your title as much as possible in order for search engines to realize them more easily. One more thing is eliminating words like “the”, “and” from your title. Do a similar action for category title and description, you will have a more SEO-friendly site.

4. Optimize product images

Don’t forget to optimize product images on your site. Make sure that titles can tell about the meaning of images other than a seri of meaningless words and numbers. In addition, similar to other titles, image’s title also should contain relevant keywords. Alt tags are as important as title and URL. Add alt tags to images to get best visibility in search system.

5. Avoid Duplicate Content

When the same product is shown in different categories in your site, or even a piece of content appears in two pages, it is a mistake called duplicate content. Google will not appreciate sites with duplicate content. Let modify canonical link to figure out this problem. Go to System =>Configuration =>Catalog =>Search Engine Optimization and set Canonical Link Meta Tags for Products and Categories to Yes.
6. Speed up your site
Loading speed can influence the site ranking. As Google has stated, low loading sites are not preferable. Only one lower second can drop the the site ranking. There are various ways to speed up your site, below is some simple but easy ways for you:
> Enable all caching features (System => Cache Management)
> Enable Flat Catalog Categories and Flat Catalog Product  (System => Configuration, Catalog => Catalog,Frontend)
> Merge CSS and JS files System => Configuration, Advanced => Developer => JavaScript Settings/ CSS Settings
> Reduce the number of external files that can be downloaded from your server

7. Generate a Google Sitemap

With some simple steps, you can generate a Google sitemap on your site, which helps you provide information about site link for search engines to crawl.
1. Go to Catalog => Google Sitemap => Add new.
2. In Filename, type “sitemap.xml”
3. In Path field, fill out with the directory on server that the sitemap.xml file will be saved.
4. In Store View, select the store view you set up the sitemap for
5. Save and Generate

8. Modify Robots.txt File

Why should we take a look at robots.txt file? In case you create a site without real products, Magento adds a robots.txt file to your site so that search engines will not index it. Your site is real, right? So don’t let robots.txt file prevent search engine find out your site.
By default, Robot setting is “NOINDEX, NOFOLLOW”, which make your site cannot appear on search results. To solve this problem, go to System => Configuration => Design => Default Robots, and then change it to “INDEX, FOLLOW”.
8 tips above can bring better organic traffic for your site, increase site rankings and search engine visibility.


================================================================
https://www.milople.com/blogs/magento/add-featured-product-magento-store-homepage.html

How to add featured product on Magento Store homepage


You may not aware of SEO advantages of having featured product 0n Magento store homepage. Many store owners have found the solution to make updates in sites regularly by adding featured products and most of them have noticed improvement in indexing. Another feature to point out regarding SEO is having featured product on homepage will get higher priority in searches compared to other products. One can promote products and let them showcase in a better way to your customers and that can result in boost of sales of your store. Here I have described five steps to make featured product attribute and to display it on home page.
STEP: 1. To make featured product attribute.
  • Login to Magento admin area.
  • Now add attribute from tab
Catalog–>Attribute –> Manage Attribute–>Add New Attribute.
Attribute Properties to be set
  • Attribute Identifier: featured
  • Scope: Store View
  • Catalog Input Type For Store Owner: Yes/No
  • Unique Value (not shared with other product): No
  • Values Required: No
  • Input Validation for Store Owner: None
  • Apply To: All Product Types
Front End Properties to be set
  • Use In quick Search: No
  • Use In Advance Search: Yes
  • Comparable on Front-end: No
  • Use In Layered navigation (Can be used only with catalog input type ‘Dropdown‘): No
  • Visible on Catalog Pages On Front-end: Yes
Manage label/options to be set
  • Default: Featured Product
  • English: Featured Product
Now add featured product attribute in attribute set:
Go toCatalog –>Attributes–>Manage Attribute sets.
Our featured product attribute will be displayed in “Unassigned attribute” in right end side of the screen. Now drag and drop our “featured product” attribute in ‘General’ tab of “Groups” displayed in left end side of screen. Now click on “save attribute set” button. See the screen shot for reference.
Edit-attribute-set
STEP: 2. Create featured product block file.
  • Go to Local directory app/code/local/ and create directory.
  • Create directory level
“Featured Product/Catalog/Block/Product/Featured.php”
Copy and paste this code in Featured.php file.
STEP: 3. Create template file for featured product.
Go to directory “app/design/frontend/my_theme/template/catalog/product/” and make featured.phtml file.
Replace my_theme with your current theme name.
Copy and paste this code in featured.phtml file.
STEP: 4. Add new block to the app/etc/local.xml
Add the following code after the global tag ends:
STEP: 5. Add featured product block in home page.
Copy and paste this featured product block on home page
Now the featured product on your home page can be seen”¦..



Thursday, November 9, 2017

php question and answer for BIT UCSC UoM Final year student project

php question and answer for BIT UCSC UoM Final year student project


Issue:
Values retrieved from database in textbox missing after spaces ...

Solution:
Value attribute of inputs should be with quotes too:

value='" . $value . "'
echo "Employee Name: <input type='text' name='EmployeeName' value='". $row['employee_name'] ."'><br/>";


Issue:
Multiple table row values inset to datbase as an array

Solution:
multiTableInsert

=================================================================
View -  mark array textbox
<tr>
  <td><input type="text" name="alert_Column1[]" value=<?php echo $row[1]; ?>></td>                                                  
</tr>

module,
$alert_Column1 = filter_var($_POST['alert_Column1'], FILTER_SANITIZE_STRING);

    foreach ($_POST["alert_Column1"] as $rec => $value) {
        $alert_Column1 = $_POST["alert_Column1"][$rec];

        $query = "INSERT INTO tbl_alert_1 SET alert_Column1 = :alert_Column1 ";
        $stmt = $conn->prepare($query);
        $stmt->bindParam(':alert_Column1', $alert_Column1);
        $stmt->execute();
    }

=================================================================

are php sessions secure
are php functions case sensitive
are php variables case sensitive
are php variables global
are php files safe
are php and python similar
are php sessions cookies
are php objects passed by reference
are php developers in demand
are php namespaces case sensitive
can php run on iis
can php run without server
can php be compiled
can php be embedded in html
can php be used for desktop applications
can php session be hacked
can php access local storage
can php connect to sql server
can php code be seen
can php and node.js work together
php did you mean
php did you mean search
phpunit did not finish successfully
php did not respond properly to the request
php did you mean script
php did you forget a use statement
php did not show error
php did not working
when did php 7 come out
do php files need to be executable
do php arrays start at 0
do php sessions expire
do php online
do php function on button click
do php sessions use cookies
do php comments affect performance
do php function onclick
do php loop
do php function
does php support multiple inheritance
does php require a compiler
does php compile
does php need a server
does php 7 support mysql
does php have classes
does php support overloading
does phpmyadmin work with mariadb
does php have garbage collection
php had removed
php have_posts
php have_rows
php have string
php have key
php have headers been sent
php have_posts function
php have property
php have array value
php have dynamic variables
must have phpstorm plugins
how php works
how php session works
how php generate html
how php and javascript interact
how php works with html
how php interpreter works
how php code is parsed
how php mail function works
how php works with apache
how php-fpm works
is php case sensitive
is php a programming language
is php dead
is php object oriented
is php dying
is php still relevant
is php hard to learn
is php open source
is php easy to learn
is php outdated
should php files be executable
should php classes be in separate files
should php still be used
php should not be called statically
phpunit should throw exception
phpspec should throw exception
php should i close mysql connection
phpspec should be called
phpunit should be called
phpunit should not throw exception
phpmyadmin was not found on this server
php was not found on this server
php was developed by
php was not closed
phpmyadmin was not found on this server linux
phpmyadmin was not found on this server centos
phpmyadmin was not found on this server ubuntu 18.04
phpmyadmin was unable to kill thread
phppgadmin was not found on this server
phpunit was not expected to be called
what php version
what php stands for
what php version am i running
what php can do
what php version for wordpress
what php means
what php is used for
what php is my site running
what php developer do
what php version does wordpress use
when php session expire
when php was developed
when php will die
when php session end
when php destructor is called
when php 8
php when to use static methods
php when to use traits
php when to use interface
php when to use abstract class
where php.ini
where php is used
where php.ini file is located
where php.ini ubuntu
where phpmyadmin store databases
where php.ini wordpress
where php.ini centos
where php error log
where php.ini mac
where php installed in linux
which php version
which php.ini
which php version to use
which php version should i use
which php.ini is being used
which php.ini am i using
which php framework is best
which php version for wordpress
which php framework is easy to learn
which php is apache using
who phoned me
who php works
who.php file
who php programming language
php who am i
php who called function
php who is online
php who is logged in
php who called me
php who uses it
why php is used
why php is better
why php is called hypertext preprocessor
why php is dying
why php is scripting language
why php 7 is faster
why php is loosely typed language
why php is better than java
why php logo is elephant
why php is good
will php die
will php survive
will php ever die
will php be replaced
will php work in html file
will php code work in .html
will php mail work in localhost
will phpunit
will php become obsolete
will php run on iis
php could not load
would you use php

Sunday, February 12, 2017

Monday, December 19, 2016

Change timezone to Apache server , PHP and MySql in XAMPP

Change timezone to Apache server , PHP and MySql in XAMPP
I have installed XAMPP in my Windows machine and I want to alter the timezone in Apache HTTP server, PHP module and MySql in order to see proper dates in server error.log, access.log and php_error_log output.
After some searching I found the solution:

1. In httpd.conf (\xampp\apache\conf\httpd.conf) , add the following line:

1
2
# Set timezone to Europe/Athens UTC+02:00
SetEnv TZ Europe/Athens

2. Edit php.ini (\xampp\php\php.ini) date.timezone value in [Date] section:

1
date.timezone = "Europe/Athens"
You can find the available PHP timezones in http://php.net/date.timezone

3. In my.ini (\xampp\mysql\bin\my.ini) add or replace

1
default-time-zone = "Europe/Athens"
Now restart Apache HTTP and MySQL server and you are done!
Set timezone to Africa/Harare




Import database in phpmyadmin XAMPP if got error like this... "No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration."

try to edit after change into php.ini :
upload_max_filesize = 10M 
post_max_size = 20M 
memory_limit = 128M

MSc BIT BSc HND Edxcel PHP Web Application Projects Assignments Guidance.
London A/L O/L ICT Class
Individual / Group / Online classes in English / Sinhala / Tamil. Sample PHP Projects/Assignments Exam Papers, Tutorials, Notes and Answers will be provided. Call +94 777 33 7279 | eMail itclasssl@gmail.com | Skype ITClassSL