Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Urgent please fix #214

Open
wants to merge 97 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
39d075e
bump 0.4.6
kilbot Jul 19, 2016
8273681
dockerize
kilbot Jul 20, 2016
3d943b4
update travis
kilbot Jul 20, 2016
34a9f04
fix tests
kilbot Jul 23, 2016
166f730
fix
kilbot Jul 23, 2016
7b4e10c
Update docker
kilbot Mar 29, 2017
5e9895d
Update docker submodule
kilbot Mar 29, 2017
7a382fd
Fix docker-compose version error
kilbot Mar 29, 2017
e995e91
Try again: fix docker-compose
kilbot Mar 29, 2017
b1be4f7
Fix test exec
kilbot Mar 29, 2017
7696cd8
Fix travis testing
kilbot Mar 30, 2017
41e896d
Update docker and CI testing
kilbot Mar 31, 2017
6e8eac2
Fix travis sed
kilbot Mar 31, 2017
1294884
Use WC REST APIv2
kilbot Apr 3, 2017
f79fb5f
Compatibility changes
kilbot Apr 4, 2017
4d584ba
Compatibility changes [skip ci]
kilbot Apr 4, 2017
d6ba0e2
Set product line item tax status
kilbot Apr 4, 2017
5164551
Add rest nonce for cookie auth
kilbot Apr 4, 2017
3a085e4
Fee tax status
kilbot Apr 4, 2017
a25b61d
Fix shipping methods
kilbot Apr 5, 2017
0fc979c
Shipping taxes
kilbot Apr 5, 2017
bfae852
Refactor orders api
kilbot Apr 5, 2017
b668f44
Fix negative fee tests
kilbot Apr 5, 2017
3796343
Refactor orders api
kilbot Apr 12, 2017
a39425f
Update payment processing
kilbot Apr 13, 2017
c27c59a
Fix email compatibility
kilbot Apr 14, 2017
78a21c7
Fix payment compatibility
kilbot Apr 14, 2017
4d32006
Fix customer compatibility
kilbot Apr 15, 2017
b350c15
Fix random test errors
kilbot Apr 15, 2017
d5b0768
Update docker
kilbot Apr 15, 2017
5981dfa
Merge pull request #168 from kilbot/0.4-wc-3.0
kilbot Apr 15, 2017
948965e
Add legacy API support
kilbot Apr 15, 2017
c16d3f4
Product edit compatibility fixes
kilbot Apr 18, 2017
fba6805
Fix order status
kilbot Apr 19, 2017
c3d3d69
Fix tests for WC < 3
kilbot Apr 19, 2017
a86d8d5
Fix search for WC 3
kilbot Apr 19, 2017
4c7f6e0
add Saudi Riyal
kilbot Apr 24, 2017
e3e0e40
Fix 'Any ...' Variations
kilbot Apr 27, 2017
33e1cd9
Fix variation schema
kilbot Apr 27, 2017
be58eb5
Bump 0.4.8
kilbot Apr 27, 2017
fe26118
Update docker
kilbot May 2, 2017
ad7bc9f
Fix: Custom variation attributes
kilbot May 2, 2017
76d711d
Fix (WC3 compatibility): non-taxable products
kilbot May 4, 2017
6804765
Fix (WC3 compatibility): taxable fees
kilbot May 4, 2017
559054a
bump 0.4.9
kilbot May 4, 2017
070818b
Bump 0.4.9
kilbot May 5, 2017
5f908a5
Make sure completed_at is site time
kilbot May 26, 2017
9a63b8a
Fix: Receipt date time zone
kilbot May 26, 2017
72db959
Remove POS gateways from WC Settings [ci skip]
kilbot May 26, 2017
f26f5c4
Fix: Emailing receipts
kilbot May 26, 2017
1ec53e0
Fix: Product search by title only
kilbot May 26, 2017
a9b2ba9
Prevent duplicate emails [ci skip]
kilbot May 26, 2017
9b67f1e
Fix: correct order dates
kilbot May 30, 2017
a221fdc
Fix: on_sale filter
kilbot May 31, 2017
ad4340b
0.4.11 [ci skip]
kilbot May 31, 2017
eba25ba
Fix: date localisation
kilbot May 31, 2017
12bfc0b
Update translations
kilbot May 31, 2017
3de914a
Fix: (WC3 compatibility): Any retrieve Products with post_status = pu…
kilbot Jun 5, 2017
566d4cc
Fix: undefined index message
kilbot Jun 5, 2017
999d29e
Fix make pot [ci skip]
kilbot Jun 5, 2017
de30c04
Fix: (WC3 compatibility): save product meta
kilbot Jun 14, 2017
ea6e72d
disable zoom on touch devices [ci skip]
kilbot Jun 14, 2017
f60ed1e
disable WorldPay gateway for POS
kilbot Jun 15, 2017
9d250b5
Fix: (WC3 compatibility): correctly sync stock numbers
kilbot Jun 15, 2017
7086a1c
Bump 0.4.13 [ci skip]
kilbot Jun 15, 2017
33b8ba6
Fix woocommerce-admin translations
kilbot Jun 16, 2017
022dd4d
Fix WorldPay
kilbot Jun 16, 2017
b4bc349
remove meta property
kilbot Aug 3, 2017
8a9cf91
Merge 0.4.14
kilbot Oct 12, 2017
974da8e
Merge remote-tracking branch 'origin/0.4' into 0.4
kilbot Oct 12, 2017
4f9623d
Fix docker update
kilbot Oct 12, 2017
4c68ca5
Fix cart item taxes
kilbot Oct 12, 2017
e512576
Bump 0.4.15
kilbot Oct 12, 2017
3ab05bf
WordPress 4.9
kilbot Nov 16, 2017
870a78d
WP 4.9 compatibility fix
kilbot Nov 22, 2017
01ad289
0.4.17
kilbot Jan 22, 2018
8647f47
update deps
kilbot Feb 7, 2018
5e4812e
Fix: Product variation stock adjustment
kilbot Feb 12, 2018
5bd9e25
Fix: Prevent display of hidden order item meta
kilbot Feb 23, 2018
b371dbe
Orders list fixes
kilbot Mar 6, 2018
0b085b1
Fix: Printing in Chrome 46+
kilbot Mar 7, 2018
ca6163e
Fix: Category search for products
kilbot Mar 7, 2018
b41a9e0
bump 0.4.18
kilbot Mar 8, 2018
02faa9b
update
kilbot May 31, 2018
0ac94c5
0.4.19
kilbot Sep 24, 2018
d91f449
testing WC 3.5
kilbot Oct 23, 2018
88319cc
WC 3.5 compatibility
kilbot Oct 23, 2018
393d61a
Bump stable tag [ci skip]
kilbot Oct 24, 2018
4fc2da2
0.4.21 - WP 5 compatibility fix
kilbot Nov 27, 2018
904e216
WP 5 compatibility fix
kilbot Nov 27, 2018
5f176cf
0.4.22
kilbot Apr 22, 2019
fa76387
0.4.23
kilbot Apr 22, 2019
a40f3e5
Update readme.txt
kilbot Apr 23, 2019
2496c43
0.4.24
kilbot Aug 13, 2019
b8849e5
0.4.25
kilbot Nov 11, 2020
d5199d7
0.4.26
kilbot Mar 30, 2021
f2cfd83
remove old docker, use wp-env instead
kilbot Nov 4, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
36 changes: 36 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## these environment variables are passed to containers via docker-compose
## copy this to your plugin root directory and rename as .env
## changing the environment variables will require a rebuild of docker containers

