Tuesday, 29 August 2017

Programatically Add Products to your WooCommerce Cart


I’ve been rebuilding my WooCommerce plugin demos to make them easier to use and understand. For my WooCommerce Delivery Slots demo, I decided to direct people straight to the checkout page. As such, I found myself needing to programatically add a few items to the cart when the page is loaded. I decided to hook into the wp action, as I could then check which page was being loaded. I then used some WooCommerce methods to add some items to the cart:
1234567891011121314151617
/** * Add items to cart on loading checkout page. */function iconic_add_to_cart() {if ( ! is_page( ‘checkout’ ) ) {return;}if ( ! WC()->cart->is_empty() ) {return;}WC()->cart->add_to_cart( 54, 1 );WC()->cart->add_to_cart( 22, 2 );}add_action( ‘wp’, ‘iconic_add_to_cart’ );
Firstly, I check to see if it’s the checkout page. If it is, I then check to see if the cart is empty. Finally, if the cart was empty I add 2 products to the cart programatically.
The method we want to focus on here is WC()->cart->add_to_cart();.
The function accepts 5 parameters:
The first parameter is the $product_id. For simple products, assuming we only want to add 1, we could just enter the product ID and be
Source: https://managewp.org/articles/15993/programatically-add-products-to-your-woocommerce-cart




source https://williechiu40.wordpress.com/2017/08/29/programatically-add-products-to-your-woocommerce-cart/

5 SEO features to make sure your ecommerce platform supports

When choosing an ecommerce platform to power your online store, it’s important to consider search engine optimization (SEO) features in your decision-making process.

No matter how experienced you are with SEO, when you put the power into a platform’s hands, you may or may not end up with ability to control elements of your site that are essential to your ranking success.

Let’s take a look at five core features that your ecommerce platform needs to have, along with examples of platforms that offer each feature. Hopefully this guide will make it easier for you select a home for your merchandise that is capable of dominating search.

Editable robots.txt files

The Robots.txt file allows you to tell search bots which pages and directories to ignore when crawling your site to index it for the search engines. I bet you’re thinking it’s not a big deal if you can’t control this file, but let me show you why it matters.

When a customer makes a purchase from you, let’s say you send them to a thank you page, offering them a chance to subscribe to your exclusive newsletter where they can stay up to date with the most current sales and promotions before the general public finds out. When someone visits this page, it’s an indication that they’ve successfully completed a purchase, a signal that you can use to track, analyze and optimize buyer journeys.

That’s definitely a page you wouldn’t want indexed in the search engines – and unless you block access to it with the robots.txt file, it’ll become discoverable by the general public. Basically, any page you don’t want users to see without completing a certain action needs to be blocked from crawlers.

While many ecommerce platforms don’t allow their users to directly access this file, BigCommerce does.

BigCommerce

BigCommerce also allows you to easily integrate your store with Google Shopping, Facebook, and eBay, as well as a range of other shopping comparison sites, so you can get additional SEO boosts automatically, without having to manually submit your product listings to various engines.

Independent page titles and URLs

To avoid issues with duplicate content, and to ensure you have the best chance at ranking for certain keywords and phrases, it’s best to make sure you can control these metadata elements at the page level. Some ecommerce platforms don’t allow you to have this control, meaning you have a generic title in every single page on your shop.

The URLs may be different for each page, but may end up produced like /randomcharacters989j.htm rather than something like /pink-t-shirts.

Chances are you’ll want to use specific keywords for each page on top of the ones you use site-wide. You’ll definitely have long tail keywords to use on each product category page as well. Unless you have the ability to control the titles and URLs at the page level, you’re stuck essentially targeting the same keywords on every single page in your store.

Magento is a robust ecommerce platform that allows users to control the page titles and URLs so they can make the most of their SEO efforts with keywords.

