Code Monkey home page Code Monkey logo

woo-product-grid's Introduction

woo-product-grid

Display WooCommerce blocks in the Block Editor

Basic usage

The 'Product grid' block should appear in your list of available blocks.

Setup

If testing this repo locally, run NPM and Composer to set up the plugin.

npm install
composer install

A wp-env config is included for spinning up a WordPress instance. WooCommerce and WooCommerce Smooth Generator come installed and activated with this config.

After running npm install, the wp-env instance can be set up by running

wp-env start

Your WordPress instance will then be available at localhost:8888 with the default login credentials of admin and password.

Products can be generated by using the command

wp-env run cli "wp wc generate products <nr of products>"

The wp-env instance can be stopped by running:

wp-env stop

Further information about using wp-env and wc-smooth-generator can be found in their documentation.

Extending this plugin

This plugin offers a basic way of displaying WooCommerce products on any location that accepts blocks.

  • customisable product metadata - users should be able to control which elements appear with each product: image, title, description, price (with tax), price (without tax), stock levels and so on. Text size and colour should also be customisable.
  • theme.json support - extra customisation should be configurable via theme.json. Default values such as the number of posts to display and rows should be customisable at a theme level.
  • filtering - users should be able to filter the products they display by category, tag or free text search.
  • test coverage - Puppeteer coverage and unit tests across the JavaScript code base.
  • running tests on the repo - our test suite should run against any PR and build. This ensures any changes to the plugin do not break existing functionality. The test suite should also run against older versions of WordPress, WooCommerce and PHP for maximum compatibility.
  • uninstall process - when the plugin is removed, the plugin's data should be removed. This includes any blocks currently in use.

woo-product-grid's People

Contributors

jonny-bull avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.