## project name used by docker & plugin folder name
PROJECT_NAME=woocommerce-pos

## default development settings
PHP_VERSION=5.6
# MYSQL_VERSION=8.0
# WP_VERSION=latest
# WC_VERSION=https://github.com/woocommerce/woocommerce/releases/download/3.5.0-rc.2/woocommerce.zip
# WP_MULTISITE=0

## wordpress settings
# WP_USER=admin
# WP_PASSWORD=password
# [email protected]
# WP_TITLE=Localhost
# WP_URL=localhost

## external ports
# LOCALHOST_HTTP_PORT=80
# LOCALHOST_HTTPS_PORT=443
# LOCALHOST_MYSQL_PORT=3306
# LOCALHOST_PHP_PORT=9001
# XDEBUG_REMOTE_PORT=9000

## mysql
# MYSQL_ROOT_PASSWORD=wordpress
# DB_NAME=wordpress
# DB_HOST=db-mysql57:3306
# DB_PASSWORD=wordpress

# directory for wp cli packages
# WP_CLI_PACKAGES_DIR=/var/www/html
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ assets/js/vendor.bundle.js
assets/js/products.min.js
coverage
assets/js/templates.js
.data
.html
.DS_Store
18 changes: 0 additions & 18 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
[submodule "assets/js/src/lib/config/obscura/filtered"]
path = assets/js/src/lib/config/obscura/filtered
url = https://github.com/kilbot/backbone-filtered-collection.git
[submodule "assets/js/src/lib/config/obscura/sorted"]
path = assets/js/src/lib/config/obscura/sorted
url = https://github.com/kilbot/backbone-sorted-collection.git
[submodule "assets/js/src/lib/config/obscura/paginated"]
path = assets/js/src/lib/config/obscura/paginated
url = https://github.com/kilbot/backbone-paginated-collection.git
[submodule "assets/js/src/lib/config/obscura/query"]
path = assets/js/src/lib/config/obscura/query
url = https://github.com/kilbot/backbone-query.git
[submodule "assets/js/src/lib/config/deep-model"]
path = assets/js/src/lib/config/deep-model
url = https://github.com/kilbot/backbone-deep-model.git
[submodule "assets/js/src/lib/config/idb"]
path = assets/js/src/lib/config/idb
url = https://github.com/kilbot/backbone-idb.git
[submodule "styleguide"]
path = styleguide
url = https://github.com/kilbot/WooCommerce-POS-StyleGuide.git
105 changes: 42 additions & 63 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,54 @@
language: php
sudo: required

php:
- 5.4
language: node_js

addons:
hosts:
- woopos.dev
node_js:
- "node"

services:
- docker

env:
- WP_VERSION=latest WP_MULTISITE=0
# - WP_VERSION=latest WP_MULTISITE=1
# - WP_VERSION=3.8 WP_MULTISITE=0
# - WP_VERSION=3.8 WP_MULTISITE=1
matrix:
- PHP_VERSION=php54 WC_VERSION=latest WP_VERSION=latest WP_MULTISITE=0
- PHP_VERSION=php55 WC_VERSION=latest WP_VERSION=latest WP_MULTISITE=0
- PHP_VERSION=php56 WC_VERSION=latest WP_VERSION=latest WP_MULTISITE=0
- PHP_VERSION=php70 WC_VERSION=latest WP_VERSION=latest WP_MULTISITE=0
- PHP_VERSION=php54 WC_VERSION=2.6.14 WP_VERSION=latest WP_MULTISITE=0
- PHP_VERSION=php55 WC_VERSION=2.6.14 WP_VERSION=latest WP_MULTISITE=0
- PHP_VERSION=php56 WC_VERSION=2.6.14 WP_VERSION=latest WP_MULTISITE=0
- PHP_VERSION=php70 WC_VERSION=2.6.14 WP_VERSION=latest WP_MULTISITE=0
- PHP_VERSION=php54 WC_VERSION=2.5.5 WP_VERSION=latest WP_MULTISITE=0
- PHP_VERSION=php55 WC_VERSION=2.5.5 WP_VERSION=latest WP_MULTISITE=0
- PHP_VERSION=php56 WC_VERSION=2.5.5 WP_VERSION=latest WP_MULTISITE=0
- PHP_VERSION=php70 WC_VERSION=2.5.5 WP_VERSION=latest WP_MULTISITE=0

before_install:
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install stable
- git submodule update --init --recursive
- sudo apt-get update -qq
- sudo apt-get install docker-ce --no-install-recommends -y -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew"
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/1.11.2/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin/
- docker-compose -v
- docker -v

