Socket
Book a DemoInstallSign in
Socket

gatsby-woocommerce-theme

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-woocommerce-theme

Gatsby WooCommerce Theme - Electra

latest
Source
npmnpm
Version
2.0.1
Version published
Maintainers
1
Created
Source

🎨 Gatsby WooCommerce theme - Electra

Project Status: Active. Stars Forks Contributors Follow

  • A Gatsby theme for WooCommerce, using Decoupled Architecture
  • Front end in React
  • Backend in WordPress.

Demo Site

This theme uses gatsby-source-wordpress@v4 BETA

*** 👨‍💻 Please star my repo to support my work 🙏 ***

gatsby woocommerce theme electra hero image

🔥 Features

  • Uses React with Gatsby ( Blazing Fast )
  • PWA ( Works Offline )
  • Image Optimization ( blur effect )
  • GraphQL ( with wp-graphql on WordPress )
  • Custom Widgets, Menus, Social elements.
  • WooCommerce store
  • Google Analytics feature
  • Yoast SEO supported ( with og tags )
  • Product Search with pagination ( even works offline )
  • Product pagination
  • Archive pages.
  • Authentication with JWT
  • My Account page ( with Login and Registration )
  • Create an account on checkout.
  • Social share.
  • Product Carousel.
  • Add to wishlist( even works offline )

👨‍💻 Maintainer

NameGithub Username
Imran Sayed@imranhsayed

🚀 Set Up

Gatsby Site Setup

  • Installation: npm i gatsby-woocommerce-theme

  • Server Side Environmnent Variables. Add the following configuration to your gatsby-config.js

module.exports = {
	plugins: [
		// Tell gatsby which theme you will be using and other configs.
		{
		resolve: "gatsby-woocommerce-theme",
		options: {
			wordPressUrl: 'https://example.com',
			gatsbySiteUrl: 'https://example.com',
			googleTagManagerId: 'xxxx',
			fbAppId: 'xxxx'
		}
	} ]
};

  • Client Side Environment Variables. Create two more files called .env.development .env.production and into 'site' directory or the root of your project and add your WordPress site url liks so.
GATSBY_WORDPRESS_SITE_URL=https://example.com

Env variables from these file will be consumed by Apollo client on client side.

WordPress Setup

  • On your WordPress site, download, Upload and activate all the plugins from wordpress/plugins folder of this repo, into your WordPress Site.

a. Headless CMS

b. woocommerce

c. wp-graphql - tested on ( v1.0.0 )

d. wp-graphql-woocommerce

e. wp-gatsby

f. Yoast-SEO

g. wp-graphql-yoast-seo

h. wp-graphql-jwt-authentication

    • Set Header menu as HCMS Header Menu
    Header Menu Demo
    • Set Footer menu as HCMS Footer Menu.

      Footer menu demo
  • You can also set text widgets in #HCMS Footer #1 and #HCMS Footer #2 under Appearance > Widgets in WordPress.

  • Create a Home Page ( if there isn't one already )and make sure you have a home page and Location rule is set to Home page.

  • If isn't already set your site title, description and logo from WordPress customizer.

  • Setup WooCommerce:

  • Make sure WooCommerce Plugin is active in WordPress and the payment modes have been set from its settings.
  • You can also import default wooCommerce products that come with wooCommerce Plugin for development ( if you don't have any products in your WordPress install ) WP Dashboard > Tools > Import > WooCommerce products(CSV): The WooCommerce default products csv file is available at wp-content/plugins/woocommerce/sample-data/sample_products.csv
  • For home page carousel please upload same size product category images of dimensions 1900x600

Keywords

gatsby

FAQs

Package last updated on 29 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts