September 17, 2014

Wordpress site loading problem on windows Azure

If you are getting message on site webpage like: "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."

Solution :
For that you need to enable URL Rewriting for pretty Permalinks

WordPress on Windows Azure Websites runs under Microsoft Internet Information Services (IIS), not Apache. IIS also supports URL rewriting but the configuration is done in a Web.config file, not in a .htaccess file.

Next, using FTP, WebMatrix or other tool, create a Web.config file

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Main Rule" stopProcessing="true">
                    <match url=".*" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

And upload it to the WordPress site's root directory,

Make sure your WordPress Permalink settings do not contain “index.php”
Also make sure in WordPress Settings, General Settings section, the WordPress Address (Site URL) and Site Address (Home URL) are correct.

BrowseAloud(Text to speech) on my website


 BrowseAloud Configuration     

Step 1 :
As BrowseAloud only reads BrowseAloud-enabled sites , first of all we need to register our site with BrowseAloud.
Registered your site with  BrowseAloud via : http://www.browsealoud.com/au/browsealoud/requestform/.
BrowseAloud activated for your website within 24 hours of purchase.

Step 2 :
The page must have a valid <!DOCTYPE>  set at the top. An invalid or missing <!DOCTYPE> will cause the BrowseAloud logo to display and function incorrectly.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Step 3 :
Include below scripts in to your page (Here /httpdocs/joomla/templates/beez_20/index.php)
<script type="text/javascript">var _baLocale = 'de', _baUseCookies = true, _baHiddenMode = true;</script>
<script type="text/javascript" src="//www.browsealoud.com/plus/scripts/ba.js"></script>
Note : The javascript must render between the <body>…</body> tags of your page when shown in the browser.

Step 4 :
Include below HTML  script in to index.php at place where you want to display “Listen with BrowseAloud”  link.
<div id="website-audio-button">
    <a onclick="function getProtocol(){return window.location.href.indexOf('https')==0?'https':'http';}(function(){if(navigator.userAgent.indexOf('MSIE')!=-1&&getProtocol()=='https'){alert('You are viewing a secure website. We do not currently support BrowseAloud services on secure sites.');}else{document.getElementsByTagName('body')[0].appendChild(document.createElement('script')).src=getProtocol()+'://babm.texthelp.com/Bookmarklet.ashx?l=uk';}})();" href="#">Listen with BrowseAloud</a>
</div>

Step 5 :
Add styles to set position of link in CSS file (/httpdocs/joomla/templates/beez_20/css/general.css)
#website-audio-button {
    /*float: left;*/
    font-size: 12px;
    padding: 11px;
    text-align: center;
}  
#website-audio-button a {
    background: url("http://theram.ch/wordpress37/wp-content/uploads/2014/08/listen.jpg") no-repeat scroll 0 0 #ffffff;
    color: #4a8bca;
    padding: 5px 0 5px 28px;
    text-decoration: none;
}

Here “http://theram.ch/wordpress37/wp-content/uploads/2014/08/listen.jpg  is a link for speaker icon beside link.
Step 6 :
Now  BrowseAloud is ready to work with your site.
By clicking on link  Listen with BrowseAloud”,  one box appear on top –right corner of browser.

Click on Red button to start service.


Select text on webpage and click on Green play button.
Now you can hear selected text.
 
Step 7 :
There is some settings available with BrowseAloud.
You can access it by clicking on “Einstellungen” on top-right box.



March 19, 2014

Tax calculation including shipping as per law in the Netherland

Question:

 All I am running the WordPress 3.4.1 with the WooCommerce 1.5.8, as of this writing.
i just more confuse in Tax Amount I need help with a Woocommerce problem.
Woocommerce has a "taxable" status for shipping. This option should include tax calculation on shipping (which has to be shown by law in the Netherlands).
However I have selected this option, however the system only calculations tax on the items products, NOT on the shipping costs.
So the tax calculation should be: 21% of (product price + shipping costs) while now it is 21% of product price.
So the problem is,
the tax amount now is 21% of the product: 99.95 - (99.95/1.21) = 17.35. In the shipping settings in woocommerce you can set your shipping to be added to tax calculation (tax status: taxable).

If this option is selected, the tax calculation should actually be:
product costs + shipping costs / ((product costs + shipping costs)/1.21).
So the total of products + shipping = 105.90.
Which means the tax calculation should be 105.90 - (105.90/1.21) = 18.38
Right now
it calculates 99.95 - (99.95/1.21) =17.35
I would like it to calculate 105.90 -(105.90/1.22) = 18.38.

Answer :


Follow below steps..

1)Go to woocommerce > settings.

2)Under Tax tab,there are Tax Options and Tax rates links available.Under Tax options,select shipping tax class..!
3)In Tax rates,click on your  previously selected  tax class and just checked checkbox under shipping column..
So, Now your tax calculation is: 21% of (Cart Subtotal + shipping costs)..