tag:blogger.com,1999:blog-65127294914470245772024-02-19T02:58:46.471+01:00WordPress, WooCommerce, CMS | Windows and Office troubleshootingCustom codes, functions, solutions. My experiences from past years. IT Support. IT Services. As a Microsoft Technical Support Specialist I'm ready to help you to fix your PC. Also I'm going to cover some topics from world of CMSs and PHP.Anonymoushttp://www.blogger.com/profile/13623600521383989759noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-6512729491447024577.post-88220897086616091212016-08-02T18:35:00.000+02:002019-01-17T13:50:02.848+01:00Szállítási adatok exportálása MPL Címiratkitöltő programhoz WooCommerce-bőlA plugint a szathmari.hu oldalon található <a href="https://szathmari.hu/wordpress/15-pick-pack-pont-posta-pont-gls-csomagpont-woocommerce-szallitasi-modul">Pick Pack Pont, Posta Pont, GLS CsomagPont, FoxPost, Webox WooCommerce szállítási modul</a>-hoz készítettem el, amely azonban könnyen módosítható egyedi kérés alapján is.<br />
<br />
A plugin alapja a Viszt Péter által készített<a href="https://github.com/passatgt/wc-dpd-weblabel-export"> DPD Weblabel Export Wordpress plugin.</a><br />
<br />
Üdv.Anonymoushttp://www.blogger.com/profile/13623600521383989759noreply@blogger.com6tag:blogger.com,1999:blog-6512729491447024577.post-13615397014920425662016-02-19T17:01:00.002+01:002016-02-19T17:45:37.442+01:00How to change Woocommerce default ajax loader icon in Cart and CheckoutThis little snippet will going to change your loader icon in WooCommerce Cart and Checkout.<br />
<br />
In Cart you should see this icon when you update Shipping.<br />
In Checkout you see this when you update Shipping or Sending an Order.<br />
<br />
You should first create a new gif icon you want to use.<br />
I'm using this generator: <a href="http://preloaders.net/">PreLoaders.NET</a><br />
<br />
This is our .gif which size is 128px*128px. WooCommerce default loader is only 16px*16px which is pretty small.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrTytzXWtR8ltOZ0NRoXY-N1uz_1-kxZ8hBLL7I49Rg0FLvNMOWyYzAatILdBI7PEbznFdTPpIAzN3iPB1CZIW5IlNkOLDRBERUJ7VrXSJut7NZNonG4JWhWfwkmq_2Zx9GEBbltU4oglK/s1600/ajax-loader2.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrTytzXWtR8ltOZ0NRoXY-N1uz_1-kxZ8hBLL7I49Rg0FLvNMOWyYzAatILdBI7PEbznFdTPpIAzN3iPB1CZIW5IlNkOLDRBERUJ7VrXSJut7NZNonG4JWhWfwkmq_2Zx9GEBbltU4oglK/s320/ajax-loader2.gif" /></a></div><br />
The following code will change the loader in Cart and Checkout. If you need it only on CheckOut, delete the is_cart from if syntax. <b>Add the code to you themes functions.php file.</b><br />
<br />
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%">add_filter('woocommerce_ajax_loader_url', 'woo_custom_cart_loader');
function woo_custom_cart_loader() {
global $woocommerce;
if(is_checkout() || is_cart()){
return __(get_template_directory_uri().'/images/loader-ajax-new.gif', 'woocommerce');
}
else
return __(get_template_directory_uri().'/images/ajax-loader@2x.gif', 'woocommerce');
}
</pre></div><br />
The second thing you need to do is to increase the size of the loader icon, we told that this icon is only 16px*16px. So after uploading image to the themes /images folder or your custom places head to these files:<br />
<br />
To increase the Cart loader icon: /wp-content/plugins/woocommerce/assets/js/frontend/cart.min.js<br />
<br />
To increase the CheckOut loader icon: /wp-content/plugins/woocommerce/assets/js/frontend/checkout.min.js<br />
<br />
Search for 16px and change them to 128px. If you upgrade WooCommerce these changes are going to be lost :) so change them again! :)<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBsfILn5iCK3cUNXQElAdNngQ7VvKmWF7QBzt1BpXbIJEdB8RHe136wkm3CFUyoL93u4YrLS1cydcIEBuYOyWpiojWjL1rEUoF2cNb4sbsERr3QR7ZPz5Wi2wFE1dY_yx4S6O1PgZ4_-gQ/s1600/checkout.min.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBsfILn5iCK3cUNXQElAdNngQ7VvKmWF7QBzt1BpXbIJEdB8RHe136wkm3CFUyoL93u4YrLS1cydcIEBuYOyWpiojWjL1rEUoF2cNb4sbsERr3QR7ZPz5Wi2wFE1dY_yx4S6O1PgZ4_-gQ/s400/checkout.min.PNG" /></a></div>Anonymoushttp://www.blogger.com/profile/13623600521383989759noreply@blogger.com2tag:blogger.com,1999:blog-6512729491447024577.post-17109792799815072062016-02-11T16:48:00.000+01:002016-02-11T16:50:47.360+01:00Cleaning JavaScript Malware On Your Linux Server (Removing Javascript Between Two Points)So, I think everyone has faced this issue who has an own VPS server. Our problem was that sometimes every or some of JS files got infected. It can be a mass to delete the malware code from the files manually. <br><br>
So with the help of this article I have created my own code:
<a href="https://linuxacademy.com/blog/linux/cleaning-javascript-malware-on-your-linux-server-removing-javascript-between-two-points/">Linux Academy</a><br><br>
The problem was that this code worked when the exploit code has began and ended with the same value. But our newest infection was a little bit tricky. Every JS files has a different malware comment value in it. So I cant use the code from Linux Academy anymore.<br><br>
Sucuri have wroted about this infection: <a href="https://blog.sucuri.net/2016/02/massive-admedia-iframe-javascript-infection.html">Link</a><br><br>
The hackers injected encrypted code at the end of all legitimate .js files. Which seems like this (image from Sucuri):
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsxaxf3J9xtuYZyALW2ld2RwD9mn72nhjkVIW1fS5BYqsBA187nC7XNiGckZX4nxGSXJdQTVEDFsWRz9iFKSuMUmmyjVFar_oEG5Kw0j_MUrR9Oo8bWtpk1WKrUyN8wL3ZZk8MjSVVHVKQ/s1600/encrypted_admedia_injection.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsxaxf3J9xtuYZyALW2ld2RwD9mn72nhjkVIW1fS5BYqsBA187nC7XNiGckZX4nxGSXJdQTVEDFsWRz9iFKSuMUmmyjVFar_oEG5Kw0j_MUrR9Oo8bWtpk1WKrUyN8wL3ZZk8MjSVVHVKQ/s320/encrypted_admedia_injection.png" /></a></div>
I have struggled with this infection for a time. And I want to share my solution, which can remove this from every JS file within less then 5 seconds. Every command is called recursivily, so if you run it on public_html/ or www/ folder it will include wp-admin, wp-content, everything. The pattern in our case is a regular expression [a-z0-9]{32} means lowercase letters and numbers and exactly 32 times.<br><br>
<b>1. Search if there is a JS infection on your server, the -l switch will list only the file names</b>
<pre style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPC6CJpOBkmX_Sqw5UJc9dTuNeqEiLVJY51tcfPdVdE70qH5kG0OwGVzGmMMINXa9uw5bWMSimCNCTjofwC61RqO798rgoOjSNClPPBO40KVjpQIivnQk4eF6ogpj-4KxC6MEHb4oE8FQo/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> find . -name "*.js" | xargs grep -E "\/\*[a-z0-9]{32}\*\/" -l | sort
</code></pre>
<br>
<b>2. Add a new line character before the pattern, this is very important, sed can only delete lines from files upwards.</b>
<pre style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPC6CJpOBkmX_Sqw5UJc9dTuNeqEiLVJY51tcfPdVdE70qH5kG0OwGVzGmMMINXa9uw5bWMSimCNCTjofwC61RqO798rgoOjSNClPPBO40KVjpQIivnQk4eF6ogpj-4KxC6MEHb4oE8FQo/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> find . -name "*.js" -exec sed -i "s/\/\*[a-z0-9]\{32\}\*\//\n&/g" '{}' \;
</code></pre>
<br>
<b>3. Finally delete the malware code from all infected JS files:</b>
<pre style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPC6CJpOBkmX_Sqw5UJc9dTuNeqEiLVJY51tcfPdVdE70qH5kG0OwGVzGmMMINXa9uw5bWMSimCNCTjofwC61RqO798rgoOjSNClPPBO40KVjpQIivnQk4eF6ogpj-4KxC6MEHb4oE8FQo/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> find . -name "*.js" -exec sed -i "/[a-z0-9]\{32\}/,/[a-z0-9]\{32\}/d" '{}' \;
</code></pre>
<br>
Before you try this please test it on one file, i have a CentOS server installed.
<br>
I have found three backdoors installed with the help of access_logs and blocked the IPs in our firewall.<br>
/wp-content/plugins/yith-woocommerce-ajax-search/widgets/class44a.php<br>
/wp-content/languages/admin-network-hu_HU182a1.php<br>
/wp-cont.php<br>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimRcVYP_KnJxSiCM_1ddVC95XlF8Qz_vY_fX79hhd3S1FeX60yTf1gd5nkeGsr8_3P4yhDxFo05eL2PFakdCPF3IZ0ll5f-1IvVEpGIlNgqKbvMkjLD4Ky87pYeUsMZUr_XwCaJNdDWvF0/s1600/access_log.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimRcVYP_KnJxSiCM_1ddVC95XlF8Qz_vY_fX79hhd3S1FeX60yTf1gd5nkeGsr8_3P4yhDxFo05eL2PFakdCPF3IZ0ll5f-1IvVEpGIlNgqKbvMkjLD4Ky87pYeUsMZUr_XwCaJNdDWvF0/s400/access_log.JPG" /></a></div>
<br>
I hope this helps someone.
<br><br>
Regards,
PeterAnonymoushttp://www.blogger.com/profile/13623600521383989759noreply@blogger.com0tag:blogger.com,1999:blog-6512729491447024577.post-1228126971032399632015-06-05T17:21:00.003+02:002015-06-05T17:21:43.071+02:00Translate MailChimp signup forms and emailsThere is an easy solution for this. MailChimp is natively translated to almost 40 languages.
Just follow the instructions on the link below:
<a href="http://kb.mailchimp.com/lists/signup-forms/translate-signup-forms-and-emails#Translate-your-forms-and-response-emails">http://kb.mailchimp.com/lists/signup-forms/translate-signup-forms-and-emails#Translate-your-forms-and-response-emails</a>Anonymoushttp://www.blogger.com/profile/13623600521383989759noreply@blogger.com0tag:blogger.com,1999:blog-6512729491447024577.post-63792539381475594782015-05-03T16:31:00.003+02:002015-05-03T16:35:42.056+02:00Update Facebook Sharer Cache automatically on Page LoadSo I have this problem on my one of my clients website. The Facebook cache was not updateed correctly. And no images was loaded. I know that in every 24 hour the cache is updated. But I need this to be done automatically on page load now.
This solution is good for WordPress and WooCommerce too.
Add this to your <b>functions.php</b> file and the Sharer Cache will be updated on page load.
<!-- HTML generated using hilite.me --><div style="background: #f8f8f8; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%">add_action( 'wp_footer', 'fb_sharer_updater', 5 );
if(!function_exists('fb_sharer_updater')) {
function fb_sharer_updater() {
global $post;
echo '<script type="text/javascript">
jQuery.post(
"https://graph.facebook.com",
{
id: "'. get_permalink() .'",
scrape: true
},
function(response){
console.log(response);
}
);';
echo '</script>';
}
}
</pre></div>
You need to wait approx 5seconds, then the new scrape info is added to FB cache.
Open Developer Console and you will see additional information:
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a61717; background-color: #e3d2d2">Object</span> {<span style="color: #a61717; background-color: #e3d2d2">url:</span> <span style="color: #000080; font-weight: bold">"http://theblackcat.sk/produkt/plazove-saty-texas-s-5995/"</span>, <span style="color: #a61717; background-color: #e3d2d2">type:</span> <span style="color: #000080; font-weight: bold">"article"</span>, <span style="color: #a61717; background-color: #e3d2d2">title:</span> <span style="color: #000080; font-weight: bold">"Plážové šaty Texas S-5995 - TheBlackCat.sk"</span>, <span style="color: #a61717; background-color: #e3d2d2">locale:</span> <span style="color: #a61717; background-color: #e3d2d2">Object,</span> <span style="color: #a61717; background-color: #e3d2d2">image:</span> <span style="color: #a61717; background-color: #e3d2d2">Array[1]…</span>}
<span style="color: #a61717; background-color: #e3d2d2">description:</span> <span style="color: #0000FF">"Ľahučké plážové šaty so vzorom, s viazaním na boku. Plážové šaty odporúčame ku všetkým bikinám Texas 2015 ako doplnka."</span>
<span style="color: #a61717; background-color: #e3d2d2">id:</span> <span style="color: #0000FF">"1532012490185775"</span>
<span style="color: #a61717; background-color: #e3d2d2">image:</span> <span style="color: #a61717; background-color: #e3d2d2">Array</span>[<span style="color: #0000FF">1</span>]
<span style="color: #a61717; background-color: #e3d2d2">locale:</span> <span style="color: #a61717; background-color: #e3d2d2">Object</span>
<span style="color: #a61717; background-color: #e3d2d2">site_name:</span> <span style="color: #0000FF">"TheBlackCat.sk"</span>
<span style="color: #a61717; background-color: #e3d2d2">title:</span> <span style="color: #0000FF">"Plážové šaty Texas S-5995 - TheBlackCat.sk"</span>
<span style="color: #a61717; background-color: #e3d2d2">type:</span> <span style="color: #0000FF">"article"</span>
<span style="color: #a61717; background-color: #e3d2d2">updated_time:</span> <span style="color: #0000FF">"2015-05-03T14:23:15+0000"</span>
<span style="color: #a61717; background-color: #e3d2d2">url:</span> <span style="color: #0000FF">"http://theblackcat.sk/produkt/plazove-saty-texas-s-5995/"</span>
<span style="color: #a61717; background-color: #e3d2d2">__proto__:</span> <span style="color: #a61717; background-color: #e3d2d2">Object</span>
</pre></div>
Anonymoushttp://www.blogger.com/profile/13623600521383989759noreply@blogger.com0tag:blogger.com,1999:blog-6512729491447024577.post-92074787968210401952015-01-31T17:30:00.001+01:002015-02-01T11:56:31.415+01:00Adding TinyCon library to WooCommerce - Show products in cart count on the faviconI just came across with a solution for implementing TinyCon with WooCommerce. I use this super-easy, leightweight library to display cart quantity on the favicon.<br />
<br />
You need to edit file footer.php in your theme, you find this in most cases:<br />
<br />
/wp-content/themes/xxxxxx/footer.php<br />
<br />
What you need to add first is the TinyCon JS library. Download it from [Github][1].<br />
<br />
Then you need to call this library and add the cart quantity to display it on the favicon. Add this code before the </body> tag.<br />
<br />
My code with explanation:<br />
<br />
<!-- HTML generated using hilite.me --><div style="background: #f8f8f8; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #000000"> </span><span style="color: #8f5902; font-style: italic"><?php</span> <span style="color: #204a87; font-weight: bold">global</span> <span style="color: #000000">$woocommerce</span><span style="color: #000000; font-weight: bold">;</span> <span style="color: #8f5902; font-style: italic">//you need this for het the cart quantity</span>
<span style="color: #000000">$my_cart_count</span> <span style="color: #ce5c00; font-weight: bold">=</span> <span style="color: #000000">$woocommerce</span><span style="color: #ce5c00; font-weight: bold">-></span><span style="color: #c4a000">cart</span><span style="color: #ce5c00; font-weight: bold">-></span><span style="color: #c4a000">cart_contents_count</span><span style="color: #000000; font-weight: bold">;</span> <span style="color: #8f5902; font-style: italic">//get the quantity</span>
<span style="color: #8f5902; font-style: italic">?></span><span style="color: #000000"></span>
<span style="color: #000000"> <script src="</span><span style="color: #8f5902; font-style: italic"><?php</span> <span style="color: #000000">bloginfo</span><span style="color: #000000; font-weight: bold">(</span><span style="color: #4e9a06">'stylesheet_directory'</span><span style="color: #000000; font-weight: bold">);</span> <span style="color: #8f5902; font-style: italic">?></span><span style="color: #000000">/includes/js/tinycon.min.js" type="text/javascript"></script> //call the TinyCon library</span>
<span style="color: #000000"> <script type="text/javascript"></span>
<span style="color: #000000"> Tinycon.setOptions({</span>
<span style="color: #000000"> width: 7,</span>
<span style="color: #000000"> height: 9,</span>
<span style="color: #000000"> font: '10px arial',</span>
<span style="color: #000000"> colour: '#ffffff',</span>
<span style="color: #000000"> background: '#e01c1f',</span>
<span style="color: #000000"> fallback: true</span>
<span style="color: #000000"> });</span>
<span style="color: #000000"> </script></span>
<span style="color: #000000"> </span><span style="color: #8f5902; font-style: italic"><?php</span> <span style="color: #204a87; font-weight: bold">if</span> <span style="color: #000000; font-weight: bold">(</span><span style="color: #000000">$my_cart_count</span> <span style="color: #ce5c00; font-weight: bold">></span> <span style="color: #0000cf; font-weight: bold">0</span><span style="color: #000000; font-weight: bold">)</span> <span style="color: #ce5c00; font-weight: bold">:</span> <span style="color: #8f5902; font-style: italic">//if cart has products in it display bubble by default.</span>
<span style="color: #8f5902; font-style: italic">?></span><span style="color: #000000"></span>
<span style="color: #000000"> <script type="text/javascript"></span>
<span style="color: #000000"> </span>
<span style="color: #000000"> Tinycon.setBubble(</span><span style="color: #8f5902; font-style: italic"><?php</span> <span style="color: #204a87; font-weight: bold">echo</span> <span style="color: #000000">$my_cart_count</span><span style="color: #000000; font-weight: bold">;</span> <span style="color: #8f5902; font-style: italic">?></span><span style="color: #000000">);</span>
<span style="color: #000000"> </span>
<span style="color: #000000"> </script></span>
<span style="color: #000000"> </span><span style="color: #8f5902; font-style: italic"><?php</span>
<span style="color: #204a87; font-weight: bold">endif</span><span style="color: #000000; font-weight: bold">;</span>
<span style="color: #8f5902; font-style: italic">?></span><span style="color: #000000"></span>
<span style="color: #000000"> // this part is needed if you use AJAX add to cart in WooCommerce, this will ensure when if you click on AJAX add to cart button the bubble is updated correctly.</span>
<span style="color: #000000"> <script type="text/javascript"></span>
<span style="color: #000000"> var darab = </span><span style="color: #8f5902; font-style: italic"><?php</span> <span style="color: #204a87; font-weight: bold">echo</span> <span style="color: #000000">$my_cart_count</span><span style="color: #000000; font-weight: bold">;</span> <span style="color: #8f5902; font-style: italic">?></span><span style="color: #000000">;</span>
<span style="color: #000000"> </span>
<span style="color: #000000"> jQuery('.add_to_cart_button').bind('click',function() {</span>
<span style="color: #000000"> </span>
<span style="color: #000000"> darab = darab + 1 ;</span>
<span style="color: #000000"> </span>
<span style="color: #000000"> Tinycon.setBubble(darab); </span>
<span style="color: #000000"> });</span>
<span style="color: #000000"> </span>
<span style="color: #000000"> </script></span>
</pre></div>
<br />
<br />
[1]: https://github.com/tommoor/tinyconAnonymoushttp://www.blogger.com/profile/13623600521383989759noreply@blogger.com1tag:blogger.com,1999:blog-6512729491447024577.post-58220037393860764342015-01-15T13:29:00.000+01:002015-01-15T13:34:06.244+01:00WooCommerce + WordPress new line issue with MandrillAs I stated in previous topic after installing Mandrill my WordPress text/plain emails doesnt contain new line breaks, because they are coded with <b>/n/r</b> code.<br />
<br />
There is an option in settings of Mandrill, that you can:<br />
<span style="background-color: white; color: #444444; font-family: 'Open Sans', sans-serif; font-size: 13px; line-height: 18.2000007629395px;">Replace all line feeds ("\n") by <br/>in the message body?</span><br />
<span style="background-color: white; color: #444444; font-family: 'Open Sans', sans-serif; font-size: 13px; line-height: 18.2000007629395px;"><br /></span>
But if you enable this the WooCommerce emails are going to be ugly, because they are already HTML emails, not just plain text emails, which are sended out by WordPress by default.<br />
<br />
To solve the issue you need to use the mandrill_playload hook which is just fired before an email sents out.<br />
<blockquote class="tr_bq">
<pre style="background-color: #eeeeee; border-radius: 4px; color: #777777; font-family: monospace, serif; font-size: 18px; line-height: 23.3999996185303px; margin-bottom: 1em; margin-top: 1em; padding: 10px 15px;"><code style="font-family: monospace, serif; font-size: 1em;">add_filter('mandrill_payload', 'customFilterName');</code></pre>
</blockquote>
More about this filter: <a href="http://blog.mandrill.com/own-your-wordpress-email-with-mandrill.html" target="_blank">http://blog.mandrill.com/own-your-wordpress-email-with-mandrill.html</a><br />
<br />
What you need to do is select the type of emails with tags which are plain/text emails only.<br />
<br />
You need to get the tags from your <a href="https://mandrillapp.com/activity" target="_blank">Mandrill admin</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkSPtcedvlEp7NEW7Hce4ArWID-j_y0UAFo8BB1guEu1VUA8mlPIDRVAcTg1EB-L9TTn0Z5guMn7FGvsDOT_TaDPoK6a9IQKUD_lqAWNTsGMrDye884DRY76GTBgKJfT618VPSMf1O2fNb/s1600/mandrill.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkSPtcedvlEp7NEW7Hce4ArWID-j_y0UAFo8BB1guEu1VUA8mlPIDRVAcTg1EB-L9TTn0Z5guMn7FGvsDOT_TaDPoK6a9IQKUD_lqAWNTsGMrDye884DRY76GTBgKJfT618VPSMf1O2fNb/s1600/mandrill.PNG" height="320" width="145" /></a></div>
<br />
As you can see, these are the tags in my case.<br />
<br />
The wp_WC_Email->send work just fine, because this is the tag for WooCommerce store emails, these are coded with text/html.<br />
<br />
What I needed to add is: <b>wp_userpro_mail, wp_template-contact.php</b> and <b>wp_wp_new_user_notification</b>, because these are encoded only in text/plain.<br />
<br />
To bypass this and insert correct line breaks tags you just to need to add the following to your <b>functions.php</b> in your theme.<br />
<br />
<pre style="background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPC6CJpOBkmX_Sqw5UJc9dTuNeqEiLVJY51tcfPdVdE70qH5kG0OwGVzGmMMINXa9uw5bWMSimCNCTjofwC61RqO798rgoOjSNClPPBO40KVjpQIivnQk4eF6ogpj-4KxC6MEHb4oE8FQo/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> /*************************************************************************/
/*WPMandrill playload, add <br> to emails*/
/*************************************************************************/
function wd_mandrill_woo_order( $message ) {
$tags = $message['tags']['automatic'];
if ( (in_array( 'wp_template-contact.php', $tags )) || (in_array( 'wp_userpro_mail', $tags )) || (in_array( 'wp_wp_new_user_notification', $tags )) ) {
$message['html'] = nl2br( $message['html'] );
}
return $message;
}
add_filter( 'mandrill_payload', 'wd_mandrill_woo_order' );
</code></pre>
<br />
The key functions here is the nl2br which just returns string with '<br />' or '<br>' inserted before all newlines (\r\n, \n\r, \n and \r).<br />
<br />
After this little code snippet every system emails from WordPress are correctly displayed :)))<br />
<br />
Maybe someone is facing the same issue and I helped him with this :).<br />
<br />Anonymoushttp://www.blogger.com/profile/13623600521383989759noreply@blogger.com1tag:blogger.com,1999:blog-6512729491447024577.post-63129007991831176602015-01-15T13:14:00.002+01:002015-01-15T13:14:30.677+01:00WooCommerce emails ending up in SPAM - Enable wpMandrill in WordPress and WooCommerceSo, we have a VPS server with e-mail server installed.<br />
<br />
By default e-mails from Wordpress and WooCommerce are send out with wp_mail() function. We have problems with that because our store emails are ended up in SPAM folder.<br />
<br />
I have read and troubleshoot couple of hours. Added DKIM and SPF to domain, etc.<br />
<br />
But I think this is never gonna get end.<br />
<br />
Finally I have found service SMTP server Mandrill, which is developed and maintained by folks from MailChimp :). This thing is amazing, you can track openings, clicks, everything... what was the content of the email. It was delivered or not?<br />
<br />
For installing the plugin you just need to download <a href="https://wordpress.org/plugins/wpmandrill/" target="_blank">wpMandrill </a>plugin within Wordpress or from WP plugin page.<br />
<br />
After install you just need to go to: <b>Settings -> Mandrill </b><br />
There is a good guide on this page: <a href="https://connect.mailchimp.com/how-to/53" target="_blank">https://connect.mailchimp.com/how-to/53</a><br />
<span id="goog_1165892617"></span><span id="goog_1165892618"></span><a href="https://www.blogger.com/"></a><br />
<ol>
<li>First you are asked to create an API key. Register and visit this page: <a href="https://mandrillapp.com/settings" target="_blank">https://mandrillapp.com/settings</a><br /></li>
<li>Click on + New API key button</li>
<li>Then setup the plugin.</li>
</ol>
<div>
After installing everything just works out of the box. Our store emails are now correctly received in Gmail INBOX and not in the SPAM folder.</div>
<div>
<br /></div>
<div>
Mandrill is able to send 12 000 emails/month for free, but the pricing above that is also good :).</div>
<div>
<br /></div>
<div>
If you ever face the issue that your WooCommerce store emails are ended up in SPAM, you aren't able to get it work as me install <b>Mandrill</b>, take a seat, and enjoy your work! :)</div>
<div>
<br /></div>
<div>
One issue what I have found and going to cover in other topic is this:</div>
<div>
<div style="background-color: white; color: #333333; font-family: sans-serif; font-size: 13px; line-height: 22px; margin-bottom: 11px; padding: 0px;">
WordPress standard emails (password reset, etc.) are plain-text-ish with /n/r code. They look better when we check "Replace all line feeds ("\n") by<br />in the message body"</div>
<div style="background-color: white; color: #333333; font-family: sans-serif; font-size: 13px; line-height: 22px; margin-bottom: 11px; padding: 0px;">
Woocommerce sends nice HTML. They look worse when we check "Replace all line feeds ("\n") by<br />in the message body"</div>
</div>
<div>
<br /></div>
<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/13623600521383989759noreply@blogger.com5tag:blogger.com,1999:blog-6512729491447024577.post-88350699444064462552014-05-27T22:09:00.001+02:002014-05-27T22:09:32.723+02:00Watch Dogs freezes when clicking on New GameI have installed Watch Dogs through UPlay. Everything installed fine, then I have launched the game make some changes in settings and clicked New Game.<br />
<br />
Now Watch Dogs freezes out and cannot continue.<br />
<br />
As a former MS Technical Supporter my first way taked too Event Viewer :).<br />
<br />
Here I have found the following:<br />
<br />
<pre>A hibát okozó alkalmazás neve: Watch_Dogs.exe, verzió: 0.1.0.1, időbélyeg: 0x537507a1
A hibát okozó modul neve: MSVCR100.dll, verzió: 10.0.40219.1, időbélyeg: 0x4d5f034a
Kivételkód: 0xc0000005
Hiba pozíciója: 0x000000000003c1be
A hibát okozó folyamat azonosítója: 0x19d8
A hibát okozó alkalmazás indításának időpontja: 0x01cf79da732f09e5
A hibát okozó alkalmazás elérési útja: E:\Uplay\games\Watch_Dogs\bin\Watch_Dogs.exe
A hibát okozó modul elérési útja: C:\WINDOWS\SYSTEM32\MSVCR100.dll
Jelentés azonosítója: df8603ad-e5cd-11e3-802f-1c6f65caa9f3
A hibát okozó csomag teljes neve:
A hibát okozó csomag relatív alkalmazásazonosítója: </pre>
<br />
What means that the problem is whit VCredist.
Anonymoushttp://www.blogger.com/profile/13623600521383989759noreply@blogger.com0tag:blogger.com,1999:blog-6512729491447024577.post-53731359261459438792013-11-09T22:42:00.002+01:002013-11-09T22:45:14.513+01:00How to remove K2 /item/ and item ID from URL You need to open Joomla Administrator backend.<br />
<br />
Go to: Components - K2 - Parameters<br />
Search for the Advanced Tab then turn on Advanced SEF.<br />
<br />
See the picture.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIEZP6rCEhng89Nb_D-UNR8G4eStuNPaxamT-WcR0zJpSjGIDfv1EInbuT6SpL71VEwJmeEJqUxQLv0VPS-aPMG0_QeGXhHmMoJN4M7rh7MhN-R0Nb0AFAAEB7p7a1iEq66_ylw54nFa-w/s1600/k2-advenced-sef.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIEZP6rCEhng89Nb_D-UNR8G4eStuNPaxamT-WcR0zJpSjGIDfv1EInbuT6SpL71VEwJmeEJqUxQLv0VPS-aPMG0_QeGXhHmMoJN4M7rh7MhN-R0Nb0AFAAEB7p7a1iEq66_ylw54nFa-w/s1600/k2-advenced-sef.png" height="255" width="400" /></a></div>
<br />
<br />
Enjoy your clean URLs:<br />
<span style="background-color: #eeeeee;"><span style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px;">com/shop/</span><strong style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin: 0px; padding: 0px;">item/6-</strong><span style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px;">name is replaced with this:</span></span><br />
<span style="background-color: #eeeeee;"><span style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px;">com/shop/</span><span style="color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px;">name</span></span>Anonymoushttp://www.blogger.com/profile/13623600521383989759noreply@blogger.com0tag:blogger.com,1999:blog-6512729491447024577.post-91152728287329376842013-10-29T19:10:00.000+01:002013-10-29T19:10:02.337+01:00How to remove watermark "Secure Boot isn't configured correctly" in Windows 8.1Microsoft has released an <a href="http://search.microsoft.com/en-us/DownloadResults.aspx?rf=sp&q=KB2902864">update </a>for this issue.<br />
<br />
Download and install it and the watermark should be gone! :)Anonymoushttp://www.blogger.com/profile/13623600521383989759noreply@blogger.com0tag:blogger.com,1999:blog-6512729491447024577.post-39144176144845398422013-10-18T15:29:00.000+02:002013-10-18T21:51:07.259+02:00After upgrading to Windows 8.1 iCloud sync is not working in Outlook 2010If you click on iCloud folder or Contacts in Outlook 2010 the following error message appears:<br />
<span style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif; font-size: 12px; line-height: 18px;">"</span><span style="background-color: #edf3fe; border: 0px; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif; font-size: 12px; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline;">The set of folders cannot be opened. The information store could not be opened.</span><span style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif; font-size: 12px; line-height: 18px;">"</span><br />
<br />
Solution:<br />
<br />
<ul>
<li>You need to uninstall the iCloud Control Panel completely from Control Panel.</li>
<li>Restart PC.</li>
<li>Install the <a href="http://support.apple.com/kb/DL1455">newest iCloud Control Panel</a>. Log-in.</li>
<li>Sync is working now again!!!</li>
</ul>
Anonymoushttp://www.blogger.com/profile/13623600521383989759noreply@blogger.com1tag:blogger.com,1999:blog-6512729491447024577.post-37245740748683401392013-10-16T19:51:00.004+02:002013-10-19T23:43:47.895+02:00Windows 8 language pack won't installThis problem is caused by corrupted files in WinSXS folder. This folder is very important for the system.<br />
You should manage to fix issues in there with a simple command in Windows 8.<br />
<br />
Steps:<br />
<br />
<ul>
<li>Press <b>Win + X</b> then choose <b>Command Prompt (Admin)</b> - we need admin priviligies to run the command.<br />You now should see a black box with a prompt, please enter the following command:<br /><b>dism /online /cleanup-image /restorehealth</b></li>
<li>It should take very long time to do that (30~60 minutes, it's depend on the corruption).</li>
<li>You can find the log file in folder: <b>%windir%\Logs\DISM\dism.log</b>Please scroll to the bottom, if there was no error you should see something like:</li>
</ul>
<br />
<br />
Checking System Update Readiness.<br />
<br />
<br />
Summary:<br />
Operation: Detect and Repair<br />
Operation result: 0x0<br />
Last Successful Step: Entire operation completes.<br />
Total Detected Corruption:<span class="Apple-tab-span" style="white-space: pre;"> </span>0<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>CBS Manifest Corruption:<span class="Apple-tab-span" style="white-space: pre;"> </span>0<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>CBS Metadata Corruption:<span class="Apple-tab-span" style="white-space: pre;"> </span>0<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>CSI Manifest Corruption:<span class="Apple-tab-span" style="white-space: pre;"> </span>0<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>CSI Metadata Corruption:<span class="Apple-tab-span" style="white-space: pre;"> </span>0<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>CSI Payload Corruption:<span class="Apple-tab-span" style="white-space: pre;"> </span>0<br />
Total Repaired Corruption:<span class="Apple-tab-span" style="white-space: pre;"> </span>0<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>CBS Manifest Repaired:<span class="Apple-tab-span" style="white-space: pre;"> </span>0<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>CSI Manifest Repaired:<span class="Apple-tab-span" style="white-space: pre;"> </span>0<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>CSI Payload Repaired:<span class="Apple-tab-span" style="white-space: pre;"> </span>0<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>CSI Store Metadata refreshed:<span class="Apple-tab-span" style="white-space: pre;"> </span>True<br />
<br />
<br />
If there was an error you can see which files are corrupted and how much of them the system can fix. You need to replace the corrupted files with the correct ones but this is for another topic.<br />
<br />Anonymoushttp://www.blogger.com/profile/13623600521383989759noreply@blogger.com0tag:blogger.com,1999:blog-6512729491447024577.post-69647392454960637022013-10-16T19:31:00.004+02:002013-10-16T19:31:59.497+02:00How to install Creative Live! Cam Vista IM (VF0260) on Windows 7Many people have problems installing this webcam from Creative.<br />
<br />
Suddenly Creative have dropped the support for this webcam and there are no Windows 7 drivers for this webcam.<br />
<br />
With little magic we can install this webcam on Windows 7 OS.<br />
<br />
Steps you need to do:<br />
<br />
<ul>
<li>Download the <a href="http://support.creative.com/downloads/download.aspx?nDownloadId=10164">driver for Vista</a>.</li>
<li>Download <b>7-ZIP</b> or <b>Win-RAR</b>, click with right-click on <b>LCVA_PCDrv_US_1_11_02.exe</b> file then choose <b>Extract here...</b></li>
<li>Open the folder and find <b>setup.exe</b> file.</li>
<li>Click on the <b>.exe</b> with right click and choose <b>Properties</b>.</li>
<li>After that you need to set the Compatibility mode. Click on <b>Compatibility</b>, choose <b>Windows Vista (Serivce Pack 2)</b>. Click <b>OK</b>.</li>
<li>Run the installer with <b>setup.exe</b>. Wait then Reboot the system.</li>
<li>The Windows Live! Cam Vista IM (VF0260) now should work flawlessly :).</li>
</ul>
<br />
<br />
Enjoy!Anonymoushttp://www.blogger.com/profile/13623600521383989759noreply@blogger.com1tag:blogger.com,1999:blog-6512729491447024577.post-16320925660989487762013-10-09T10:40:00.000+02:002013-10-16T19:38:17.396+02:00If downloading or upgrading apps from Windows Store i get error code 0x80240437This problem is caused by corrupted Software Distribution folder.<br />
<br />
Steps for troubleshooting:<br />
<br />
<br />
<ul>
<li>You need to stop <b>BITS </b>and <b>Windows Update</b> services:<br />Press <b>Win + R</b> and type <b>services.msc</b> command then hit <b>ENTER</b>.<br />Find <b>Windows Update</b> and <b>Background Intellingent Transfer Service</b>. Stop these services.</li>
<li>Then go to: <b>%windir%</b> and rename folder <b>SoftwareDistribution </b>to <b>SoftwareDistribution2</b></li>
<li>Go back to services and turn on the disabled services.</li>
<li>Check Windows Store and install/upgrade apps again!</li>
</ul>
<br />
<br />Anonymoushttp://www.blogger.com/profile/13623600521383989759noreply@blogger.com1