Magento is, of course, not the only platform that does this, but it is a key feature to look for. That said, Magento isn’t the most intuitively user-friendly option available, and unless you’re already an experienced developer, you may find yourself hiring one to make it work for you.

An integrated blogging platform

Because it’s the best way to publish rich, dynamic, link-worthy content on your domain, blogging is an integral part of ecommerce marketing today. Businesses that blog 11 or more times per month receive two to three times the traffic compared to those who blog less often or not at all.

It can be complex to set your shop up on one platform and your blog on another, and then figure out the best way to link the two together – not just for user experience, but also for SEO purposes.

You could have your shop on the main domain, and install WordPress in the /blog directory. That works, but can be a bit of hassle in terms of unified design as well as ongoing management workflow. You’ll have to login to your ecommerce platform to handle products, orders, and general store management. Then, you’ll have to login to your WordPress or other blogging platform to add, edit, and manage your blog content. As you grow, it can be harder to handle that at scale.

Shopify makes it easy by including a blog in the ecommerce platform. This way you can keep everything streamlined. Shopify’s SEO features are solid overall, and the platform also allows for independent page titles and URLs.

Shopify

Canonical URLs

Canonical URLs allow your content to be syndicated in various places online, while telling Google to pay attention to only one URL. It helps Google to determine the page you want rank, with syndicates using the tag to convey to search bots that you deserve all the SEO juice. This solution is also useful in cases where you want to use multiple URLs for the same product category.

For instance, if you want people to see a list of all the yellow dresses in your store, the URL could be:

http://www.domain.com/store/dresses/yellow/yellowdresses instead of something like: http://www.domain.com/store/dresses/formal?gclid=98675.

Canonical URLs allow you to tell the search engines that similar URLs are the same – allowing you to have products that are accessible under multiple URLs. For instance, that yellow dress can be found at /yellowdresses, /formaldresses, and of course on its individual product page. It may also be found on other pages depending on the other filters you make available to your customers.

When you choose your canonical URL, pick the page that you believe is the most important. Then add a rel=canonical tag when linking from the non-canonical one to the canonical one. Essentially, this redirects the search engines to the important one, so it is more likely to rank – without directing the users away from any of the pages. If you’re having to do this manually, it can become a painstakingly time-consuming task.

WooCommerce is an ecommerce platform that allows you to convert your WordPress installation into a full-fledged shopping experience. It’s available for free, but the premium version comes with additional features and themes. The support for canonical URLs is built-in to WooCommerce, regardless of which version you choose to use.

Automatic redirect management

If your business uses multiple domains, then you’re going to have to spend some time setting up canonical URLs or 301 redirects to forward users and search engines to the right place. If you don’t, you’ll detract from the user experience and risk losing ranking with the search engines because you’re sending traffic to broken links.

If figuring out your 301 redirects and canonical URLs is driving you crazy, then a platform that use automatic redirects could be a priority for you.

SquareSpace is a hosted ecommerce platform like BigCommerce and Shopify. It will automatically redirect users and search engines to your primary domain and use canonical URLs to help you. It’s the automatic redirect that allows you to use a custom domain without your built-in Squarespace domain showing up in the search engine results.

Which one is the best?

Honestly, what works best for you will depend on what your budget is, and what your ecommerce products are.

The bottom line is that regardless of what you choose, you need a platform that is helpful for SEO. If it’s not set up for SEO-friendly URLs, then there’s not much point in using it, because if you can’t get it ranking to bring in organic traffic, you’ll spend a great deal more on customer acquisition.



source https://searchenginewatch.com/2017/08/29/5-seo-features-to-make-sure-your-ecommerce-platform-supports/

Interview with James Kemp, developer at IconicWP


No Description
Source: https://managewp.org/articles/15992/interview-with-james-kemp-developer-at-iconicwp




source https://williechiu40.wordpress.com/2017/08/29/interview-with-james-kemp-developer-at-iconicwp/

Monday, 28 August 2017

Importance of HTTP to HTTPS Migration – WP Lotus


You’ve probably been hearing a lot about the importance of HTTP to HTTPS Migration. If you haven’t yet migrated your WordPress site to HTTPS, time is running out for you. Recently, Google began sending emails to many people who use Google’s Search Console. These emails were informing site owners of an upcoming change that would negatively affect their websites. This warning was a reminder of a blog post Google wrote in April of 2017, in which Google said, "Beginning in October 2017, Chrome will show the ‘Not secure’ warning in two additional situations: when users enter data on an HTTP page, and on all HTTP pages visited in Incognito mode."
This is what the warning looks like…
Every site will need to migrate to HTTPS at some point to avoid having the NOT SECURE warning shown to its visitors. This will affect your site, even if you don’t sell anything.
Even if you do sell items, and you’ve already implemented HTTPS on your shopping cart pages, you aren’t safe. All pages of your site should migrate to HTTPS to avoid this problem.
WHY DO I EVEN NEED HTTPS?
Your immediate need is to prevent your website visitors from leaving your site because they believe it to be insecure.
Source: https://managewp.org/articles/15991/importance-of-http-to-https-migration-wp-lotus




source https://williechiu40.wordpress.com/2017/08/28/importance-of-http-to-https-migration-wp-lotus/

How to Improve Your Site and Increase Conversions With Analytics

Source: https://managewp.org/articles/15989/how-to-improve-your-site-and-increase-conversions-with-analytics




source https://williechiu40.wordpress.com/2017/08/28/how-to-improve-your-site-and-increase-conversions-with-analytics/

Gutenberg: What is it good for?


A war has erupted in the WordPress Community over editing. It has attracted passionate views on both sides of the debate. The flag of continuity and backwards compatibility is being flown with passion in the face of the team rooting for change. People are throwing undiluted opinion with force into a conversation which appears to have no real direction or conclusion. In the last few weeks, a few of us sifted through all the Gutenberg feedback, trying to make sense of it. Unexpectedly, something that has come up over and over again is a lack of clarity around what the purpose of the Gutenberg editor is—and by extension, who the intended target audience is.
Given that WordPress powers about a third of the world’s websites, it is easy to answer this question by saying “everyone.” Holding this view is a classic product design mistake. When you set out to create a product for everyone, you stand to please no one.
“To the crucial question whether I like Gutenberg, I have yet to find a proper answer. I’m still not clear on who the solution is for or even what problem the solution is trying to solve, and I will spend the next months and probably years trying
Source: https://managewp.org/articles/15990/gutenberg-what-is-it-good-for




source https://williechiu40.wordpress.com/2017/08/28/gutenberg-what-is-it-good-for/

Introducing History: Easily Undo / Redo Changes in Elementor Editor


The newest feature release for Elementor (v1.7) adds redo / undo capabilities, letting you trace back your actions, allowing to design faster, never worrying about making a mistake. Read on, to find out about this and other improvements that will make your design workflow much simpler. The timing couldn’t have worked better for us: Releasing our history feature at the exact time we reached a historical milestone – 200,000 active installs.
This has been a long anticipated feature for all Elementor users, and I am glad to be introducing a feature that will make the Elementor design workflow that much better:
From now on, everything you do inside the editor can be undone, and then redone if necessary.
Made a mistake? No worries! Simply hit Ctrl / Cmd + Z or open the history panel and browse through all your past actions.
This feature is an important addition to the already useful Revision History feature we released a while back, which creates a saved revision every time you save your changes.
In the bottom of the left panel, you will notice a new icon. Clicking on it will open the history panel, showing two tabs: Actions and Revisions.
The Actions tab logs every single ‘action’ you make
Source: https://managewp.org/articles/15988/introducing-history-easily-undo-redo-changes-in-elementor-editor




source https://williechiu40.wordpress.com/2017/08/28/introducing-history-easily-undo-redo-changes-in-elementor-editor/