Show Product Dimensions in WooCommerce

For some strange reason the WooCommerce WordPress e-commerce plugin has options in the product admin to add a product’s Weight and Dimensions but then doesn’t show these values on the front end like some might expect. Not 100% sure if it’s a theme clash or WooCommerce bug/oversight but WooCommerce told me there’s a workaround involving product attributes. I couldn’t get this working however.

Here’s what does work though. To show product dimensions on archive pages, add the following code to your theme’s functions.php file or in a new wordpress plugin:

[php]add_action( ‘woocommerce_after_shop_loop_item_title’, ‘cj_show_dimensions’, 9 );

function cj_show_dimensions() {
global $product;
$dimensions = $product->get_dimensions();

if ( ! empty( $dimensions ) ) {
echo ‘<span class="dimensions">’ . $dimensions . ‘</span>’;
}
}[/php]

You can change the “get_dimensions” to “get_weight” if you want to show a products weight instead or additionally in a new function.

NOTE: The above code will show dimensions on archive pages like Categories, Recently Added Products, etc. If you want to show it on single product details pages, there are other WooCommerce hooks but the ones I tried wouldn’t work with my theme. If you don’t mind editing your theme files directly, adding something like this to the template file that shows the individual products, something like ‘single-product.php’, should work too:

[php]
<div class="dimensions">
<strong>Dimensions</strong>: <!–?php echo $_product—>get_dimensions(); ?>
</div>
[/php]

Don’t forget to add a .dimensions class to your theme’s css file to style the results if required.

Popular Ways to Extend Your WordPress Site

So you’ve had a basic WordPress site built for you (possibly by me!?) or put one up yourself and you’ve got your design in, pages, images and blog/news posts up and you’re pretty happy with how it all looks. Did you realise you can add to the core WordPress functionality by installing plugins to make it do almost anything you can imagine? For me, that remains probably the best feature of WordPress along with it’s ease of use.

Wordpress Plugins

So what extra things might you want WordPress to do?

Send Newsletters

Capturing email address from your website and building a database of contacts then keeping in touch with them or sending offers etc is an excellent way to market and this plugin is probably one of the most popular WordPress additions requested by my clients:

Reverbstudios.ie/706/wordpress-newsletter-plugin-review/

Sell Stuff

All business have something to sell. If it’s products then it makes sense to sell them off your own website. This plugin will do all you need including show categories, add postage, paypal and credit card payments etc..:

Reverbstudios.ie/868/wordpress-shopping-cart-plugin-review/

Capture Data & Details

It’s highly recommended that you have some kind of conversion form on your website, ie a form that gathers information from visitors either automatically (browser, operating system, referring site, etc..) or manually by asking them questions. For businesses that are service based these kind of forms can be made take a payment or deposit too:

Reverbstudios.ie/1787/gravity-forms-wordpress-form-plugin-review/

Contact me if you you’d like any of this functionality on your site.

Leon

Add a Surcharge Field to Gravity Forms to Cover Paypal Fees

Paypal remains probably the handiest way to pay for and get paid for products and services but having just done my taxes for last year, I can see that the fees I had to pay for accepting Paypal payments from clients are getting pretty significant. I’ve decided to ask people if they’d like to pay these fees or not rather than forcing it on them and I’m only asking for 50% of the fees to be paid considering both seller and buyer are benefiting from using Paypal. Fair?

The first couple of things that need to be said are these:

  1. Paypal may not like people adding surcharges to cover their fees. In fact it’s probably against their policy. I don’t know why because they would make more money.
  2. People paying for services and products may not like to see extra fees added on checkout.

Nevertheless! Here’s how to add a field that automatically calculates Paypal fees for a customer entered amount.

You’ll need a developer licence for Gravity Forms Wordpress forms plugin for this so you can grab their Paypal Add-on. A developer licence is well worth it for this excellent forms plugin. They have some other great add-ons too. See my review.

Step 1

Add a new gravity form with whatever basic informational fields you want the customer to fill out, typically Name, Phone, Email & Item just so you’ll know who’s paid and for what.

Step 2

Add 2 “Product” fields from the “Pricing Fields” menu, the first of which should be configured to take a user defined price as below. It can also be a set price as opposed to user defined:

The second Product field is the tricky one. Some maths skills are needed! This field needs to be configured as a Calculation from the “Field Type” drop down menu. In the “Formula” field I inserted the “Payment Amount” merge tag from the first Product field above. Then I added the rest of the formula to calculate the % fee as below. You’ll need to visit the Paypal Fees web page to see the exact fees in your country and for the monthly incoming Paypal volume you have personally. For me it’s 3.4% + 0.35 cents. Also remember that I’m dividing by 2 here because I’m only asking for clients to pay 50% of the fees. You can leave that out if you’re not as generous as me. Here’s the formula and setup screen:

(  ( {Payment Amount (Euros):11} * 3.4 / 100 ) +0.35 ) /2

Step 3

Add a “Total” pricing field at the end too just so people can transparently see how the fees were added.

Step 4 (Optional)

In my form, I’ve also added a “Radio Buttons” field from the Standard Fields menu which I’m using to ask the client whether they want to bother paying any of the fees or not. I don’t want to force extra payments on anyone but the addition of this field will help sort the nice clients from the not so nice ones maybe!? With this field added, you need to go into the advanced settings of the second “Surcharge” pricing field and turn on “Enable Conditional Logic” to only show the surcharge field if people have chosen “Yes” to paying the fees. See below:

Here’s a link to my form so you can see how it all comes together:

ReverbStudios.ie.Payments

Leon

Do I Still Need a Website?

This was the question asked of me at the Leitrim Business Network ‘IT expert Q & A’ this week. I’d like to expand on my answer here.

It’s a valid and pretty common question and to be honest, not one I knew how to answer when people first started asking me. After all, you can probably reach a hell of a lot more people on the likes of Facebook, Linkedin & Twitter than your own freshly made website.

My simple answer is that you should have BOTH your own website and a presence on all the major social networking sites. The bigger footprint you have online the better. The only valid reason I can think of for not having your own site is if you have absolutely no budget, but many people still don’t realise the cost of web design has come right down these days.

What I would try to avoid is that old problem of having people think that you’re a business that can only afford a free web presence. It’s like having a fancy business card and a big ugly hotmail or yahoo email address on it. Nothing spells success and professionalism than a nice modern website. It can be just as much a mark of quality as a marketing tool.

Website?

Here’s a  breakdown:

Facebook Pages & Twitter profiles are pretty basic

All that’s on anyone’s Facebook Business page (unless they spend serious money on having Facebook apps developed) is a small ‘About’ section, a news feed and maybe some photos. Same with Twitter. A small bio section then just a list of posts. Is that really the only business presence you want people to see!?

With your own site, you can lay it out how you like and have content presented more logically. I like to think of Facebook & Twitter as a teaser for your company, like a fish hook that you dangle in the stream of people. You give them the basics of your company and have them click through to your proper website where you present them with your full, properly branded business information.

Control

Facebook in particular are forever changing things around, whether it’s the size of banner images, logos or just the general rules on what you can and cannot do. With your own site you don’t have to be at their mercy, you control everything and always will.

The Future

Facebook wasn’t always popular and may not always be. What if you spend serious time and money cultivating followers and likers only for Mark Zuckerberg to get bored and sell the site to move onto something new? Don’t put all your eggs in one basket.

Conclusion

My blueprint for a modern online business precence is as follows:

  • Create a profile on Facebook, Twitter, Linkedin and any other Social Networking site that may be particularly relevant for your business, ie – if you sell visual products, maybe a youTube account too to show them off properly,
  • Make sure to properly fill out each site profile with your business info, service list, location and web address link,
  • Build an audience by spending some time connecting to new people on each site. Most of them make this pretty easy by suggesting friends based on your email contacts or location,
  • Build a standalone website with a modern web publishing system like WordPress,
  • Concentrate most of your efforts on your own website by regularly writing relevant news content/blogs,
  • Integrate your website with all your social networking sites to automatically send news posts through to them. Dlvr.it is good for this and FREE. This way you can be active on a pile of sites at once, from one location without really having to be on them.
If you’re like me and sit in front of a computer all day, you’ll have that extra bit of time to go in an be active on the networking sites too. Interaction gets you noticed remembered and liked. Reading other peoples news also keeps you in the loop as to what’s going on and what the prevailing mood is which can be helpful.

Leon

 

Add Multiple Google +1 Buttons to WordPress

It’s recently been announced that the number of +1’s your site receives might affect your Google page rank so it’s worth having a Google +1 button on your site.

The obvious way to add a single Google +1 button is to just use a WordPress Google +1 plugin but what if you want to keep plugin numbers down for performance reasons or want to add multiple instances of Google +1 to your site, all promoting different url’s, ie – one at the top of your home page for your main site url and one on individual blog posts? Well this is what I needed to do and found it wasn’t that easy! Here’s how I managed it:

Go to www.google.com/webmasters/+1/button and grab your button code, making sure to enter a target url for your main site, then paste it into your site template, taking care to paste the right bits in the right places. The following goes in your header.php file in the <head> section:

<!-- Place this render call where appropriate -->
<script type="text/javascript">
  window.___gcfg = {lang: 'en-GB'};

  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>

And the following goes wherever you want the button to show, typically inside the header.php file somewhere after the opening <body> tag:

<!-- Place this tag where you want the +1 button to render -->
<g:plusone annotation="inline" href="http://www.reverbstudios.ie"></g:plusone>

Now, if you wanted to also have a button on each blog post, to specifically target that blog post url, you need to paste the above code into your single.php template file, somewhere inside the loop but this time change the url to “<?php the_permalink(); ?>”, ie:

<!-- Place this tag where you want the +1 button to render -->
<g:plusone annotation="inline" href="<?php the_permalink(); ?>"></g:plusone>

What this does is automatically grab the post url of the post your’re currently reading and allows it to be +1’d!

See the top left of this site and the share section just below this blog post’s title to see both buttons in action.

Leon

Batch Upload to Dropbox via WordPress

I’m currently building a site for a local Pharmacy who would like to have the ability to allow customers to upload photos to be developed via an online form on their site. The catch is, they would prefer to have the files go to their Dropbox (File sharing/storage site) folder for easy processing. I done some searching for an off the shelf WordPress plugin and this one came closest but unfortunately, didn’t have batch capability and seems slightly buggy – WordPress.org/extend/plugins/dropbox-plugin.

I then got to wondering if it was possible to Email pics to Dropbox and found a few sites/apps that can do it well. This one seemed best – SendToDropbox.com.

So, armed with the above knowledge, here’s what I done:

Contact Form 7

This is one of the most popular FREE form plugins for wordpress and the current version includes the ability to add File Upload fields to a form. As many as you want. I setup a new form with standard questions like Name, Email, etc..and included a few upload file fields with specifications as to File Type, File Size, etc.. I then pasted in the automatically generated email address from SendToDropbox.com in the “To” field. Contact Form 7 also has the option to send the results of the form submission to a second email address and I setup a duplicate of the first email to go to the proper contact email address of the website, minus the file attachments, just so the website admin would get notification of newly uploaded files. Of course, the Dropbox PC software also alerts you straight away when new files are added to your folder. See below for Contact Form 7 settings:

Contact Form 7

SendToDropBox.com

This is a simple but cool site that connects to your Dropbox account and provides a custom email address that you can send emails and file attachments to. It also has a copule of extra features that process emails received such as: Automatic Unzipping, Email Content Inclusion and control over Dropbox Folder Names/Trees for emailed files, ie – files uploaded in this way can be added to folders named by Date, Email Address, Subject, etc..handy for keeping thigs organised and finding customers uploaded files! See below:

Send To Dropbox

Result

The end result is a normal looking contact form on the customers site that allows basic personal info to be uploaded to Dropbox along with files and photos. The website admin gets instant notification of new files added to his Dropbox account as well as email notifaction of the customer’s details. Nice!

Of course, it can be even simpler. If you just add an email address to the site like Upload@SiteName.com and have that forward on to the custom SendToDropbox email address then people can use the methods they already know for sending emails and attaching files and it will work just as good. I personally think it’s best and more professional to use the form method but perhaps a choice can be given.

Leon.

Online (Earned!) Media and Dublin Web Summit

Had a good, educational and inspiring day in Dublin yesterday!

In the morning I caught Damien Mulley’s talk on the benefits of Social/Online Media and although I’m fairly heavily involved in this area already there was plenty to learn, proved by all the notes I took! The new idea is that you have to “earn” your online space and give great value in return for followers, connections, search rankings and sales leads.

Continue reading Online (Earned!) Media and Dublin Web Summit

WordPress and Realex Integration

I am very pleased to announce that proper Credit Card and Laser transactions using Realex processing can now be taken on WordPress powered sites via the Shopping Cart plugin from Tribulant. I think this is a significant development considering both the recent popularity of WordPress as a full website content management and E-commerce system and the position Realex occupies as one of the world’s most popular credit card processors. I am also glad to have personally initiated, advised and funded the integration.

Import your RSS Feed or Blog to Facebook Linkedin etc..

I’ve recently mentored a few clients in how best to use Social Networking sites to promote their own business or website and I couldn’t help feeling by the end of each session that the client felt a little overwhelmed by either the amount of sites that needed to be updated or the perceived level of technical expertise and amount of time required to get things moving on each site. I’d like to try simplify things here.

Continue reading Import your RSS Feed or Blog to Facebook Linkedin etc..