install:
# php libraries
- composer require satooshi/php-coveralls:~0.6.1@stable
- composer require guzzlehttp/guzzle:~5
- composer require 10up/wp_mock:dev-master
# install wordpress & woocommerce & test theme
- bash tests/unit/php/bin/install-travis-wp-tests.sh woopos_tests root '' localhost $WP_VERSION
- mkdir /tmp/wordpress/wp-content/plugins/woocommerce-pos/
- mv * .[^.]* /tmp/wordpress/wp-content/plugins/woocommerce-pos/
- mv /tmp/wordpress/* ./
- git clone https://github.com/kilbot/WooCommerce-POS-Test-Theme.git wp-content/themes/WooCommerce-POS-Test-Theme
- git clone https://github.com/kilbot/WooCommerce-POS-Test-Plugin.git wp-content/plugins/woocommerce-pos-test
# apache
- sudo apt-get update
- sudo apt-get install apache2 libapache2-mod-fastcgi
# enable php-fpm
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
- sudo a2enmod rewrite actions fastcgi alias
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
# configure apache virtual hosts
- sudo cp -f ./wp-content/plugins/woocommerce-pos/tests/integration/php/bin/travis-ci-apache /etc/apache2/sites-available/default
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
- sudo service apache2 restart
- npm install && node_modules/.bin/grunt build --force
- npm run start:${PHP_VERSION}

before_script:
# wp-cli
- curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
- chmod +x wp-cli.phar
- sudo mv wp-cli.phar /usr/local/bin/wp
- wp --info
- wp core config --dbname=woopos_tests --dbuser=root
- wp core install --url=woopos.dev --title=WooCommercePOS --admin_user=admin --admin_password=password [email protected]
- wp rewrite structure '/%year%/%monthnum%/%postname%'
- wp plugin activate woocommerce-pos
- wp plugin activate woocommerce-pos-test
- wp plugin install woocommerce --activate
- wp plugin install wordpress-importer --activate
- wp import wp-content/plugins/woocommerce/dummy-data/dummy-data.xml --authors=create
- wp option update woocommerce_api_enabled yes
- cp wp-content/plugins/woocommerce-pos/tests/integration/php/bin/wp-cli.yml ./
- wp rewrite flush --hard
# grunt-cli
- cd wp-content/plugins/woocommerce-pos/
- npm install -g grunt-cli
- npm install
- sleep 60
- docker exec woocommerce-pos-app-${PHP_VERSION} wp core version --allow-root
- docker exec woocommerce-pos-app-${PHP_VERSION} wp plugin list --allow-root --status=active

script:
- grunt test
- phpunit -c phpunit.xml.dist
- phpunit -c phpunit.int.xml
# - ./node_modules/.bin/pioneer
## download test theme and activate
- docker exec woocommerce-pos-app-${PHP_VERSION} wp theme install https://github.com/kilbot/WooCommerce-POS-Test-Theme/archive/master.zip --allow-root --activate

after_script:
- php vendor/bin/coveralls -v
- grunt coverage
## turn off WP_DEBUG to prevent depreciation notices
# - docker exec woocommerce-pos-app-${PHP_VERSION} sed -i "s/'WP_DEBUG', true/'WP_DEBUG', false/g" wp-config.php

script:
- npm run unit-test:js
- npm run unit-test:${PHP_VERSION}
- npm run integration-test:${PHP_VERSION}
20 changes: 20 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"core": null,
"phpVersion": null,
"plugins": [
".",
"https://downloads.wordpress.org/plugin/woocommerce.zip"
],
"config": {
"WP_DEBUG": true,
"SCRIPT_DEBUG": true,
"WP_PHP_BINARY": "php",
"WP_TESTS_EMAIL": "[email protected]",
"WP_TESTS_TITLE": "Test Blog",
"WP_TESTS_DOMAIN": "http://localhost",
"WP_SITEURL": "http://localhost",
"WP_HOME": "http://localhost"
},
"mappings": {
}
}
26 changes: 17 additions & 9 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ module.exports = function(grunt) {

var pkg = grunt.file.readJSON('package.json');

var path = require('path');

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

Expand All @@ -32,7 +34,7 @@ module.exports = function(grunt) {
'!locales.json',
'!phpunit.xml',
'!phpunit.xml.dist',
'!phpunit.int.xml',
'!phpunit.xml',
'!pioneer.json',
'!<%= app.css.src %>/**',
'!<%= app.js.src %>/**',
Expand Down Expand Up @@ -155,7 +157,7 @@ module.exports = function(grunt) {
radio: 'backbone.radio',
underscore: 'lodash'
},
modulesDirectories: ['node_modules', './<%= app.js.src %>']
modules: ['node_modules', './<%= app.js.src %>']
},
externals: {
jquery: 'jQuery',
Expand All @@ -172,22 +174,20 @@ module.exports = function(grunt) {
select2: 'select2',
'idb-wrapper': 'IDBStore'
},
cache: true,
watch: true
cache: true
},
dev: {
output: {
path: './<%= app.js.build %>/',
path: path.resolve(__dirname, '<%= app.js.build %>/'),
filename: '[name].build.js',
pathinfo: true,
library: 'POS'
},
devtool: 'eval-source-map',
debug: true
devtool: 'eval-source-map'
},
deploy: {
output: {
path: './<%= app.js.build %>/',
path: path.resolve(__dirname, '<%= app.js.build %>'),
filename: '[name].build.js',
library: 'POS'
}
Expand Down Expand Up @@ -241,12 +241,16 @@ module.exports = function(grunt) {
options: {
potFilename: 'woocommerce-pos.pot',
exclude: [
'.html',
'styleguide',
'includes/admin/.*',
'includes/products/.*',
'includes/class-wc-pos-activator.php',
'includes/class-wc-pos-deactivator.php'
],
// include: [
// './*'
// ],
processPot: function( pot ) {
var translation,
excluded_meta = [
Expand Down Expand Up @@ -276,6 +280,7 @@ module.exports = function(grunt) {
options: {
potFilename: 'woocommerce-pos-admin.pot',
exclude: [
'.html',
'styleguide'
],
include: [
Expand Down Expand Up @@ -436,8 +441,11 @@ module.exports = function(grunt) {
// test
grunt.registerTask('test', 'Run unit tests', ['symlink', 'simplemocha']);

// build
grunt.registerTask('build', 'Build projects', ['compass', 'cssmin', 'jshint', 'test', 'webpack:dev', 'uglify']);

// dev
grunt.registerTask('dev', 'Development build', ['compass', 'cssmin', 'jshint', 'test', 'webpack:dev', 'uglify', 'watch']);
grunt.registerTask('dev', 'Development build', ['build', 'watch']);

// deploy
grunt.registerTask('deploy', 'Production build', ['test', 'makepot', 'webpack:deploy', 'js_locales', 'uglify', 'copy', 'compress', 'clean']);
Expand Down
Empty file modified LICENSE.txt
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion assets/css/src/scss/partials/_icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ icon {
.#{current-module()}-#{nth($icon, 1)} {
&:before {
content: unquote($withslash);
color: "#{nth($icon, 3)}";
color: #{nth($icon, 3)};
}
}

Expand Down
14 changes: 10 additions & 4 deletions assets/css/src/scss/partials/_list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ list {

.#{current-module()} {

ul {
> div > ul, > ul {
width: 100%;
margin: 0;
padding: 0;
list-style: none;

li {
> li {
border-bottom: 1px solid $list-border-color;

&:last-of-type {
Expand Down Expand Up @@ -81,9 +81,15 @@ list {
// Default zebra-stripe styles (alternating gray and transparent backgrounds)

.#{current-module()}-striped {
li:nth-of-type(odd) {
background-color: $list-alternate-bg-color;

> div > ul, > ul {

> li:nth-of-type(odd) {
background-color: $list-alternate-bg-color;
}

}

}


Expand Down
15 changes: 15 additions & 0 deletions assets/css/src/scss/partials/_products.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,21 @@ products {
small {
display: block;
}

ul.variations, ul.variant {
list-style: none;
padding: 0;
margin: 0;
font-size: $font-size-sm;
strong {
font-weight: 600;
}
a.active {
color: $text-color;
text-decoration: none;
cursor: default;
}
}
}

.price {
Expand Down
2 changes: 2 additions & 0 deletions assets/css/src/scss/partials/admin/_settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ settings {
font-size: 15px;
line-height: 24px;
border-bottom: 1px solid #ccc;
margin-bottom: -1px;

&.active {
color: #000;
background: #f1f1f1;
Expand Down
Loading