Posted on Leave a comment

Hide coupon on cart page only – WooCommerce

WooCommerce

To hide coupon on cart page for WooCommerce add the following code in the functions.php file:

Additionally, if you want to remove the coupon on the checkout page, add the following code in the functions.php file:

 

Posted on 1 Comment

How to increase WooCommerce page speed – wc-ajax=get_refreshed_fragments

WooCommerce - Wordpress

The “wc-ajax=get_refreshed_fragments” is used by WooCommerce to update the cart when users go to a cached page. Since WooCommerce is a resource intensive plugin which may use lots of server resources to load all relevant styles and scripts, it make sense to dequeue all WooCommerce related stuff on the blog posts or home page. Basically, you will allow WooCommerce scripts to run on shop relevant pages, allowing all other pages to load faster.

Solution provided  by alenabdula on gist.github.com. Add the following code to your functions.php file

Other things you can try to increase speed

Stop Heartbeat API

Add this code to functions.php file of your theme.

Note: stopping the heartbeat API will disable the auto save and revisions (you will have to manually Save Draft to save your content). Also, you will not see any real-time stats if any of your installed plugin uses the heartbeat API to update their content from the server.

Increase WP Memory

You should also increase WP memory to 256 MB. Add the following code to your wp-config.php file:

 

Posted on Leave a comment

WooCommerce: Automatically Complete all Orders

WooCommerce
WooCommerce

By default, WooCommerce orders are saved as Processing. Only orders that contain “downloadable” products are automatically completed upon payment. In case you sell virtual products you may want to automatically complete all orders as they arrive, saving you a lot of time by not manually approve/complete orders.

There are some plugins available you can use to let WooCommerce process orders automatically if the they payment is complete. However, there is an easier way to do this by using a snippet. Just add the following code to the end of your functions.php file which is located in “wp-content/themes/your-theme-name/”, or  “wp-content/themes/your-child-theme-name/” if you are using a child theme:

The above method works only for online payments (PayPal and Credit cards gateway payments). If you are using BACS (direct bank transfer), Cheque or COD (cash on delivery) payment methods  you would need to implement a conditional code based on selected payment method – i.e. if the selected payment method IS NOT BACS, COD or Cheque then apply the above snippet to automatically complete order.

Using the above updated snippet the BACS, COD and Cheque payment methods will be ignored and keep their original status, and will automatically complete orders for paid orders only.

 

Posted on Leave a comment

WhatPulse on Ubuntu

WhatPulse on Linux

Installing WhatPulse on Ubuntu (or on any other Linux distribution) is not as easy as installing it on Windows or Mac. Here is the procedure I use every time I have to install it.
[block id=”responsive-ads-inside-posts”]

First you need to download the binaries from the official WhatPulse site (http://whatpulse.org/downloads/) and extract the files into a folder. You will have to install the dependencies using the terminal. These dependencies are required to allow WhatPulse gather different stats (i.e. network stats):

You will need to run the the setup-input-permissions.sh script and follow the instructions:

[block id=”google-ads”]
Make sure you add your username when requested and select Yes for other questions. Press Ctrl + C to finish the installation.

What to do if network traffic is not captured

In case your network stats are not captured (network traffic is monitored but not captured) you will be asked if you want to fix it automatically. If you still have issues, then you need to tun the following command (CD to the executable directory in a terminal):

Now restart WhatPulse and everything should be OK.

 

 

Posted on 1 Comment

Evernote on Linux Mint or Ubuntu

Evernote Logo

 

Even if there is no official client available for Linux, you can still install Evernote via Wine. If you don’t have Wine installed already just paste the commands below in a terminal.

Install Wine

Once Wine is installed you can install Evernote. First you have to download it from Evernote website: https://evernote.com/download/get.php?file=Win

Install Evernote on Linux Mint 

Once the installtion file has been downloaded paste the command below in a terminal:

The download location and file name will be different, so make sure you change /home/nicu/Downloads/Evernote_5.8.13.8152.exe accordingly.

Follow the installation wizard and you are ready to go.

 
Posted on 7 Comments

Install OneDrive on Ubuntu based distros

If you are migrating from Windows and you used OneDrive to sync your files, like I did, a wise step is to install OneDrive-D which is a Microsoft OneDrive desktop client / daemon on Linux, written in Python 3.

Install OneDrive on Ubuntu

First you need to download the zip file from github. Extract the zip file and run the install.sh script inside onedrive-d folder. Run the following command in a Terminal:

I am using Elementary Freya and I got an error:  

Cannot Install OneDrive-D

In case you get the same error (./inst: command not found) drag and drop install.sh in your terminal and type sudo ./install.sh

Run install.sh for OneDrive-D

After OneDrive-D is successfully installed run command onedrive-pref to setup the application. 

 There are 4 steps in the configuration process, but the most import is the first one, to authorize sign in with your OneDrive account. You need to click on the URL provided and after you authenticate with your OneDrive credentials you will end up at an empty page – just copy the URL and paste it in your Terminal.

Authorize sign in with your OneDrive account

For next steps you can select n and use default settings

Finish installing OneDrive on Ubuntu

After finishing the OneDrive configuration run command onedrive-d start to start syncing your OneDrive files.

 Notes: 

  1. Files and folders deleted locally can be found in Trash and files and folders deleted remotely can be found in OneDrive recycle bin.
  2. Files that are overwritten remotely may not be synced, because OneDrive-D performs overwriting only when it is 100% sure that one file is older than its counterpart.
  3. Copying and moving files are treated as uploading and when you copy/ or move a folder OneDrive-D will upload the entire folder.

I still need to figure out how to enable it in top panel. On Elementary Freya I have the same issue with Dropbox, even though both apps work and sync as they should.

Posted on 5 Comments

Radio Tray Is Not Working in Elementary Freya

About Radio Tray

Radio Tray is an online radio streaming player with a minimal interface that allows you to listen to online radio stations. This is not a replacement for your media player, it’s an applet that sits on the top panel and allows you to quickly switch between your favorite stations – read more about it on the Radio Tray project page. However, Radio Tray is not working in Elementary Freya after final release.

To install it open a Terminal and paste the following command:

Radio Tray is not working? Let’s fix it

By default in SysTray.py there is a call to gtk.gdk.threads_init() which should be commented (thanks to 3vi1). To do this we need need to edit SysTray.py – type the following commands in Terminal:

Then press Ctrl+W to search for gtk.gdk.threads_init() and add a # in front of it to comment it.
[block id=”responsive-ads-inside-posts”]

Radio Tray is not working - Edit SysTray.py

Now press Ctrl+O to save the changes (WriteOut), leave the File Name Write as it is and hit Enter. Press Ctrl+X to close the file and now you can enjoy Radio Tray.

Radio Tray on Elementary Freyajpg

An alternative for Radio Tray you can use Great Little Radio Player, which has a smart looking GUI and over 500 radio stations of different genres from different countries.

Posted on 7 Comments

How to create bootable Windows USB in Linux Mint

WinUSB - create Bootable Windows USB

If you need to create a bootable Linux USB stick from Linux Mint it is very easy, just right click on the image file and select Make Bootable USB Stick option. However, if you need a bootable Windows USB you cannot use the same method because it will not work. So, you need another tool for this: WinUSB.

WinUSB allows you to create bootable Windows USB stick from an ISO image or a DVD – Windows 7 or Windows 8.

WinUSB - create Bootable Windows USB

Installing WinUSB on Linux Mint 15

WinUSB package includes two programs:

  • WinUSB-gui: a graphical interface which is very easy to use.
  • winusb: the command line tool.

To install WinUSB open your terminal and paste the following commands:

Open WinUSB and select the source (from a disk image – ISO, or from a CD/DVD) then select the target device (if you have several USB sticks connected they are automatically recognized and displayed in the Target device section). Click Install and wait for the image file to be written.

Now you will be able to create bootable Windows USB in Linux Mint. This also works for Ubuntu users.

Installing WinUSB in Ubuntu 14.04

First you need to download the files:

For 32-bit:

For 64-bit:

Then run the following command to install it:

Fix dependencies errors: