first commit
@@ -0,0 +1,32 @@
|
||||
upstream fastcgi_backend {
|
||||
server pwa-magento.php.dev:9000;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name pwa-magento.test;
|
||||
|
||||
access_log /home/www/website/log/access.log vhosts;
|
||||
error_log /home/www/website/log/error.log;
|
||||
|
||||
set $MAGE_ROOT /home/www/website/www;
|
||||
set $MAGE_MODE developer;
|
||||
#set $MAGE_MODE default;
|
||||
#set $MAGE_MODE production;
|
||||
|
||||
location /sitemaps/ {
|
||||
root /home/www/website/www;
|
||||
try_files $uri =404;
|
||||
allow all;
|
||||
}
|
||||
|
||||
include /home/www/website/www/nginx.conf.sample;
|
||||
fastcgi_read_timeout 3000;
|
||||
client_max_body_size 100M;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass fastcgi_backend;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
/home/www/website/conf/nginx-dev.conf
|
||||
@@ -0,0 +1,32 @@
|
||||
upstream fastcgi_backend {
|
||||
server pwa-magento.php.dev:9000;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name pwa-magento.test;
|
||||
|
||||
access_log /home/www/website/log/access.log vhosts;
|
||||
error_log /home/www/website/log/error.log;
|
||||
|
||||
set $MAGE_ROOT /home/www/website/www;
|
||||
set $MAGE_MODE developer;
|
||||
#set $MAGE_MODE default;
|
||||
#set $MAGE_MODE production;
|
||||
|
||||
location /sitemaps/ {
|
||||
root /home/www/website/www;
|
||||
try_files $uri =404;
|
||||
allow all;
|
||||
}
|
||||
|
||||
include /home/www/website/www/nginx.conf.sample;
|
||||
fastcgi_read_timeout 3000;
|
||||
client_max_body_size 100M;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass fastcgi_backend;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
2019/03/05 13:57:50 [error] 7#7: *2 "/etc/nginx/html/index.html" is not found (2: No such file or directory), client: 172.21.0.1, server: pwa-magento.test, request: "GET / HTTP/1.1", host: "pwa-magento.test"
|
||||
2019/03/05 13:57:50 [error] 7#7: *2 open() "/etc/nginx/html/favicon.ico" failed (2: No such file or directory), client: 172.21.0.1, server: pwa-magento.test, request: "GET /favicon.ico HTTP/1.1", host: "pwa-magento.test", referrer: "http://pwa-magento.test/"
|
||||
@@ -0,0 +1,7 @@
|
||||
<IfVersion < 2.4>
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
@@ -0,0 +1,46 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at engcom@magento.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
@@ -0,0 +1,36 @@
|
||||
# Contributing to Magento 2 code
|
||||
|
||||
Contributions to the Magento 2 codebase are done using the fork & pull model.
|
||||
This contribution model has contributors maintaining their own copy of the forked codebase (which can easily be synced with the main copy). The forked repository is then used to submit a request to the base repository to “pull” a set of changes. For more information on pull requests please refer to [GitHub Help](https://help.github.com/articles/about-pull-requests/).
|
||||
|
||||
Contributions can take the form of new components or features, changes to existing features, tests, documentation (such as developer guides, user guides, examples, or specifications), bug fixes or optimizations.
|
||||
|
||||
The Magento 2 development team will review all issues and contributions submitted by the community of developers in the first in, first out order. During the review we might require clarifications from the contributor. If there is no response from the contributor within two weeks, the pull request will be closed.
|
||||
|
||||
|
||||
## Contribution requirements
|
||||
|
||||
1. Contributions must adhere to the [Magento coding standards](https://devdocs.magento.com/guides/v2.2/coding-standards/bk-coding-standards.html).
|
||||
2. Pull requests (PRs) must be accompanied by a meaningful description of their purpose. Comprehensive descriptions increase the chances of a pull request being merged quickly and without additional clarification requests.
|
||||
3. Commits must be accompanied by meaningful commit messages. Please see the [Magento Pull Request Template](https://github.com/magento/magento2/blob/2.2-develop/.github/PULL_REQUEST_TEMPLATE.md) for more information.
|
||||
4. PRs which include bug fixes must be accompanied with a step-by-step description of how to reproduce the bug.
|
||||
3. PRs which include new logic or new features must be submitted along with:
|
||||
* Unit/integration test coverage
|
||||
* Proposed [documentation](http://devdocs.magento.com) updates. Documentation contributions can be submitted via the [devdocs GitHub](https://github.com/magento/devdocs).
|
||||
4. For larger features or changes, please [open an issue](https://github.com/magento/magento2/issues) to discuss the proposed changes prior to development. This may prevent duplicate or unnecessary effort and allow other contributors to provide input.
|
||||
5. All automated tests must pass (all builds on [Travis CI](https://travis-ci.org/magento/magento2) must be green).
|
||||
|
||||
## Contribution process
|
||||
|
||||
If you are a new GitHub user, we recommend that you create your own [free github account](https://github.com/signup/free). This will allow you to collaborate with the Magento 2 development team, fork the Magento 2 project and send pull requests.
|
||||
|
||||
1. Search current [listed issues](https://github.com/magento/magento2/issues) (open or closed) for similar proposals of intended contribution before starting work on a new contribution.
|
||||
2. Review the [Contributor License Agreement](https://magento.com/legaldocuments/mca) if this is your first time contributing.
|
||||
3. Create and test your work.
|
||||
4. Fork the Magento 2 repository according to the [Fork A Repository instructions](http://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#fork) and when you are ready to send us a pull request – follow the [Create A Pull Request instructions](http://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#pull_request).
|
||||
5. Once your contribution is received the Magento 2 development team will review the contribution and collaborate with you as needed.
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
Please note that this project is released with a Contributor Code of Conduct. We expect you to agree to its terms when participating in this project.
|
||||
The full text is available in the repository [Wiki](https://github.com/magento/magento2/wiki/Magento-Code-of-Conduct).
|
||||
@@ -0,0 +1,35 @@
|
||||
<!---
|
||||
Thank you for contributing to Magento.
|
||||
To help us process this issue we recommend that you add the following information:
|
||||
- Summary of the issue,
|
||||
- Information on your environment,
|
||||
- Steps to reproduce,
|
||||
- Expected and actual results,
|
||||
|
||||
Please also have a look at our guidelines article before adding a new issue https://github.com/magento/magento2/wiki/Issue-reporting-guidelines
|
||||
-->
|
||||
|
||||
### Preconditions
|
||||
<!---
|
||||
Please provide as detailed information about your environment as possible.
|
||||
For example Magento version, tag, HEAD, PHP & MySQL version, etc..
|
||||
-->
|
||||
1.
|
||||
2.
|
||||
|
||||
### Steps to reproduce
|
||||
<!---
|
||||
It is important to provide a set of clear steps to reproduce this bug.
|
||||
If relevant please include code samples
|
||||
-->
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
### Expected result
|
||||
<!--- Tell us what should happen -->
|
||||
1. [Screenshots, logs or description]
|
||||
|
||||
### Actual result
|
||||
<!--- Tell us what happens instead -->
|
||||
1. [Screenshots, logs or description]
|
||||
@@ -0,0 +1,33 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Technical issue with the Magento 2 core components
|
||||
|
||||
---
|
||||
|
||||
<!---
|
||||
Please review our guidelines before adding a new issue: https://github.com/magento/magento2/wiki/Issue-reporting-guidelines
|
||||
-->
|
||||
|
||||
### Preconditions
|
||||
<!---
|
||||
Provide the exact Magento version (example: 2.2.5) and any important information on the environment where bug is reproducible.
|
||||
-->
|
||||
1.
|
||||
2.
|
||||
|
||||
### Steps to reproduce
|
||||
<!---
|
||||
Important: Provide a set of clear steps to reproduce this bug. We can not provide support without clear instructions on how to reproduce.
|
||||
-->
|
||||
1.
|
||||
2.
|
||||
|
||||
### Expected result
|
||||
<!--- Tell us what do you expect to happen. -->
|
||||
1. [Screenshots, logs or description]
|
||||
2.
|
||||
|
||||
### Actual result
|
||||
<!--- Tell us what happened instead. Include error messages and issues. -->
|
||||
1. [Screenshots, logs or description]
|
||||
2.
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
name: Developer experience issue
|
||||
about: Issues related to customization, extensibility, modularity
|
||||
|
||||
---
|
||||
|
||||
<!---
|
||||
Please review our guidelines before adding a new issue: https://github.com/magento/magento2/wiki/Issue-reporting-guidelines
|
||||
-->
|
||||
|
||||
### Summary
|
||||
<!--- Describe the issue you are experiencing. Include general information, error messages, environments, and so on. -->
|
||||
|
||||
### Examples
|
||||
<!--- Provide code examples or a patch with a test (recommended) to clearly indicate the problem. -->
|
||||
|
||||
### Proposed solution
|
||||
<!--- Suggest your potential solutions for this issue. -->
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Please consider reporting directly to https://github.com/magento/community-features
|
||||
|
||||
---
|
||||
|
||||
<!---
|
||||
Important: This repository is intended only for Magento 2 Technical Issues. Enter Feature Requests at https://github.com/magento/community-features. Project stakeholders monitor and manage requests. Feature requests entered using this form may be moved to the forum.
|
||||
-->
|
||||
|
||||
### Description
|
||||
<!--- Describe the feature you would like to add. -->
|
||||
|
||||
### Expected behavior
|
||||
<!--- What is the expected behavior of this feature? How is it going to work? -->
|
||||
|
||||
### Benefits
|
||||
<!--- How do you think this feature would improve Magento? -->
|
||||
|
||||
### Additional information
|
||||
<!--- What other information can you provide about the desired feature? -->
|
||||
@@ -0,0 +1,37 @@
|
||||
<!---
|
||||
Thank you for contributing to Magento.
|
||||
To help us process this pull request we recommend that you add the following information:
|
||||
- Summary of the pull request,
|
||||
- Issue(s) related to the changes made,
|
||||
- Manual testing scenarios,
|
||||
-->
|
||||
|
||||
<!--- Please provide a general summary of the Pull Request in the Title above -->
|
||||
|
||||
### Description
|
||||
<!---
|
||||
Please provide a description of the changes proposed in the pull request.
|
||||
Letting us know what has changed and why it needed changing will help us validate this pull request.
|
||||
-->
|
||||
|
||||
### Fixed Issues (if relevant)
|
||||
<!---
|
||||
If relevant, please provide a list of fixed issues in the format magento/magento2#<issue_number>.
|
||||
There could be 1 or more issues linked here and it will help us find some more information about the reasoning behind this change.
|
||||
-->
|
||||
1. magento/magento2#<issue_number>: Issue title
|
||||
2. ...
|
||||
|
||||
### Manual testing scenarios
|
||||
<!---
|
||||
Please provide a set of unambiguous steps to test the proposed code change.
|
||||
Giving us manual testing scenarios will help with the processing and validation process.
|
||||
-->
|
||||
1. ...
|
||||
2. ...
|
||||
|
||||
### Contribution checklist
|
||||
- [ ] Pull request has a meaningful description of its purpose
|
||||
- [ ] All commits are accompanied by meaningful commit messages
|
||||
- [ ] All new or changed code is covered with unit/integration tests (if applicable)
|
||||
- [ ] All automated tests passed successfully (all builds on Travis CI are green)
|
||||
@@ -0,0 +1,68 @@
|
||||
/.buildpath
|
||||
/.cache
|
||||
/.metadata
|
||||
/.project
|
||||
/.settings
|
||||
/.vscode
|
||||
atlassian*
|
||||
/nbproject
|
||||
/robots.txt
|
||||
/pub/robots.txt
|
||||
/sitemap
|
||||
/sitemap.xml
|
||||
/pub/sitemap
|
||||
/pub/sitemap.xml
|
||||
/.idea
|
||||
/.gitattributes
|
||||
/app/config_sandbox
|
||||
/app/etc/env.php
|
||||
/app/code/Magento/TestModule*
|
||||
/lib/internal/flex/uploader/.actionScriptProperties
|
||||
/lib/internal/flex/uploader/.flexProperties
|
||||
/lib/internal/flex/uploader/.project
|
||||
/lib/internal/flex/uploader/.settings
|
||||
/lib/internal/flex/varien/.actionScriptProperties
|
||||
/lib/internal/flex/varien/.flexLibProperties
|
||||
/lib/internal/flex/varien/.project
|
||||
/lib/internal/flex/varien/.settings
|
||||
/node_modules
|
||||
/.grunt
|
||||
/Gruntfile.js
|
||||
/package.json
|
||||
/.php_cs
|
||||
/.php_cs.cache
|
||||
/grunt-config.json
|
||||
/dev/tools/grunt/configs/local-themes.js
|
||||
/pub/media/*.*
|
||||
!/pub/media/.htaccess
|
||||
/pub/media/attribute/*
|
||||
!/pub/media/attribute/.htaccess
|
||||
/pub/media/analytics/*
|
||||
/pub/media/catalog/*
|
||||
!/pub/media/catalog/.htaccess
|
||||
/pub/media/customer/*
|
||||
!/pub/media/customer/.htaccess
|
||||
/pub/media/downloadable/*
|
||||
!/pub/media/downloadable/.htaccess
|
||||
/pub/media/favicon/*
|
||||
/pub/media/import/*
|
||||
!/pub/media/import/.htaccess
|
||||
/pub/media/logo/*
|
||||
/pub/media/theme/*
|
||||
/pub/media/theme_customization/*
|
||||
!/pub/media/theme_customization/.htaccess
|
||||
/pub/media/wysiwyg/*
|
||||
!/pub/media/wysiwyg/.htaccess
|
||||
/pub/media/tmp/*
|
||||
!/pub/media/tmp/.htaccess
|
||||
/pub/media/captcha/*
|
||||
/pub/static/*
|
||||
!/pub/static/.htaccess
|
||||
|
||||
/var/*
|
||||
!/var/.htaccess
|
||||
/vendor/*
|
||||
!/vendor/.htaccess
|
||||
/generated/*
|
||||
!/generated/.htaccess
|
||||
.DS_Store
|
||||
@@ -0,0 +1,411 @@
|
||||
############################################
|
||||
## overrides deployment configuration mode value
|
||||
## use command bin/magento deploy:mode:set to switch modes
|
||||
|
||||
# SetEnv MAGE_MODE developer
|
||||
|
||||
############################################
|
||||
## uncomment these lines for CGI mode
|
||||
## make sure to specify the correct cgi php binary file name
|
||||
## it might be /cgi-bin/php-cgi
|
||||
|
||||
# Action php5-cgi /cgi-bin/php5-cgi
|
||||
# AddHandler php5-cgi .php
|
||||
|
||||
############################################
|
||||
## GoDaddy specific options
|
||||
|
||||
# Options -MultiViews
|
||||
|
||||
## you might also need to add this line to php.ini
|
||||
## cgi.fix_pathinfo = 1
|
||||
## if it still doesn't work, rename php.ini to php5.ini
|
||||
|
||||
############################################
|
||||
## this line is specific for 1and1 hosting
|
||||
|
||||
#AddType x-mapp-php5 .php
|
||||
#AddHandler x-mapp-php5 .php
|
||||
|
||||
############################################
|
||||
## default index file
|
||||
|
||||
DirectoryIndex index.php
|
||||
|
||||
<IfModule mod_php5.c>
|
||||
############################################
|
||||
## adjust memory limit
|
||||
|
||||
php_value memory_limit 756M
|
||||
php_value max_execution_time 18000
|
||||
|
||||
############################################
|
||||
## disable automatic session start
|
||||
## before autoload was initialized
|
||||
|
||||
php_flag session.auto_start off
|
||||
|
||||
############################################
|
||||
## enable resulting html compression
|
||||
|
||||
#php_flag zlib.output_compression on
|
||||
|
||||
###########################################
|
||||
## disable user agent verification to not break multiple image upload
|
||||
|
||||
php_flag suhosin.session.cryptua off
|
||||
</IfModule>
|
||||
<IfModule mod_php7.c>
|
||||
############################################
|
||||
## adjust memory limit
|
||||
|
||||
php_value memory_limit 756M
|
||||
php_value max_execution_time 18000
|
||||
|
||||
############################################
|
||||
## disable automatic session start
|
||||
## before autoload was initialized
|
||||
|
||||
php_flag session.auto_start off
|
||||
|
||||
############################################
|
||||
## enable resulting html compression
|
||||
|
||||
#php_flag zlib.output_compression on
|
||||
|
||||
###########################################
|
||||
## disable user agent verification to not break multiple image upload
|
||||
|
||||
php_flag suhosin.session.cryptua off
|
||||
</IfModule>
|
||||
<IfModule mod_security.c>
|
||||
###########################################
|
||||
## disable POST processing to not break multiple image upload
|
||||
|
||||
SecFilterEngine Off
|
||||
SecFilterScanPOST Off
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_deflate.c>
|
||||
|
||||
############################################
|
||||
## enable apache served files compression
|
||||
## http://developer.yahoo.com/performance/rules.html#gzip
|
||||
|
||||
# Insert filter on all content
|
||||
###SetOutputFilter DEFLATE
|
||||
# Insert filter on selected content types only
|
||||
#AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript application/json image/svg+xml
|
||||
|
||||
# Netscape 4.x has some problems...
|
||||
#BrowserMatch ^Mozilla/4 gzip-only-text/html
|
||||
|
||||
# Netscape 4.06-4.08 have some more problems
|
||||
#BrowserMatch ^Mozilla/4\.0[678] no-gzip
|
||||
|
||||
# MSIE masquerades as Netscape, but it is fine
|
||||
#BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
|
||||
|
||||
# Don't compress images
|
||||
#SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
|
||||
|
||||
# Make sure proxies don't deliver the wrong content
|
||||
#Header append Vary User-Agent env=!dont-vary
|
||||
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_ssl.c>
|
||||
|
||||
############################################
|
||||
## make HTTPS env vars available for CGI mode
|
||||
|
||||
SSLOptions StdEnvVars
|
||||
|
||||
</IfModule>
|
||||
|
||||
############################################
|
||||
## workaround for Apache 2.4.6 CentOS build when working via ProxyPassMatch with HHVM (or any other)
|
||||
## Please, set it on virtual host configuration level
|
||||
|
||||
## SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
|
||||
############################################
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
|
||||
############################################
|
||||
## enable rewrites
|
||||
|
||||
Options +FollowSymLinks
|
||||
RewriteEngine on
|
||||
|
||||
############################################
|
||||
## you can put here your magento root folder
|
||||
## path relative to web root
|
||||
|
||||
#RewriteBase /magento/
|
||||
|
||||
############################################
|
||||
## workaround for HTTP authorization
|
||||
## in CGI environment
|
||||
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
|
||||
############################################
|
||||
## TRACE and TRACK HTTP methods disabled to prevent XSS attacks
|
||||
|
||||
RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
|
||||
RewriteRule .* - [L,R=405]
|
||||
|
||||
############################################
|
||||
## redirect for mobile user agents
|
||||
|
||||
#RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.*$
|
||||
#RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
|
||||
#RewriteRule ^(.*)$ /mobiledirectoryhere/ [L,R=302]
|
||||
|
||||
############################################
|
||||
## never rewrite for existing files, directories and links
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-l
|
||||
|
||||
############################################
|
||||
## rewrite everything else to index.php
|
||||
|
||||
RewriteRule .* index.php [L]
|
||||
|
||||
</IfModule>
|
||||
|
||||
|
||||
############################################
|
||||
## Prevent character encoding issues from server overrides
|
||||
## If you still have problems, use the second line instead
|
||||
|
||||
AddDefaultCharset Off
|
||||
#AddDefaultCharset UTF-8
|
||||
AddType 'text/html; charset=UTF-8' html
|
||||
|
||||
<IfModule mod_expires.c>
|
||||
|
||||
############################################
|
||||
## Add default Expires header
|
||||
## http://developer.yahoo.com/performance/rules.html#expires
|
||||
|
||||
ExpiresDefault "access plus 1 year"
|
||||
ExpiresByType text/html A0
|
||||
ExpiresByType text/plain A0
|
||||
|
||||
</IfModule>
|
||||
|
||||
###########################################
|
||||
## Deny access to root files to hide sensitive application information
|
||||
RedirectMatch 403 /\.git
|
||||
|
||||
<Files composer.json>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files composer.lock>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files .gitignore>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files .htaccess>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files .htaccess.sample>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files .php_cs.dist>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files .travis.yml>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files CHANGELOG.md>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files COPYING.txt>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files Gruntfile.js>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files LICENSE.txt>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files LICENSE_AFL.txt>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files nginx.conf.sample>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files package.json>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files php.ini.sample>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files README.md>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files magento_umask>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files auth.json>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
|
||||
# For 404s and 403s that aren't handled by the application, show plain 404 response
|
||||
ErrorDocument 404 /pub/errors/404.php
|
||||
ErrorDocument 403 /pub/errors/404.php
|
||||
|
||||
################################
|
||||
## If running in cluster environment, uncomment this
|
||||
## http://developer.yahoo.com/performance/rules.html#etags
|
||||
|
||||
#FileETag none
|
||||
|
||||
# ######################################################################
|
||||
# # INTERNET EXPLORER #
|
||||
# ######################################################################
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Document modes |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Force Internet Explorer 8/9/10 to render pages in the highest mode
|
||||
# available in the various cases when it may not.
|
||||
#
|
||||
# https://hsivonen.fi/doctype/#ie8
|
||||
#
|
||||
# (!) Starting with Internet Explorer 11, document modes are deprecated.
|
||||
# If your business still relies on older web apps and services that were
|
||||
# designed for older versions of Internet Explorer, you might want to
|
||||
# consider enabling `Enterprise Mode` throughout your company.
|
||||
#
|
||||
# https://msdn.microsoft.com/en-us/library/ie/bg182625.aspx#docmode
|
||||
# http://blogs.msdn.com/b/ie/archive/2014/04/02/stay-up-to-date-with-enterprise-mode-for-internet-explorer-11.aspx
|
||||
|
||||
<IfModule mod_headers.c>
|
||||
|
||||
Header set X-UA-Compatible "IE=edge"
|
||||
|
||||
# `mod_headers` cannot match based on the content-type, however,
|
||||
# the `X-UA-Compatible` response header should be send only for
|
||||
# HTML documents and not for the other resources.
|
||||
|
||||
<FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$">
|
||||
Header unset X-UA-Compatible
|
||||
</FilesMatch>
|
||||
|
||||
</IfModule>
|
||||
@@ -0,0 +1,388 @@
|
||||
############################################
|
||||
## overrides deployment configuration mode value
|
||||
## use command bin/magento deploy:mode:set to switch modes
|
||||
|
||||
# SetEnv MAGE_MODE developer
|
||||
|
||||
############################################
|
||||
## uncomment these lines for CGI mode
|
||||
## make sure to specify the correct cgi php binary file name
|
||||
## it might be /cgi-bin/php-cgi
|
||||
|
||||
# Action php5-cgi /cgi-bin/php5-cgi
|
||||
# AddHandler php5-cgi .php
|
||||
|
||||
############################################
|
||||
## GoDaddy specific options
|
||||
|
||||
# Options -MultiViews
|
||||
|
||||
## you might also need to add this line to php.ini
|
||||
## cgi.fix_pathinfo = 1
|
||||
## if it still doesn't work, rename php.ini to php5.ini
|
||||
|
||||
############################################
|
||||
## this line is specific for 1and1 hosting
|
||||
|
||||
#AddType x-mapp-php5 .php
|
||||
#AddHandler x-mapp-php5 .php
|
||||
|
||||
############################################
|
||||
## default index file
|
||||
|
||||
DirectoryIndex index.php
|
||||
|
||||
############################################
|
||||
## adjust memory limit
|
||||
|
||||
php_value memory_limit 756M
|
||||
php_value max_execution_time 18000
|
||||
|
||||
############################################
|
||||
## disable automatic session start
|
||||
## before autoload was initialized
|
||||
|
||||
php_flag session.auto_start off
|
||||
|
||||
############################################
|
||||
## enable resulting html compression
|
||||
|
||||
#php_flag zlib.output_compression on
|
||||
|
||||
###########################################
|
||||
## disable user agent verification to not break multiple image upload
|
||||
|
||||
php_flag suhosin.session.cryptua off
|
||||
|
||||
<IfModule mod_security.c>
|
||||
###########################################
|
||||
## disable POST processing to not break multiple image upload
|
||||
|
||||
SecFilterEngine Off
|
||||
SecFilterScanPOST Off
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_deflate.c>
|
||||
|
||||
############################################
|
||||
## enable apache served files compression
|
||||
## http://developer.yahoo.com/performance/rules.html#gzip
|
||||
|
||||
# Insert filter on all content
|
||||
###SetOutputFilter DEFLATE
|
||||
# Insert filter on selected content types only
|
||||
#AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript application/json image/svg+xml
|
||||
|
||||
# Netscape 4.x has some problems...
|
||||
#BrowserMatch ^Mozilla/4 gzip-only-text/html
|
||||
|
||||
# Netscape 4.06-4.08 have some more problems
|
||||
#BrowserMatch ^Mozilla/4\.0[678] no-gzip
|
||||
|
||||
# MSIE masquerades as Netscape, but it is fine
|
||||
#BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
|
||||
|
||||
# Don't compress images
|
||||
#SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
|
||||
|
||||
# Make sure proxies don't deliver the wrong content
|
||||
#Header append Vary User-Agent env=!dont-vary
|
||||
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_ssl.c>
|
||||
|
||||
############################################
|
||||
## make HTTPS env vars available for CGI mode
|
||||
|
||||
SSLOptions StdEnvVars
|
||||
|
||||
</IfModule>
|
||||
|
||||
############################################
|
||||
## workaround for Apache 2.4.6 CentOS build when working via ProxyPassMatch with HHVM (or any other)
|
||||
## Please, set it on virtual host configuration level
|
||||
|
||||
## SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
|
||||
############################################
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
|
||||
############################################
|
||||
## enable rewrites
|
||||
|
||||
# The following line has better security but add some performance overhead - see https://httpd.apache.org/docs/2.4/en/misc/perf-tuning.html
|
||||
Options -FollowSymLinks +SymLinksIfOwnerMatch
|
||||
RewriteEngine on
|
||||
|
||||
############################################
|
||||
## you can put here your magento root folder
|
||||
## path relative to web root
|
||||
|
||||
#RewriteBase /magento/
|
||||
|
||||
############################################
|
||||
## workaround for HTTP authorization
|
||||
## in CGI environment
|
||||
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
|
||||
############################################
|
||||
## TRACE and TRACK HTTP methods disabled to prevent XSS attacks
|
||||
|
||||
RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
|
||||
RewriteRule .* - [L,R=405]
|
||||
|
||||
############################################
|
||||
## redirect for mobile user agents
|
||||
|
||||
#RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.*$
|
||||
#RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
|
||||
#RewriteRule ^(.*)$ /mobiledirectoryhere/ [L,R=302]
|
||||
|
||||
############################################
|
||||
## never rewrite for existing files, directories and links
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-l
|
||||
|
||||
############################################
|
||||
## rewrite everything else to index.php
|
||||
|
||||
RewriteRule .* index.php [L]
|
||||
|
||||
</IfModule>
|
||||
|
||||
|
||||
############################################
|
||||
## Prevent character encoding issues from server overrides
|
||||
## If you still have problems, use the second line instead
|
||||
|
||||
AddDefaultCharset Off
|
||||
#AddDefaultCharset UTF-8
|
||||
AddType 'text/html; charset=UTF-8' html
|
||||
|
||||
<IfModule mod_expires.c>
|
||||
|
||||
############################################
|
||||
## Add default Expires header
|
||||
## http://developer.yahoo.com/performance/rules.html#expires
|
||||
|
||||
ExpiresDefault "access plus 1 year"
|
||||
ExpiresByType text/html A0
|
||||
ExpiresByType text/plain A0
|
||||
|
||||
</IfModule>
|
||||
|
||||
###########################################
|
||||
## Deny access to root files to hide sensitive application information
|
||||
RedirectMatch 403 /\.git
|
||||
|
||||
<Files composer.json>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files composer.lock>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files .gitignore>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files .htaccess>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files .htaccess.sample>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files .php_cs.dist>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files .travis.yml>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files CHANGELOG.md>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files COPYING.txt>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files Gruntfile.js>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files LICENSE.txt>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files LICENSE_AFL.txt>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files nginx.conf.sample>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files package.json>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files php.ini.sample>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files README.md>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files magento_umask>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
<Files auth.json>
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
|
||||
# For 404s and 403s that aren't handled by the application, show plain 404 response
|
||||
ErrorDocument 404 /pub/errors/404.php
|
||||
ErrorDocument 403 /pub/errors/404.php
|
||||
|
||||
################################
|
||||
## If running in cluster environment, uncomment this
|
||||
## http://developer.yahoo.com/performance/rules.html#etags
|
||||
|
||||
#FileETag none
|
||||
|
||||
# ######################################################################
|
||||
# # INTERNET EXPLORER #
|
||||
# ######################################################################
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Document modes |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Force Internet Explorer 8/9/10 to render pages in the highest mode
|
||||
# available in the various cases when it may not.
|
||||
#
|
||||
# https://hsivonen.fi/doctype/#ie8
|
||||
#
|
||||
# (!) Starting with Internet Explorer 11, document modes are deprecated.
|
||||
# If your business still relies on older web apps and services that were
|
||||
# designed for older versions of Internet Explorer, you might want to
|
||||
# consider enabling `Enterprise Mode` throughout your company.
|
||||
#
|
||||
# https://msdn.microsoft.com/en-us/library/ie/bg182625.aspx#docmode
|
||||
# http://blogs.msdn.com/b/ie/archive/2014/04/02/stay-up-to-date-with-enterprise-mode-for-internet-explorer-11.aspx
|
||||
|
||||
<IfModule mod_headers.c>
|
||||
|
||||
Header set X-UA-Compatible "IE=edge"
|
||||
|
||||
# `mod_headers` cannot match based on the content-type, however,
|
||||
# the `X-UA-Compatible` response header should be send only for
|
||||
# HTML documents and not for the other resources.
|
||||
|
||||
<FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$">
|
||||
Header unset X-UA-Compatible
|
||||
</FilesMatch>
|
||||
|
||||
</IfModule>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* PHP Coding Standards fixer configuration
|
||||
*/
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->name('*.phtml')
|
||||
->exclude('dev/tests/functional/generated')
|
||||
->exclude('dev/tests/functional/var')
|
||||
->exclude('dev/tests/functional/vendor')
|
||||
->exclude('dev/tests/integration/tmp')
|
||||
->exclude('dev/tests/integration/var')
|
||||
->exclude('lib/internal/Cm')
|
||||
->exclude('lib/internal/Credis')
|
||||
->exclude('lib/internal/Less')
|
||||
->exclude('lib/internal/LinLibertineFont')
|
||||
->exclude('pub/media')
|
||||
->exclude('pub/static')
|
||||
->exclude('setup/vendor')
|
||||
->exclude('var');
|
||||
|
||||
return PhpCsFixer\Config::create()
|
||||
->setFinder($finder)
|
||||
->setRules([
|
||||
'@PSR2' => true,
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
'concat_space' => ['spacing' => 'one'],
|
||||
'include' => true,
|
||||
'new_with_braces' => true,
|
||||
'no_empty_statement' => true,
|
||||
'no_extra_consecutive_blank_lines' => true,
|
||||
'no_leading_import_slash' => true,
|
||||
'no_leading_namespace_whitespace' => true,
|
||||
'no_multiline_whitespace_around_double_arrow' => true,
|
||||
'no_multiline_whitespace_before_semicolons' => true,
|
||||
'no_singleline_whitespace_before_semicolons' => true,
|
||||
'no_trailing_comma_in_singleline_array' => true,
|
||||
'no_unused_imports' => true,
|
||||
'no_whitespace_in_blank_line' => true,
|
||||
'object_operator_without_whitespace' => true,
|
||||
'ordered_imports' => true,
|
||||
'standardize_not_equals' => true,
|
||||
'ternary_operator_spaces' => true,
|
||||
]);
|
||||
@@ -0,0 +1,65 @@
|
||||
sudo: required
|
||||
dist: trusty
|
||||
group: edge
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- mysql-server-5.6
|
||||
- mysql-client-core-5.6
|
||||
- mysql-client-5.6
|
||||
- postfix
|
||||
firefox: "46.0"
|
||||
hosts:
|
||||
- magento2.travis
|
||||
services:
|
||||
- rabbitmq
|
||||
- elasticsearch
|
||||
language: php
|
||||
php:
|
||||
- 7.1
|
||||
- 7.2
|
||||
env:
|
||||
global:
|
||||
- COMPOSER_BIN_DIR=~/bin
|
||||
- INTEGRATION_SETS=3
|
||||
- NODE_JS_VERSION=8
|
||||
- MAGENTO_HOST_NAME="magento2.travis"
|
||||
matrix:
|
||||
- TEST_SUITE=unit
|
||||
- TEST_SUITE=static
|
||||
- TEST_SUITE=js GRUNT_COMMAND=spec
|
||||
- TEST_SUITE=js GRUNT_COMMAND=static
|
||||
- TEST_SUITE=integration INTEGRATION_INDEX=1
|
||||
- TEST_SUITE=integration INTEGRATION_INDEX=2
|
||||
- TEST_SUITE=integration INTEGRATION_INDEX=3
|
||||
- TEST_SUITE=functional
|
||||
matrix:
|
||||
exclude:
|
||||
- php: 7.1
|
||||
env: TEST_SUITE=static
|
||||
- php: 7.1
|
||||
env: TEST_SUITE=js GRUNT_COMMAND=spec
|
||||
- php: 7.1
|
||||
env: TEST_SUITE=js GRUNT_COMMAND=static
|
||||
- php: 7.1
|
||||
env: TEST_SUITE=functional
|
||||
cache:
|
||||
apt: true
|
||||
directories:
|
||||
- $HOME/.composer/cache
|
||||
- $HOME/.nvm
|
||||
- $HOME/node_modules
|
||||
- $HOME/yarn.lock
|
||||
before_install:
|
||||
- curl -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.3.0/elasticsearch-2.3.0.deb && sudo dpkg -i --force-confnew elasticsearch-2.3.0.deb && sudo service elasticsearch restart
|
||||
- ./dev/travis/before_install.sh
|
||||
install: composer install --no-interaction
|
||||
before_script: ./dev/travis/before_script.sh
|
||||
script:
|
||||
# Set arguments for variants of phpunit based tests; '|| true' prevents failing script when leading test fails
|
||||
- test $TEST_SUITE = "functional" && TEST_FILTER='dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests.php' || true
|
||||
|
||||
# The scripts for grunt/phpunit type tests
|
||||
- if [ $TEST_SUITE == "functional" ]; then dev/tests/functional/vendor/phpunit/phpunit/phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
|
||||
- if [ $TEST_SUITE != "functional" ] && [ $TEST_SUITE != "js" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
|
||||
- if [ $TEST_SUITE == "js" ]; then grunt $GRUNT_COMMAND; fi
|
||||
@@ -0,0 +1,4 @@
|
||||
memory_limit = 756M
|
||||
max_execution_time = 18000
|
||||
session.auto_start = off
|
||||
suhosin.session.cryptua = off
|
||||
@@ -0,0 +1,9 @@
|
||||
Copyright © 2013-present Magento, Inc.
|
||||
|
||||
Each Magento source file included in this distribution is licensed under OSL 3.0 or the Magento Enterprise Edition (MEE) license
|
||||
|
||||
http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
Please see LICENSE.txt for the full text of the OSL 3.0 license or contact license@magentocommerce.com for a copy.
|
||||
|
||||
Subject to Licensee's payment of fees and compliance with the terms and conditions of the MEE License, the MEE License supersedes the OSL 3.0 license for each source file.
|
||||
Please see LICENSE_EE.txt for the full text of the MEE License or visit http://magento.com/legal/terms/enterprise.
|
||||
@@ -0,0 +1,109 @@
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
// For performance use one level down: 'name/{,*/}*.js'
|
||||
// If you want to recursively match all subfolders, use: 'name/**/*.js'
|
||||
|
||||
module.exports = function (grunt) {
|
||||
'use strict';
|
||||
|
||||
var _ = require('underscore'),
|
||||
path = require('path'),
|
||||
filesRouter = require('./dev/tools/grunt/tools/files-router'),
|
||||
configDir = './dev/tools/grunt/configs',
|
||||
tasks = grunt.file.expand('./dev/tools/grunt/tasks/*'),
|
||||
themes;
|
||||
|
||||
filesRouter.set('themes', 'dev/tools/grunt/configs/themes');
|
||||
themes = filesRouter.get('themes');
|
||||
|
||||
tasks = _.map(tasks, function(task){ return task.replace('.js', '') });
|
||||
tasks.push('time-grunt');
|
||||
tasks.forEach(function (task) {
|
||||
require(task)(grunt);
|
||||
});
|
||||
|
||||
require('load-grunt-config')(grunt, {
|
||||
configPath: path.join(__dirname, configDir),
|
||||
init: true,
|
||||
jitGrunt: {
|
||||
staticMappings: {
|
||||
usebanner: 'grunt-banner'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
_.each({
|
||||
/**
|
||||
* Assembling tasks.
|
||||
* ToDo: define default tasks.
|
||||
*/
|
||||
default: function () {
|
||||
grunt.log.subhead('I\'m default task and at the moment I\'m empty, sorry :/');
|
||||
},
|
||||
|
||||
/**
|
||||
* Production preparation task.
|
||||
*/
|
||||
prod: function (component) {
|
||||
var tasks = [
|
||||
'less',
|
||||
'autoprefixer',
|
||||
'cssmin',
|
||||
'usebanner'
|
||||
].map(function(task){
|
||||
return task + ':' + component;
|
||||
});
|
||||
|
||||
if (typeof component === 'undefined') {
|
||||
grunt.log.subhead('Tip: Please make sure that u specify prod subtask. By default prod task do nothing');
|
||||
} else {
|
||||
grunt.task.run(tasks);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Refresh themes.
|
||||
*/
|
||||
refresh: function () {
|
||||
var tasks = [
|
||||
'clean',
|
||||
'exec:all'
|
||||
];
|
||||
_.each(themes, function(theme, name) {
|
||||
tasks.push('less:' + name);
|
||||
});
|
||||
grunt.task.run(tasks);
|
||||
},
|
||||
|
||||
/**
|
||||
* Documentation
|
||||
*/
|
||||
documentation: [
|
||||
'replace:documentation',
|
||||
'less:documentation',
|
||||
'styledocco:documentation',
|
||||
'usebanner:documentationCss',
|
||||
'usebanner:documentationLess',
|
||||
'usebanner:documentationHtml',
|
||||
'clean:var',
|
||||
'clean:pub'
|
||||
],
|
||||
|
||||
'legacy-build': [
|
||||
'mage-minify:legacy'
|
||||
],
|
||||
|
||||
spec: function (theme) {
|
||||
var runner = require('./dev/tests/js/jasmine/spec_runner');
|
||||
|
||||
runner.init(grunt, { theme: theme });
|
||||
|
||||
grunt.task.run(runner.getTasks());
|
||||
}
|
||||
}, function (task, name) {
|
||||
grunt.registerTask(name, task);
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,48 @@
|
||||
|
||||
Open Software License ("OSL") v. 3.0
|
||||
|
||||
This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
|
||||
|
||||
Licensed under the Open Software License version 3.0
|
||||
|
||||
1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
|
||||
|
||||
1. to reproduce the Original Work in copies, either alone or as part of a collective work;
|
||||
|
||||
2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
|
||||
|
||||
3. to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License;
|
||||
|
||||
4. to perform the Original Work publicly; and
|
||||
|
||||
5. to display the Original Work publicly.
|
||||
|
||||
2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
|
||||
|
||||
3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
|
||||
|
||||
4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
|
||||
|
||||
5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
|
||||
|
||||
6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
|
||||
|
||||
7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
|
||||
|
||||
8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
|
||||
|
||||
9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
|
||||
|
||||
10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
|
||||
|
||||
11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
|
||||
|
||||
12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
|
||||
|
||||
13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
|
||||
|
||||
14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
|
||||
|
||||
16. Modification of This License. This License is Copyright (C) 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.
|
||||
@@ -0,0 +1,48 @@
|
||||
|
||||
Academic Free License ("AFL") v. 3.0
|
||||
|
||||
This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
|
||||
|
||||
Licensed under the Academic Free License version 3.0
|
||||
|
||||
1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
|
||||
|
||||
1. to reproduce the Original Work in copies, either alone or as part of a collective work;
|
||||
|
||||
2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
|
||||
|
||||
3. to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License;
|
||||
|
||||
4. to perform the Original Work publicly; and
|
||||
|
||||
5. to display the Original Work publicly.
|
||||
|
||||
2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
|
||||
|
||||
3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
|
||||
|
||||
4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
|
||||
|
||||
5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
|
||||
|
||||
6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
|
||||
|
||||
7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
|
||||
|
||||
8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
|
||||
|
||||
9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
|
||||
|
||||
10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
|
||||
|
||||
11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
|
||||
|
||||
12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
|
||||
|
||||
13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
|
||||
|
||||
14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
|
||||
|
||||
16. Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.
|
||||
@@ -0,0 +1,8 @@
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* Register basic autoloader that uses include path
|
||||
*
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
use Magento\Framework\Autoload\AutoloaderRegistry;
|
||||
use Magento\Framework\Autoload\ClassLoaderWrapper;
|
||||
|
||||
/**
|
||||
* Shortcut constant for the root directory
|
||||
*/
|
||||
define('BP', dirname(__DIR__));
|
||||
|
||||
define('VENDOR_PATH', BP . '/app/etc/vendor_path.php');
|
||||
|
||||
if (!file_exists(VENDOR_PATH)) {
|
||||
throw new \Exception(
|
||||
'We can\'t read some files that are required to run the Magento application. '
|
||||
. 'This usually means file permissions are set incorrectly.'
|
||||
);
|
||||
}
|
||||
|
||||
$vendorDir = require VENDOR_PATH;
|
||||
$vendorAutoload = BP . "/{$vendorDir}/autoload.php";
|
||||
|
||||
/* 'composer install' validation */
|
||||
if (file_exists($vendorAutoload)) {
|
||||
$composerAutoloader = include $vendorAutoload;
|
||||
} else {
|
||||
throw new \Exception(
|
||||
'Vendor autoload is not found. Please run \'composer install\' under application root directory.'
|
||||
);
|
||||
}
|
||||
|
||||
AutoloaderRegistry::registerAutoloader(new ClassLoaderWrapper($composerAutoloader));
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Environment initialization
|
||||
*/
|
||||
error_reporting(E_ALL);
|
||||
#ini_set('display_errors', 1);
|
||||
|
||||
/* PHP version validation */
|
||||
if (!defined('PHP_VERSION_ID') || !(PHP_VERSION_ID === 70002 || PHP_VERSION_ID === 70004 || PHP_VERSION_ID >= 70006)) {
|
||||
if (PHP_SAPI == 'cli') {
|
||||
echo 'Magento supports 7.0.2, 7.0.4, and 7.0.6 or later. ' .
|
||||
'Please read http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements.html';
|
||||
} else {
|
||||
echo <<<HTML
|
||||
<div style="font:12px/1.35em arial, helvetica, sans-serif;">
|
||||
<p>Magento supports PHP 7.0.2, 7.0.4, and 7.0.6 or later. Please read
|
||||
<a target="_blank" href="http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements.html">
|
||||
Magento System Requirements</a>.
|
||||
</div>
|
||||
HTML;
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/autoload.php';
|
||||
// Sets default autoload mappings, may be overridden in Bootstrap::create
|
||||
\Magento\Framework\App\Bootstrap::populateAutoloader(BP, []);
|
||||
|
||||
/* Custom umask value may be provided in optional mage_umask file in root */
|
||||
$umaskFile = BP . '/magento_umask';
|
||||
$mask = file_exists($umaskFile) ? octdec(file_get_contents($umaskFile)) : 002;
|
||||
umask($mask);
|
||||
|
||||
if (empty($_SERVER['ENABLE_IIS_REWRITES']) || ($_SERVER['ENABLE_IIS_REWRITES'] != 1)) {
|
||||
/*
|
||||
* Unset headers used by IIS URL rewrites.
|
||||
*/
|
||||
unset($_SERVER['HTTP_X_REWRITE_URL']);
|
||||
unset($_SERVER['HTTP_X_ORIGINAL_URL']);
|
||||
unset($_SERVER['IIS_WasUrlRewritten']);
|
||||
unset($_SERVER['UNENCODED_URL']);
|
||||
unset($_SERVER['ORIG_PATH_INFO']);
|
||||
}
|
||||
|
||||
if (
|
||||
(!empty($_SERVER['MAGE_PROFILER']) || file_exists(BP . '/var/profiler.flag'))
|
||||
&& isset($_SERVER['HTTP_ACCEPT'])
|
||||
&& strpos($_SERVER['HTTP_ACCEPT'], 'text/html') !== false
|
||||
) {
|
||||
$profilerConfig = isset($_SERVER['MAGE_PROFILER']) && strlen($_SERVER['MAGE_PROFILER'])
|
||||
? $_SERVER['MAGE_PROFILER']
|
||||
: trim(file_get_contents(BP . '/var/profiler.flag'));
|
||||
|
||||
if ($profilerConfig) {
|
||||
$profilerConfig = json_decode($profilerConfig, true) ?: $profilerConfig;
|
||||
}
|
||||
|
||||
Magento\Framework\Profiler::applyConfig(
|
||||
$profilerConfig,
|
||||
BP,
|
||||
!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'
|
||||
);
|
||||
}
|
||||
|
||||
date_default_timezone_set('UTC');
|
||||
|
||||
/* For data consistency between displaying (printing) and serialization a float number */
|
||||
ini_set('precision', 14);
|
||||
ini_set('serialize_precision', 14);
|
||||
@@ -0,0 +1,403 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
namespace Wazaaa\Monpackscolaire\Block\Checkout;
|
||||
|
||||
use Magento\Checkout\Helper\Data;
|
||||
use Magento\Framework\App\ObjectManager;
|
||||
use Magento\Store\Api\StoreResolverInterface;
|
||||
|
||||
/**
|
||||
* Class LayoutProcessor
|
||||
*/
|
||||
class LayoutProcessor implements \Magento\Checkout\Block\Checkout\LayoutProcessorInterface
|
||||
{
|
||||
/**
|
||||
* @var \Magento\Customer\Model\AttributeMetadataDataProvider
|
||||
*/
|
||||
private $attributeMetadataDataProvider;
|
||||
|
||||
/**
|
||||
* @var \Magento\Ui\Component\Form\AttributeMapper
|
||||
*/
|
||||
protected $attributeMapper;
|
||||
|
||||
/**
|
||||
* @var AttributeMerger
|
||||
*/
|
||||
protected $merger;
|
||||
|
||||
/**
|
||||
* @var \Magento\Customer\Model\Options
|
||||
*/
|
||||
private $options;
|
||||
|
||||
/**
|
||||
* @var Data
|
||||
*/
|
||||
private $checkoutDataHelper;
|
||||
|
||||
/**
|
||||
* @var StoreResolverInterface
|
||||
*/
|
||||
private $storeResolver;
|
||||
|
||||
/**
|
||||
* @var \Magento\Shipping\Model\Config
|
||||
*/
|
||||
private $shippingConfig;
|
||||
|
||||
protected $logger;
|
||||
|
||||
/**
|
||||
* @param \Magento\Customer\Model\AttributeMetadataDataProvider $attributeMetadataDataProvider
|
||||
* @param \Magento\Ui\Component\Form\AttributeMapper $attributeMapper
|
||||
* @param AttributeMerger $merger
|
||||
*/
|
||||
public function __construct(
|
||||
\Magento\Customer\Model\AttributeMetadataDataProvider $attributeMetadataDataProvider,
|
||||
\Magento\Ui\Component\Form\AttributeMapper $attributeMapper,
|
||||
\Magento\Checkout\Block\Checkout\AttributeMerger $merger,
|
||||
\Psr\Log\LoggerInterface $logger
|
||||
) {
|
||||
$this->attributeMetadataDataProvider = $attributeMetadataDataProvider;
|
||||
$this->attributeMapper = $attributeMapper;
|
||||
$this->merger = $merger;
|
||||
$this->logger = $logger;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated 100.0.11
|
||||
* @return \Magento\Customer\Model\Options
|
||||
*/
|
||||
private function getOptions()
|
||||
{
|
||||
if (!is_object($this->options)) {
|
||||
$this->options = ObjectManager::getInstance()->get(\Magento\Customer\Model\Options::class);
|
||||
}
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
private function getAddressAttributes()
|
||||
{
|
||||
/** @var \Magento\Eav\Api\Data\AttributeInterface[] $attributes */
|
||||
$attributes = $this->attributeMetadataDataProvider->loadAttributesCollection(
|
||||
'customer_address',
|
||||
'customer_register_address'
|
||||
);
|
||||
|
||||
$elements = [];
|
||||
foreach ($attributes as $attribute) {
|
||||
$code = $attribute->getAttributeCode();
|
||||
if ($attribute->getIsUserDefined()) {
|
||||
continue;
|
||||
}
|
||||
$elements[$code] = $this->attributeMapper->map($attribute);
|
||||
if (isset($elements[$code]['label'])) {
|
||||
$label = $elements[$code]['label'];
|
||||
$elements[$code]['label'] = __($label);
|
||||
}
|
||||
}
|
||||
return $elements;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert elements(like prefix and suffix) from inputs to selects when necessary
|
||||
*
|
||||
* @param array $elements address attributes
|
||||
* @param array $attributesToConvert fields and their callbacks
|
||||
* @return array
|
||||
*/
|
||||
private function convertElementsToSelect($elements, $attributesToConvert)
|
||||
{
|
||||
$codes = array_keys($attributesToConvert);
|
||||
foreach (array_keys($elements) as $code) {
|
||||
if (!in_array($code, $codes)) {
|
||||
continue;
|
||||
}
|
||||
$options = call_user_func($attributesToConvert[$code]);
|
||||
if (!is_array($options)) {
|
||||
continue;
|
||||
}
|
||||
$elements[$code]['dataType'] = 'select';
|
||||
$elements[$code]['formElement'] = 'select';
|
||||
|
||||
foreach ($options as $key => $value) {
|
||||
$elements[$code]['options'][] = [
|
||||
'value' => $key,
|
||||
'label' => $value,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
return $elements;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process js Layout of block
|
||||
*
|
||||
* @param array $jsLayout
|
||||
* @return array
|
||||
*/
|
||||
public function process($jsLayout)
|
||||
{
|
||||
$attributesToConvert = [
|
||||
'prefix' => [$this->getOptions(), 'getNamePrefixOptions'],
|
||||
'suffix' => [$this->getOptions(), 'getNameSuffixOptions'],
|
||||
];
|
||||
|
||||
$elements = $this->getAddressAttributes();
|
||||
$elements = $this->convertElementsToSelect($elements, $attributesToConvert);
|
||||
// The following code is a workaround for custom address attributes
|
||||
if (isset($jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children']
|
||||
['payment']['children'])) {
|
||||
$jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children']
|
||||
['payment']['children'] = $this->processPaymentChildrenComponents(
|
||||
$jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children']
|
||||
['payment']['children'],
|
||||
$elements
|
||||
);
|
||||
}
|
||||
if (isset($jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
|
||||
['step-config']['children']['shipping-rates-validation']['children'])) {
|
||||
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
|
||||
['step-config']['children']['shipping-rates-validation']['children'] =
|
||||
$this->processShippingChildrenComponents(
|
||||
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
|
||||
['step-config']['children']['shipping-rates-validation']['children']
|
||||
);
|
||||
}
|
||||
|
||||
if (isset($jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
|
||||
['children']['shippingAddress']['children']['shipping-address-fieldset']['children'])) {
|
||||
$fields = $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
|
||||
['children']['shippingAddress']['children']['shipping-address-fieldset']['children'];
|
||||
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
|
||||
['children']['shippingAddress']['children']['shipping-address-fieldset']['children'] = $this->merger->merge(
|
||||
$elements,
|
||||
'checkoutProvider',
|
||||
'shippingAddress',
|
||||
$fields
|
||||
);
|
||||
}
|
||||
return $jsLayout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process shipping configuration to exclude inactive carriers.
|
||||
*
|
||||
* @param array $shippingRatesLayout
|
||||
* @return array
|
||||
*/
|
||||
private function processShippingChildrenComponents($shippingRatesLayout)
|
||||
{
|
||||
$activeCarriers = $this->getShippingConfig()->getActiveCarriers(
|
||||
$this->getStoreResolver()->getCurrentStoreId()
|
||||
);
|
||||
foreach (array_keys($shippingRatesLayout) as $carrierName) {
|
||||
$carrierKey = str_replace('-rates-validation', '', $carrierName);
|
||||
if (!array_key_exists($carrierKey, $activeCarriers)) {
|
||||
unset($shippingRatesLayout[$carrierName]);
|
||||
}
|
||||
}
|
||||
return $shippingRatesLayout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends billing address form component to payment layout
|
||||
* @param array $paymentLayout
|
||||
* @param array $elements
|
||||
* @return array
|
||||
*/
|
||||
private function processPaymentChildrenComponents(array $paymentLayout, array $elements)
|
||||
{
|
||||
if (!isset($paymentLayout['payments-list']['children'])) {
|
||||
$paymentLayout['payments-list']['children'] = [];
|
||||
}
|
||||
|
||||
if (!isset($paymentLayout['afterMethods']['children'])) {
|
||||
$paymentLayout['afterMethods']['children'] = [];
|
||||
}
|
||||
|
||||
/*foreach($elements as $key => $value){
|
||||
$elements[$key]['visible'] = 0;
|
||||
$elements[$key]['required'] = 0;
|
||||
$this->logger->info(print_r($elements[$key]['visible'],true));
|
||||
}*/
|
||||
|
||||
// The if billing address should be displayed on Payment method or page
|
||||
if ($this->getCheckoutDataHelper()->isDisplayBillingOnPaymentMethodAvailable()) {
|
||||
$paymentLayout['payments-list']['children'] =
|
||||
array_merge_recursive(
|
||||
$paymentLayout['payments-list']['children'],
|
||||
$this->processPaymentConfiguration(
|
||||
$paymentLayout['renders']['children'],
|
||||
$elements
|
||||
)
|
||||
);
|
||||
}/* else {
|
||||
$component['billing-address-form'] = $this->getBillingAddressComponent('shared', $elements);
|
||||
$paymentLayout['afterMethods']['children'] =
|
||||
array_merge_recursive(
|
||||
$component,
|
||||
$paymentLayout['afterMethods']['children']
|
||||
);
|
||||
}*/
|
||||
|
||||
return $paymentLayout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inject billing address component into every payment component
|
||||
*
|
||||
* @param array $configuration list of payment components
|
||||
* @param array $elements attributes that must be displayed in address form
|
||||
* @return array
|
||||
*/
|
||||
private function processPaymentConfiguration(array &$configuration, array $elements)
|
||||
{
|
||||
$output = [];
|
||||
foreach ($configuration as $paymentGroup => $groupConfig) {
|
||||
foreach ($groupConfig['methods'] as $paymentCode => $paymentComponent) {
|
||||
if (empty($paymentComponent['isBillingAddressRequired'])) {
|
||||
continue;
|
||||
}
|
||||
$output[$paymentCode . '-form'] = $this->getBillingAddressComponent($paymentCode, $elements);
|
||||
}
|
||||
unset($configuration[$paymentGroup]['methods']);
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets billing address component details
|
||||
*
|
||||
* @param string $paymentCode
|
||||
* @param array $elements
|
||||
* @return array
|
||||
*/
|
||||
private function getBillingAddressComponent($paymentCode, $elements)
|
||||
{
|
||||
return [
|
||||
'component' => 'Magento_Checkout/js/view/billing-address',
|
||||
'displayArea' => 'billing-address-form-' . $paymentCode,
|
||||
'provider' => 'checkoutProvider',
|
||||
'deps' => 'checkoutProvider',
|
||||
'dataScopePrefix' => 'billingAddress' . $paymentCode,
|
||||
'sortOrder' => 1,
|
||||
'children' => [
|
||||
'form-fields' => [
|
||||
'component' => 'uiComponent',
|
||||
'displayArea' => 'additional-fieldsets',
|
||||
'children' => $this->merger->merge(
|
||||
$elements,
|
||||
'checkoutProvider',
|
||||
'billingAddress' . $paymentCode,
|
||||
[
|
||||
'country_id' => [
|
||||
'visible' => false,
|
||||
'sortOrder' => 115,
|
||||
],
|
||||
'region' => [
|
||||
'visible' => false,
|
||||
],
|
||||
'region_id' => [
|
||||
'visible' => false,
|
||||
'component' => 'Magento_Ui/js/form/element/region',
|
||||
'config' => [
|
||||
'template' => 'ui/form/field',
|
||||
'elementTmpl' => 'ui/form/element/select',
|
||||
'customEntry' => 'billingAddress' . $paymentCode . '.region',
|
||||
],
|
||||
'validation' => [
|
||||
'required-entry' => true,
|
||||
],
|
||||
'filterBy' => [
|
||||
'target' => '${ $.provider }:${ $.parentScope }.country_id',
|
||||
'field' => 'country_id',
|
||||
],
|
||||
],
|
||||
'postcode' => [
|
||||
'visible' => false,
|
||||
'component' => 'Magento_Ui/js/form/element/post-code',
|
||||
'validation' => [
|
||||
'required-entry' => true,
|
||||
],
|
||||
],
|
||||
'company' => [
|
||||
'visible' => false,
|
||||
'validation' => [
|
||||
'min_text_length' => 0,
|
||||
],
|
||||
],
|
||||
'fax' => [
|
||||
'visible' => false,
|
||||
'validation' => [
|
||||
'min_text_length' => 0,
|
||||
],
|
||||
],
|
||||
'telephone' => [
|
||||
'config' => [
|
||||
'tooltip' => [
|
||||
'description' => __('For delivery questions.'),
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
),
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get checkout data helper instance
|
||||
*
|
||||
* @return Data
|
||||
* @deprecated 100.1.4
|
||||
*/
|
||||
private function getCheckoutDataHelper()
|
||||
{
|
||||
if (!$this->checkoutDataHelper) {
|
||||
$this->checkoutDataHelper = ObjectManager::getInstance()->get(Data::class);
|
||||
}
|
||||
|
||||
return $this->checkoutDataHelper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve Shipping Configuration.
|
||||
*
|
||||
* @return \Magento\Shipping\Model\Config
|
||||
* @deprecated 100.2.0
|
||||
*/
|
||||
private function getShippingConfig()
|
||||
{
|
||||
if (!$this->shippingConfig) {
|
||||
$this->shippingConfig = ObjectManager::getInstance()->get(\Magento\Shipping\Model\Config::class);
|
||||
}
|
||||
|
||||
return $this->shippingConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get store resolver.
|
||||
*
|
||||
* @return StoreResolverInterface
|
||||
* @deprecated 100.2.0
|
||||
*/
|
||||
private function getStoreResolver()
|
||||
{
|
||||
if (!$this->storeResolver) {
|
||||
$this->storeResolver = ObjectManager::getInstance()->get(StoreResolverInterface::class);
|
||||
}
|
||||
|
||||
return $this->storeResolver;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
|
||||
namespace Wazaaa\Monpackscolaire\Block;
|
||||
|
||||
use \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory as ProductCollectionFactory;
|
||||
use \Magento\Catalog\Model\ResourceModel\ProductFactory;
|
||||
use \Magento\Catalog\Model\ProductFactory as Product;
|
||||
use \Magento\Catalog\Model\Product as Produit;
|
||||
use \Magento\Eav\Model\Entity\Attribute as EavAttribute;
|
||||
use Magento\Catalog\Model\Layer\Resolver;
|
||||
use Magento\Framework\Data\Helper\PostHelper;
|
||||
use Magento\Catalog\Api\CategoryRepositoryInterface;
|
||||
use Magento\Framework\Url\Helper\Data;
|
||||
|
||||
|
||||
class Monpackscolaire extends \Magento\Catalog\Block\Product\ListProduct //\Magento\Framework\View\Element\Template
|
||||
{
|
||||
|
||||
protected $_productCollectionFactory;
|
||||
|
||||
protected $_product;
|
||||
|
||||
protected $_productModel;
|
||||
|
||||
protected $_eavAttribute;
|
||||
|
||||
protected $_produit;
|
||||
|
||||
public function __construct(
|
||||
//\Magento\Framework\View\Element\Template\Context $context,
|
||||
\Magento\Catalog\Block\Product\Context $context,
|
||||
PostHelper $postDataHelper,
|
||||
Resolver $layerResolver,
|
||||
CategoryRepositoryInterface $categoryRepository,
|
||||
Data $urlHelper,
|
||||
array $data = [],
|
||||
ProductCollectionFactory $productCollectionFactory,
|
||||
ProductFactory $product,
|
||||
EavAttribute $eavAttribute,
|
||||
Product $productModel,
|
||||
Produit $produit
|
||||
){
|
||||
parent::__construct($context,$postDataHelper,$layerResolver,$categoryRepository,$urlHelper, $data);
|
||||
$this->_productCollectionFactory = $productCollectionFactory;
|
||||
$this->_product = $product;
|
||||
$this->_eavAttribute = $eavAttribute;
|
||||
$this->_productModel = $productModel;
|
||||
$this->_produit = $produit;
|
||||
}
|
||||
|
||||
public function getProduitsParCode($codeEcole)
|
||||
{
|
||||
try{
|
||||
$classeCollection = $this->_productCollectionFactory->create()
|
||||
->addFieldToFilter('code_ecole',$codeEcole)->addFieldToSelect('description');
|
||||
$attributeClasseId = $this->getAttributeIdByCode('classe');
|
||||
$attributeOptionId = $this->getAttributeIdByCode('option');
|
||||
|
||||
$classeCollection->getSelect()->join(['classe' => $classeCollection->getTable('catalog_product_entity_int')],'classe.entity_id = e.entity_id AND classe.attribute_id = '.$attributeClasseId,['classe.value as classeValue'])
|
||||
->join(['classeOrder' => $classeCollection->getTable('eav_attribute_option')],'classeOrder.option_id = classe.value',['sort_order'])
|
||||
->joinLeft(['optionTable' => $classeCollection->getTable('catalog_product_entity_text')],'optionTable.entity_id = e.entity_id AND optionTable.attribute_id = '.$attributeOptionId,['optionTable.value as optionValue']);
|
||||
|
||||
$classeCollection->setOrder('sort_order','ASC');
|
||||
//$classeCollection->getSelect()->order(array('option desc'));
|
||||
return $classeCollection;
|
||||
}catch(Exception $e){
|
||||
echo $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
public function getAttributeIdByCode($attributeCode)
|
||||
{
|
||||
$attributeDetails = $this->_eavAttribute->loadByCode("catalog_product", $attributeCode);
|
||||
return $attributeDetails->getId();
|
||||
}
|
||||
|
||||
public function getClasseById($classeId)
|
||||
{
|
||||
return $this->getValueText('classe',$classeId);
|
||||
}
|
||||
|
||||
public function getOptionById($optionId)
|
||||
{
|
||||
return $this->getValueText('option',$optionId);
|
||||
}
|
||||
|
||||
public function getValueText($attrCode,$optionId)
|
||||
{
|
||||
$optionText = '';
|
||||
$attr = $this->_product->create()->getAttribute($attrCode);
|
||||
if ($attr->usesSource()) {
|
||||
$optionText = $attr->getSource()->getOptionText($optionId);
|
||||
}
|
||||
return $optionText;
|
||||
}
|
||||
|
||||
public function getProduitName($produitId)
|
||||
{
|
||||
return $this->_productModel->create()->load($produitId)->getName();
|
||||
}
|
||||
|
||||
public function getProduit($produitId)
|
||||
{
|
||||
return $this->_produit->load($produitId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Wazaaa\Monpackscolaire\Block\Widget;
|
||||
|
||||
class Monpackscolaire extends \Magento\Framework\View\Element\Template implements \Magento\Widget\Block\BlockInterface
|
||||
{
|
||||
|
||||
protected $_template = 'widget/formulaire.phtml';
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace Wazaaa\Monpackscolaire\Controller\Liste;
|
||||
|
||||
use Magento\Framework\App\Action\Context;
|
||||
|
||||
class Index extends \Magento\Framework\App\Action\Action
|
||||
{
|
||||
|
||||
public function __construct(
|
||||
Context $context
|
||||
) {
|
||||
parent::__construct($context);
|
||||
}
|
||||
|
||||
public function execute()
|
||||
{
|
||||
$this->_view->loadLayout();
|
||||
$this->_view->renderLayout();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
namespace Wazaaa\Monpackscolaire\Setup;
|
||||
|
||||
use Magento\Eav\Setup\EavSetupFactory;
|
||||
use Magento\Framework\Setup\InstallDataInterface;
|
||||
use Magento\Framework\Setup\ModuleContextInterface;
|
||||
use Magento\Framework\Setup\ModuleDataSetupInterface;
|
||||
|
||||
|
||||
class InstallData implements InstallDataInterface
|
||||
{
|
||||
|
||||
private $eavSetupFactory;
|
||||
|
||||
public function __construct(EavSetupFactory $eavSetupFactory)
|
||||
{
|
||||
$this->eavSetupFactory = $eavSetupFactory;
|
||||
}
|
||||
|
||||
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
|
||||
{
|
||||
$setup->startSetup();
|
||||
|
||||
$eavSetup = $this->eavSetupFactory->create(array('setup' => $setup));
|
||||
|
||||
|
||||
$eavSetup->addAttribute(
|
||||
\Magento\Catalog\Model\Product::ENTITY,
|
||||
'classe',
|
||||
[
|
||||
'group' => 'Mon pack scolaire',
|
||||
'label' => 'Classe',
|
||||
'input' => 'select',
|
||||
'class' => '',
|
||||
'backend' => '',
|
||||
'required' => false,
|
||||
'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
|
||||
'visible' => true,
|
||||
'required' => false,
|
||||
'user_defined' => true,
|
||||
'default' => '',
|
||||
'searchable' => true,
|
||||
'filterable' => true,
|
||||
'filterable_in_search' => true,
|
||||
'visible_in_advanced_search' => true,
|
||||
'comparable' => false,
|
||||
'visible_on_front' => false,
|
||||
'used_in_product_listing' => true,
|
||||
'unique' => false
|
||||
]
|
||||
);
|
||||
|
||||
$eavSetup->addAttribute(
|
||||
\Magento\Catalog\Model\Product::ENTITY,
|
||||
'option',
|
||||
[
|
||||
'group' => 'Mon pack scolaire',
|
||||
'label' => 'option',
|
||||
'type' => 'text',
|
||||
'input' => 'text',
|
||||
'class' => '',
|
||||
'backend' => '',
|
||||
'required' => false,
|
||||
'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
|
||||
'visible' => true,
|
||||
'required' => false,
|
||||
'user_defined' => true,
|
||||
'default' => '',
|
||||
'searchable' => true,
|
||||
'filterable' => true,
|
||||
'filterable_in_search' => true,
|
||||
'visible_in_advanced_search' => true,
|
||||
'comparable' => false,
|
||||
'visible_on_front' => false,
|
||||
'used_in_product_listing' => true,
|
||||
'unique' => false
|
||||
]
|
||||
);
|
||||
|
||||
$setup->endSetup();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace Wazaaa\Monpackscolaire\Setup;
|
||||
|
||||
use Magento\Eav\Setup\EavSetupFactory;
|
||||
use Magento\Framework\Setup\UpgradeDataInterface;
|
||||
use Magento\Framework\Setup\ModuleContextInterface;
|
||||
use Magento\Framework\Setup\ModuleDataSetupInterface;
|
||||
use Magento\Catalog\Setup\CategorySetupFactory;
|
||||
use Magento\Eav\Model\Entity\Attribute\SetFactory as AttributeSetFactory;
|
||||
|
||||
class UpgradeData implements UpgradeDataInterface
|
||||
{
|
||||
|
||||
private $eavSetupFactory;
|
||||
|
||||
public function __construct(EavSetupFactory $eavSetupFactory,AttributeSetFactory $attributeSetFactory, CategorySetupFactory $categorySetupFactory)
|
||||
{
|
||||
$this->eavSetupFactory = $eavSetupFactory;
|
||||
$this->attributeSetFactory = $attributeSetFactory;
|
||||
$this->categorySetupFactory = $categorySetupFactory;
|
||||
}
|
||||
|
||||
public function upgrade( ModuleDataSetupInterface $setup, ModuleContextInterface $context ) {
|
||||
|
||||
$installer = $setup;
|
||||
|
||||
if ( version_compare( $context->getVersion(), '1.0.2', '<' ) ) {
|
||||
$setup->startSetup();
|
||||
|
||||
$eavSetup = $this->eavSetupFactory->create(array('setup' => $setup));
|
||||
|
||||
|
||||
$eavSetup->addAttribute(
|
||||
\Magento\Catalog\Model\Product::ENTITY,
|
||||
'code_ecole',
|
||||
[
|
||||
'group' => 'Mon pack scolaire',
|
||||
'label' => 'Code Ecole',
|
||||
'input' => 'text',
|
||||
'type' => 'text',
|
||||
'class' => '',
|
||||
'backend' => '',
|
||||
'required' => false,
|
||||
'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
|
||||
'visible' => true,
|
||||
'required' => false,
|
||||
'user_defined' => true,
|
||||
'default' => '',
|
||||
'searchable' => true,
|
||||
'filterable' => true,
|
||||
'filterable_in_search' => true,
|
||||
'visible_in_advanced_search' => true,
|
||||
'comparable' => false,
|
||||
'visible_on_front' => false,
|
||||
'used_in_product_listing' => true,
|
||||
'unique' => false
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
|
||||
<preference for="Magento\Checkout\Block\Checkout\LayoutProcessor" type="Wazaaa\Monpackscolaire\Block\Checkout\LayoutProcessor" />
|
||||
</config>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
|
||||
<router id="standard">
|
||||
<route id="monpackscolaire" frontName="monpackscolaire">
|
||||
<module name="Wazaaa_Monpackscolaire"/>
|
||||
</route>
|
||||
</router>
|
||||
</config>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
|
||||
<module name="Wazaaa_Monpackscolaire" setup_version="1.0.2">
|
||||
</module>
|
||||
</config>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../Magento/Widget/etc/widget.xsd">
|
||||
<widget id="wazaaa_monpackscolaire" class="Wazaaa\Monpackscolaire\Block\Widget\Monpackscolaire">
|
||||
<label translate="true">Mon pack scolaire</label>
|
||||
<description>Formulaire input code école</description>
|
||||
</widget>
|
||||
</widgets>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
\Magento\Framework\Component\ComponentRegistrar::register(
|
||||
\Magento\Framework\Component\ComponentRegistrar::MODULE,
|
||||
'Wazaaa_Monpackscolaire',
|
||||
__DIR__
|
||||
);
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright © 2015 Magento. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
|
||||
<head>
|
||||
<!--<css src="Wazaaa_Monpackscolaire::css/bootstrap.min.css"/>-->
|
||||
<css src="Wazaaa_Monpackscolaire::css/monpackscolaire.css"/>
|
||||
</head>
|
||||
</page>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright © 2015 Magento. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
|
||||
<body>
|
||||
<referenceContainer name="content">
|
||||
<block class="Wazaaa\Monpackscolaire\Block\Monpackscolaire" name="pack_liste" template="liste.phtml"/>
|
||||
</referenceContainer>
|
||||
</body>
|
||||
</page>
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
*
|
||||
* @category e-declic
|
||||
* @package e-declic
|
||||
* @version 1.0
|
||||
* @author e-declic <contact@e-declic.com>
|
||||
* @copyright Copyright (c) 2018 e-declic. (http://www.e-declic.com)
|
||||
* @license http://www.e-declic.com/
|
||||
*
|
||||
*/
|
||||
var config = {
|
||||
paths: {
|
||||
"scroll": "Wazaaa_Catalome/js/scroll",
|
||||
},
|
||||
shim: {
|
||||
'scroll': {
|
||||
deps: ['jquery']
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
<?php
|
||||
|
||||
use Magento\Framework\App\Action\Action;
|
||||
|
||||
|
||||
$codeEcole = $this->getRequest()->getParam('codeEcole');
|
||||
$produits = $block->getProduitsParCode($codeEcole);
|
||||
$classeId = '';
|
||||
?>
|
||||
<div class="container">
|
||||
<?php foreach($produits as $produit){ ?>
|
||||
<?php if($classeId != $produit->getData('classeValue')){ ?>
|
||||
<?php if($classeId != ''){ ?> </div> <?php } ?>
|
||||
<div class="block-classe">
|
||||
<?php $classeId = $produit->getData('classeValue'); ?>
|
||||
<h3><?= $block->getClasseById($classeId); ?></h3>
|
||||
<?php } ?>
|
||||
<div class="produit">
|
||||
<h5><?= $block->getProduitName($produit->getData('entity_id')); ?></h5>
|
||||
<p class="option"><?= $produit->getData('optionValue'); ?></p>
|
||||
<div class="description">
|
||||
<?= $produit->getData('description'); ?>
|
||||
</div>
|
||||
<!-- ajoute le bouton ajouter au panier -->
|
||||
<?php $_product = $block->getProduit($produit->getData('entity_id')); ?>
|
||||
<?php $postParams = $block->getAddToCartPostParams($_product); ?>
|
||||
<form data-role="tocart-form" data-product-sku="<?= $block->escapeHtml($_product->getSku()) ?>" action="<?= /* @NoEscape */ $postParams['action'] ?>" method="post">
|
||||
<input type="hidden" name="product" value="<?= /* @escapeNotVerified */ $postParams['data']['product'] ?>">
|
||||
<input type="hidden" name="<?= /* @escapeNotVerified */ Action::PARAM_NAME_URL_ENCODED ?>" value="<?= /* @escapeNotVerified */ $postParams['data'][Action::PARAM_NAME_URL_ENCODED] ?>">
|
||||
<?= $block->getBlockHtml('formkey') ?>
|
||||
<button type="submit"
|
||||
title="<?= $block->escapeHtml(__('Add to Cart')) ?>"
|
||||
class="action tocart primary">
|
||||
<span><?= /* @escapeNotVerified */ __('Add to Cart') ?></span>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
@@ -0,0 +1,6 @@
|
||||
<form action="/monpackscolaire/liste" method="get">
|
||||
|
||||
<label for="codeEcole"><?= __('Un code vous a été transmis par l\'école<br/>Veuillez le rentrer ici'); ?></label>
|
||||
<input type="text" name="codeEcole" id="codeEcolde" placeholder="<?= __('Veuillez rentrer votre code ici'); ?>" />
|
||||
<input type="submit" label="<?= __('Envoyer'); ?>" value="<?= __('Envoyer'); ?>"/>
|
||||
</form>
|
||||
@@ -0,0 +1,7 @@
|
||||
function loadEffect() {
|
||||
imageHautTop = jQuery('.img-haut').offset().top;
|
||||
topWindow = jQuery(window).scrollTop();
|
||||
if (topWindow > imageHautTop) {
|
||||
jQuery('.nom-produit').addClass('extends');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
//Register components (via a list of glob patterns)
|
||||
namespace Magento\NonComposerComponentRegistration;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
/**
|
||||
* Include files from a list of glob patterns
|
||||
*
|
||||
* @throws RuntimeException
|
||||
* @return void
|
||||
*/
|
||||
function main()
|
||||
{
|
||||
$globPatterns = require __DIR__ . '/registration_globlist.php';
|
||||
$baseDir = dirname(dirname(__DIR__)) . '/';
|
||||
|
||||
foreach ($globPatterns as $globPattern) {
|
||||
// Sorting is disabled intentionally for performance improvement
|
||||
$files = glob($baseDir . $globPattern, GLOB_NOSORT);
|
||||
if ($files === false) {
|
||||
throw new RuntimeException("glob(): error with '$baseDir$globPattern'");
|
||||
}
|
||||
array_map(function ($file) { require_once $file; }, $files);
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
@@ -0,0 +1,201 @@
|
||||
<?php
|
||||
return [
|
||||
'modules' => [
|
||||
'Magento_Store' => 1,
|
||||
'Magento_Directory' => 1,
|
||||
'Magento_Theme' => 1,
|
||||
'Magento_Backend' => 1,
|
||||
'Magento_Variable' => 1,
|
||||
'Magento_Eav' => 1,
|
||||
'Magento_AdminNotification' => 1,
|
||||
'MSP_ReCaptcha' => 1,
|
||||
'Magento_Config' => 1,
|
||||
'Magento_Indexer' => 1,
|
||||
'Magento_AdvancedPricingImportExport' => 1,
|
||||
'Magento_Search' => 1,
|
||||
'Magento_Amqp' => 1,
|
||||
'Magento_Security' => 1,
|
||||
'Magento_User' => 1,
|
||||
'Magento_Authorization' => 1,
|
||||
'Magento_Customer' => 1,
|
||||
'Magento_Rule' => 1,
|
||||
'Magento_Backup' => 1,
|
||||
'Magento_Cms' => 1,
|
||||
'Magento_Catalog' => 1,
|
||||
'Magento_GraphQl' => 1,
|
||||
'Magento_BundleImportExport' => 1,
|
||||
'Magento_CacheInvalidate' => 1,
|
||||
'Magento_Quote' => 1,
|
||||
'Magento_SalesSequence' => 1,
|
||||
'Magento_Integration' => 1,
|
||||
'Magento_EavGraphQl' => 1,
|
||||
'Magento_CatalogImportExport' => 1,
|
||||
'Magento_Payment' => 1,
|
||||
'Magento_CatalogInventory' => 1,
|
||||
'Magento_Cron' => 1,
|
||||
'Magento_Msrp' => 1,
|
||||
'Magento_CatalogRule' => 1,
|
||||
'Magento_CatalogSearch' => 1,
|
||||
'Magento_CatalogUrlRewrite' => 1,
|
||||
'Magento_CatalogUrlRewriteGraphQl' => 1,
|
||||
'Magento_Widget' => 1,
|
||||
'Magento_Sales' => 1,
|
||||
'Magento_Checkout' => 1,
|
||||
'Magento_Vault' => 1,
|
||||
'Magento_CmsGraphQl' => 1,
|
||||
'Magento_CmsUrlRewrite' => 1,
|
||||
'Magento_CmsUrlRewriteGraphQl' => 1,
|
||||
'MSP_TwoFactorAuth' => 1,
|
||||
'Magento_ConfigurableImportExport' => 1,
|
||||
'Magento_ConfigurableProduct' => 1,
|
||||
'Magento_StoreGraphQl' => 1,
|
||||
'Magento_ConfigurableProductSales' => 1,
|
||||
'Magento_UrlRewrite' => 1,
|
||||
'Magento_Contact' => 1,
|
||||
'Magento_Cookie' => 1,
|
||||
'Magento_Email' => 1,
|
||||
'Magento_CurrencySymbol' => 1,
|
||||
'Magento_Paypal' => 1,
|
||||
'Magento_Analytics' => 1,
|
||||
'Magento_CustomerGraphQl' => 1,
|
||||
'Magento_CustomerImportExport' => 1,
|
||||
'Magento_CustomerSampleDataVenia' => 1,
|
||||
'Magento_Deploy' => 1,
|
||||
'Magento_Developer' => 1,
|
||||
'Magento_Dhl' => 1,
|
||||
'Amazon_Core' => 1,
|
||||
'Magento_Downloadable' => 1,
|
||||
'Magento_CatalogGraphQl' => 1,
|
||||
'Magento_ImportExport' => 1,
|
||||
'Magento_Authorizenet' => 1,
|
||||
'Magento_BundleGraphQl' => 1,
|
||||
'Magento_AdvancedSearch' => 1,
|
||||
'Magento_Newsletter' => 1,
|
||||
'Magento_EncryptionKey' => 1,
|
||||
'Magento_Fedex' => 1,
|
||||
'Magento_GiftMessage' => 1,
|
||||
'Magento_GoogleAdwords' => 1,
|
||||
'Magento_GoogleAnalytics' => 1,
|
||||
'Magento_Ui' => 1,
|
||||
'Magento_ConfigurableProductGraphQl' => 1,
|
||||
'Magento_GroupedImportExport' => 1,
|
||||
'Magento_GroupedProduct' => 1,
|
||||
'Magento_GroupedProductGraphQl' => 1,
|
||||
'Magento_DownloadableImportExport' => 1,
|
||||
'Magento_Braintree' => 1,
|
||||
'Magento_InstantPurchase' => 1,
|
||||
'Magento_CatalogAnalytics' => 1,
|
||||
'Magento_Inventory' => 1,
|
||||
'Magento_InventoryAdminUi' => 1,
|
||||
'Magento_InventoryApi' => 1,
|
||||
'Magento_InventoryBundleProduct' => 1,
|
||||
'Magento_InventoryBundleProductAdminUi' => 1,
|
||||
'Magento_InventoryCatalog' => 1,
|
||||
'Magento_InventorySales' => 1,
|
||||
'Magento_InventoryCatalogAdminUi' => 1,
|
||||
'Magento_InventoryCatalogApi' => 1,
|
||||
'Magento_InventoryCatalogSearch' => 1,
|
||||
'Magento_InventoryConfigurableProduct' => 1,
|
||||
'Magento_InventoryConfigurableProductAdminUi' => 1,
|
||||
'Magento_InventoryConfigurableProductIndexer' => 1,
|
||||
'Magento_InventoryConfiguration' => 1,
|
||||
'Magento_InventoryConfigurationApi' => 1,
|
||||
'Magento_InventoryGroupedProduct' => 1,
|
||||
'Magento_InventoryGroupedProductAdminUi' => 1,
|
||||
'Magento_InventoryGroupedProductIndexer' => 1,
|
||||
'Magento_InventoryImportExport' => 1,
|
||||
'Magento_InventoryIndexer' => 1,
|
||||
'Magento_InventoryLowQuantityNotification' => 1,
|
||||
'Magento_InventoryLowQuantityNotificationAdminUi' => 1,
|
||||
'Magento_InventoryLowQuantityNotificationApi' => 1,
|
||||
'Magento_InventoryMultiDimensionalIndexerApi' => 1,
|
||||
'Magento_InventoryProductAlert' => 1,
|
||||
'Magento_InventoryReservations' => 1,
|
||||
'Magento_InventoryReservationsApi' => 1,
|
||||
'Magento_InventoryCache' => 1,
|
||||
'Magento_InventorySalesAdminUi' => 1,
|
||||
'Magento_InventorySalesApi' => 1,
|
||||
'Magento_InventorySalesFrontendUi' => 1,
|
||||
'Magento_InventoryShipping' => 1,
|
||||
'Magento_Shipping' => 1,
|
||||
'Magento_InventorySourceDeductionApi' => 1,
|
||||
'Magento_InventorySourceSelection' => 1,
|
||||
'Magento_InventorySourceSelectionApi' => 1,
|
||||
'Magento_LayeredNavigation' => 1,
|
||||
'Magento_Marketplace' => 1,
|
||||
'Magento_MediaStorage' => 1,
|
||||
'Magento_MessageQueue' => 1,
|
||||
'Magento_CatalogRuleConfigurable' => 1,
|
||||
'Magento_Multishipping' => 1,
|
||||
'Magento_MysqlMq' => 1,
|
||||
'Magento_NewRelicReporting' => 1,
|
||||
'Magento_ProductAlert' => 1,
|
||||
'Magento_OfflinePayments' => 1,
|
||||
'Magento_SalesRule' => 1,
|
||||
'Magento_PageCache' => 1,
|
||||
'Magento_Captcha' => 1,
|
||||
'Klarna_Core' => 1,
|
||||
'Magento_Persistent' => 1,
|
||||
'Magento_Reports' => 1,
|
||||
'Magento_ProductVideo' => 1,
|
||||
'Amazon_Login' => 1,
|
||||
'Magento_QuoteAnalytics' => 1,
|
||||
'Magento_QuoteGraphQl' => 1,
|
||||
'Magento_ReleaseNotification' => 1,
|
||||
'Magento_Review' => 1,
|
||||
'Magento_RequireJs' => 1,
|
||||
'Magento_SendFriend' => 1,
|
||||
'Magento_ReviewAnalytics' => 1,
|
||||
'Magento_Robots' => 1,
|
||||
'Magento_Rss' => 1,
|
||||
'Magento_Tax' => 1,
|
||||
'Amazon_Payment' => 1,
|
||||
'Magento_SalesAnalytics' => 1,
|
||||
'Magento_SalesInventory' => 1,
|
||||
'Magento_OfflineShipping' => 1,
|
||||
'Magento_SampleData' => 1,
|
||||
'Klarna_Ordermanagement' => 1,
|
||||
'Magento_Weee' => 1,
|
||||
'Magento_Elasticsearch' => 1,
|
||||
'Magento_CustomerAnalytics' => 1,
|
||||
'Magento_Wishlist' => 1,
|
||||
'Magento_InventoryShippingAdminUi' => 1,
|
||||
'Magento_Signifyd' => 1,
|
||||
'Magento_Sitemap' => 1,
|
||||
'Magento_CatalogInventoryGraphQl' => 1,
|
||||
'Magento_DownloadableGraphQl' => 1,
|
||||
'Magento_Webapi' => 1,
|
||||
'Magento_SwaggerWebapi' => 1,
|
||||
'Magento_SwaggerWebapiAsync' => 1,
|
||||
'Magento_Swatches' => 1,
|
||||
'Magento_SwatchesGraphQl' => 1,
|
||||
'Magento_SwatchesLayeredNavigation' => 1,
|
||||
'Magento_TaxSampleDataVenia' => 1,
|
||||
'Magento_TaxGraphQl' => 1,
|
||||
'Magento_TaxImportExport' => 1,
|
||||
'Magento_CatalogSampleDataVenia' => 1,
|
||||
'Magento_CheckoutAgreements' => 1,
|
||||
'Magento_Tinymce3' => 1,
|
||||
'Magento_Translation' => 1,
|
||||
'Magento_GoogleOptimizer' => 1,
|
||||
'Magento_Ups' => 1,
|
||||
'Magento_ConfigurableSampleDataVenia' => 1,
|
||||
'Magento_UrlRewriteGraphQl' => 1,
|
||||
'Magento_AsynchronousOperations' => 1,
|
||||
'Magento_Usps' => 1,
|
||||
'Magento_Bundle' => 1,
|
||||
'Klarna_Kp' => 1,
|
||||
'Magento_Version' => 1,
|
||||
'Magento_Swagger' => 1,
|
||||
'Magento_WebapiAsync' => 1,
|
||||
'Magento_WebapiSecurity' => 1,
|
||||
'Magento_SalesSampleDataVenia' => 1,
|
||||
'Magento_WeeeGraphQl' => 1,
|
||||
'Magento_CatalogWidget' => 1,
|
||||
'Dotdigitalgroup_Email' => 1,
|
||||
'Magento_WishlistAnalytics' => 1,
|
||||
'Temando_Shipping' => 1,
|
||||
'Vertex_Tax' => 1,
|
||||
'Wazaaa_Monpackscolaire' => 1
|
||||
]
|
||||
];
|
||||
@@ -0,0 +1 @@
|
||||
/home/www/website/www/app/etc/config-dev.php
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
|
||||
<table name="patch_list" resource="default" comment="List of data/schema patches">
|
||||
<column xsi:type="int" name="patch_id" identity="true" comment="Patch Auto Increment" />
|
||||
<column xsi:type="varchar" name="patch_name" length="1024" nullable="false" comment="Patch Class Name" />
|
||||
<constraint xsi:type="primary" referenceId="PRIMARY">
|
||||
<column name="patch_id" />
|
||||
</constraint>
|
||||
</table>
|
||||
</schema>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
return [
|
||||
'backend' => [
|
||||
'frontName' => 'admin'
|
||||
],
|
||||
'crypt' => [
|
||||
'key' => '9d1f13f10275d73ef5d72872be641839'
|
||||
],
|
||||
'db' => [
|
||||
'table_prefix' => '',
|
||||
'connection' => [
|
||||
'default' => [
|
||||
'host' => 'pwa-magento.mysql.dev',
|
||||
'dbname' => 'database',
|
||||
'username' => 'root',
|
||||
'password' => 'edcl56',
|
||||
'active' => '1'
|
||||
]
|
||||
]
|
||||
],
|
||||
'resource' => [
|
||||
'default_setup' => [
|
||||
'connection' => 'default'
|
||||
]
|
||||
],
|
||||
'x-frame-options' => 'SAMEORIGIN',
|
||||
'MAGE_MODE' => 'developer',
|
||||
'session' => [
|
||||
'save' => 'files'
|
||||
],
|
||||
'cache_types' => [
|
||||
'config' => 1,
|
||||
'layout' => 1,
|
||||
'block_html' => 1,
|
||||
'collections' => 1,
|
||||
'reflection' => 1,
|
||||
'db_ddl' => 1,
|
||||
'compiled_config' => 1,
|
||||
'eav' => 1,
|
||||
'customer_notification' => 1,
|
||||
'config_integration' => 1,
|
||||
'config_integration_api' => 1,
|
||||
'full_page' => 1,
|
||||
'config_webservice' => 1,
|
||||
'translate' => 1,
|
||||
'vertex' => 1
|
||||
],
|
||||
'install' => [
|
||||
'date' => 'Thu, 24 Jan 2019 10:30:40 +0000'
|
||||
]
|
||||
];
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Glob patterns relative to the project root directory, used by
|
||||
* registration.php to generate a list of includes.
|
||||
*/
|
||||
return [
|
||||
'app/code/*/*/cli_commands.php',
|
||||
'app/code/*/*/registration.php',
|
||||
'app/design/*/*/*/registration.php',
|
||||
'app/i18n/*/*/registration.php',
|
||||
'lib/internal/*/*/registration.php',
|
||||
'lib/internal/*/*/*/registration.php',
|
||||
'setup/src/*/*/registration.php'
|
||||
];
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
/**
|
||||
* Path to Composer vendor directory
|
||||
*/
|
||||
return './vendor';
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create value-object \Magento\Framework\Phrase
|
||||
* @deprecated The global function __() is now loaded via Magento Framework, the below require is only
|
||||
* for backwards compatibility reasons and this file will be removed in a future version
|
||||
* @see Magento\Framework\Phrase\__.php
|
||||
* @SuppressWarnings(PHPMD.ShortMethodName)
|
||||
* @return \Magento\Framework\Phrase
|
||||
*/
|
||||
if (!function_exists('__')) {
|
||||
function __()
|
||||
{
|
||||
$argc = func_get_args();
|
||||
|
||||
$text = array_shift($argc);
|
||||
if (!empty($argc) && is_array($argc[0])) {
|
||||
$argc = $argc[0];
|
||||
}
|
||||
|
||||
return new \Magento\Framework\Phrase($text, $argc);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"http-basic": {
|
||||
"repo.magento.com": {
|
||||
"username": "<public-key>",
|
||||
"password": "<private-key>"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
if (PHP_SAPI !== 'cli') {
|
||||
echo 'bin/magento must be run as a CLI application';
|
||||
exit(1);
|
||||
}
|
||||
|
||||
try {
|
||||
require __DIR__ . '/../app/bootstrap.php';
|
||||
} catch (\Exception $e) {
|
||||
echo 'Autoload error: ' . $e->getMessage();
|
||||
exit(1);
|
||||
}
|
||||
try {
|
||||
$handler = new \Magento\Framework\App\ErrorHandler();
|
||||
set_error_handler([$handler, 'handler']);
|
||||
$application = new Magento\Framework\Console\Cli('Magento CLI');
|
||||
$application->run();
|
||||
} catch (\Exception $e) {
|
||||
while ($e) {
|
||||
echo $e->getMessage();
|
||||
echo $e->getTraceAsString();
|
||||
echo "\n\n";
|
||||
$e = $e->getPrevious();
|
||||
}
|
||||
exit(Magento\Framework\Console\Cli::RETURN_FAILURE);
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
{
|
||||
"name": "magento/project-community-edition",
|
||||
"description": "eCommerce Platform for Growth (Community Edition)",
|
||||
"type": "project",
|
||||
"license": [
|
||||
"OSL-3.0",
|
||||
"AFL-3.0"
|
||||
],
|
||||
"config": {
|
||||
"preferred-install": "dist",
|
||||
"sort-packages": true
|
||||
},
|
||||
"require": {
|
||||
"magento/module-catalog-sample-data-venia": "dev-master@dev",
|
||||
"magento/module-configurable-sample-data-venia": "dev-master@dev",
|
||||
"magento/module-customer-sample-data-venia": "dev-master@dev",
|
||||
"magento/module-sales-sample-data-venia": "dev-master@dev",
|
||||
"magento/module-tax-sample-data-venia": "dev-master@dev",
|
||||
"magento/product-community-edition": "2.3.0",
|
||||
"magento/sample-data-media-venia": "dev-master@dev"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "~2.13.0",
|
||||
"lusitanian/oauth": "~0.8.10",
|
||||
"magento/magento2-functional-testing-framework": "2.3.9",
|
||||
"pdepend/pdepend": "2.5.2",
|
||||
"phpmd/phpmd": "@stable",
|
||||
"phpunit/phpunit": "~6.5.0",
|
||||
"sebastian/phpcpd": "~3.0.0",
|
||||
"squizlabs/php_codesniffer": "3.3.1"
|
||||
},
|
||||
"conflict": {
|
||||
"gene/bluefoot": "*"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Magento\\Framework\\": "lib/internal/Magento/Framework/",
|
||||
"Magento\\Setup\\": "setup/src/Magento/Setup/",
|
||||
"Magento\\": "app/code/Magento/",
|
||||
"Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
|
||||
},
|
||||
"psr-0": {
|
||||
"": [
|
||||
"app/code/",
|
||||
"generated/code/"
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"app/etc/NonComposerComponentRegistration.php"
|
||||
],
|
||||
"exclude-from-classmap": [
|
||||
"**/dev/**",
|
||||
"**/update/**",
|
||||
"**/Test/**"
|
||||
]
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
|
||||
"Magento\\Tools\\": "dev/tools/Magento/Tools/",
|
||||
"Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
|
||||
"Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
|
||||
"Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
|
||||
}
|
||||
},
|
||||
"version": "2.3.0",
|
||||
"minimum-stability": "stable",
|
||||
"repositories": {
|
||||
"0": {
|
||||
"type": "composer",
|
||||
"url": "https://repo.magento.com/"
|
||||
},
|
||||
"module-catalog-sample-data-venia": {
|
||||
"type": "github",
|
||||
"url": "git@github.com:PMET-public/module-catalog-sample-data-venia.git"
|
||||
},
|
||||
"module-configurable-sample-data-venia": {
|
||||
"type": "github",
|
||||
"url": "git@github.com:PMET-public/module-configurable-sample-data-venia.git"
|
||||
},
|
||||
"module-customer-sample-data-venia": {
|
||||
"type": "github",
|
||||
"url": "git@github.com:PMET-public/module-customer-sample-data-venia.git"
|
||||
},
|
||||
"module-sales-sample-data-venia": {
|
||||
"type": "github",
|
||||
"url": "git@github.com:PMET-public/module-sales-sample-data-venia.git"
|
||||
},
|
||||
"module-tax-sample-data-venia": {
|
||||
"type": "github",
|
||||
"url": "git@github.com:PMET-public/module-tax-sample-data-venia.git"
|
||||
},
|
||||
"sample-data-media-venia": {
|
||||
"type": "github",
|
||||
"url": "git@github.com:PMET-public/sample-data-media-venia.git"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"magento-force": "override"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
.idea
|
||||
.env
|
||||
.htaccess
|
||||
codeception.yml
|
||||
tests/_output/*
|
||||
tests/functional.suite.yml
|
||||
tests/functional/Magento/FunctionalTest/_generated
|
||||
vendor/*
|
||||
mftf.log
|
||||
/.credentials.example
|
||||
/utils/
|
||||
@@ -0,0 +1,11 @@
|
||||
##############################################
|
||||
## Allow access to command.php
|
||||
<FilesMatch "command.php">
|
||||
<IfVersion < 2.4>
|
||||
order allow,deny
|
||||
allow from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
</FilesMatch>
|
||||
@@ -0,0 +1,175 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
|
||||
/** This is project's console commands configuration for Robo task runner.
|
||||
*
|
||||
* @codingStandardsIgnoreStart
|
||||
* @see http://robo.li/
|
||||
*/
|
||||
class RoboFile extends \Robo\Tasks
|
||||
{
|
||||
use Robo\Task\Base\loadShortcuts;
|
||||
|
||||
/**
|
||||
* Duplicate the Example configuration files for the Project.
|
||||
* Build the Codeception project.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function buildProject()
|
||||
{
|
||||
passthru($this->getBaseCmd("build:project"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate all Tests in PHP OR Generate set of tests via passing array of tests
|
||||
*
|
||||
* @param array $tests
|
||||
* @param array $opts
|
||||
* @return \Robo\Result
|
||||
*/
|
||||
function generateTests(array $tests, $opts = [
|
||||
'config' => null,
|
||||
'force' => false,
|
||||
'nodes' => null,
|
||||
'lines' => null,
|
||||
'tests' => null
|
||||
])
|
||||
{
|
||||
$baseCmd = $this->getBaseCmd("generate:tests");
|
||||
|
||||
$mftfArgNames = ['config', 'nodes', 'lines', 'tests'];
|
||||
// append arguments to the end of the command
|
||||
foreach ($opts as $argName => $argValue) {
|
||||
if (in_array($argName, $mftfArgNames) && $argValue !== null) {
|
||||
$baseCmd .= " --$argName $argValue";
|
||||
}
|
||||
}
|
||||
|
||||
// use a separate conditional for the force flag (casting bool to string in php is hard)
|
||||
if ($opts['force']) {
|
||||
$baseCmd .= ' --force';
|
||||
}
|
||||
|
||||
return $this->taskExec($baseCmd)->args($tests)->run();
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a suite based on name(s) passed in as args.
|
||||
*
|
||||
* @param array $args
|
||||
* @throws Exception
|
||||
* @return \Robo\Result
|
||||
*/
|
||||
function generateSuite(array $args)
|
||||
{
|
||||
if (empty($args)) {
|
||||
throw new Exception("Please provide suite name(s) after generate:suite command");
|
||||
}
|
||||
$baseCmd = $this->getBaseCmd("generate:suite");
|
||||
return $this->taskExec($baseCmd)->args($args)->run();
|
||||
}
|
||||
|
||||
/**
|
||||
* Run all Tests with the specified @group tag'.
|
||||
*
|
||||
* @param array $args
|
||||
* @return \Robo\Result
|
||||
*/
|
||||
function group(array $args)
|
||||
{
|
||||
$args = array_merge($args, ['-k']);
|
||||
$baseCmd = $this->getBaseCmd("run:group");
|
||||
return $this->taskExec($baseCmd)->args($args)->run();
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the HTML for the Allure report based on the Test XML output - Allure v1.4.X
|
||||
*
|
||||
* @return \Robo\Result
|
||||
*/
|
||||
function allure1Generate()
|
||||
{
|
||||
return $this->_exec('allure generate tests'. DIRECTORY_SEPARATOR .'_output'. DIRECTORY_SEPARATOR .'allure-results'. DIRECTORY_SEPARATOR .' -o tests'. DIRECTORY_SEPARATOR .'_output'. DIRECTORY_SEPARATOR .'allure-report'. DIRECTORY_SEPARATOR .'');
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the HTML for the Allure report based on the Test XML output - Allure v2.3.X
|
||||
*
|
||||
* @return \Robo\Result
|
||||
*/
|
||||
function allure2Generate()
|
||||
{
|
||||
return $this->_exec('allure generate tests'. DIRECTORY_SEPARATOR .'_output'. DIRECTORY_SEPARATOR .'allure-results'. DIRECTORY_SEPARATOR .' --output tests'. DIRECTORY_SEPARATOR .'_output'. DIRECTORY_SEPARATOR .'allure-report'. DIRECTORY_SEPARATOR .' --clean');
|
||||
}
|
||||
|
||||
/**
|
||||
* Open the HTML Allure report - Allure v1.4.X
|
||||
*
|
||||
* @return \Robo\Result
|
||||
*/
|
||||
function allure1Open()
|
||||
{
|
||||
return $this->_exec('allure report open --report-dir tests'. DIRECTORY_SEPARATOR .'_output'. DIRECTORY_SEPARATOR .'allure-report'. DIRECTORY_SEPARATOR .'');
|
||||
}
|
||||
|
||||
/**
|
||||
* Open the HTML Allure report - Allure v2.3.X
|
||||
*
|
||||
* @return \Robo\Result
|
||||
*/
|
||||
function allure2Open()
|
||||
{
|
||||
return $this->_exec('allure open --port 0 tests'. DIRECTORY_SEPARATOR .'_output'. DIRECTORY_SEPARATOR .'allure-report'. DIRECTORY_SEPARATOR .'');
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate and open the HTML Allure report - Allure v1.4.X
|
||||
*
|
||||
* @return \Robo\Result
|
||||
*/
|
||||
function allure1Report()
|
||||
{
|
||||
$result1 = $this->allure1Generate();
|
||||
|
||||
if ($result1->wasSuccessful()) {
|
||||
return $this->allure1Open();
|
||||
} else {
|
||||
return $result1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate and open the HTML Allure report - Allure v2.3.X
|
||||
*
|
||||
* @return \Robo\Result
|
||||
*/
|
||||
function allure2Report()
|
||||
{
|
||||
$result1 = $this->allure2Generate();
|
||||
|
||||
if ($result1->wasSuccessful()) {
|
||||
return $this->allure2Open();
|
||||
} else {
|
||||
return $result1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Private function for returning the formatted command for the passthru to mftf bin execution.
|
||||
*
|
||||
* @param string $command
|
||||
* @return string
|
||||
*/
|
||||
private function getBaseCmd($command)
|
||||
{
|
||||
$this->writeln("\033[01;31m Use of robo will be deprecated with next major release, please use <root>/vendor/bin/mftf $command \033[0m");
|
||||
chdir(__DIR__);
|
||||
return realpath('../../../vendor/bin/mftf') . " $command";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"description": "Magento 2 (Open Source) Functional Tests",
|
||||
"type": "project",
|
||||
"version": "1.0.0-dev",
|
||||
"license": [
|
||||
"OSL-3.0",
|
||||
"AFL-3.0"
|
||||
],
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
},
|
||||
"require": {
|
||||
"php": "~7.1.3||~7.2.0",
|
||||
"codeception/codeception": "~2.3.4 || ~2.4.0",
|
||||
"consolidation/robo": "^1.0.0",
|
||||
"vlucas/phpdotenv": "^2.4"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Magento\\": "tests/functional/Magento"
|
||||
},
|
||||
"files": ["tests/_bootstrap.php"]
|
||||
},
|
||||
"prefer-stable": true
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
//TODO remove this file once MFTF is fully decoupled from Magento
|
||||
// Need to load in the root level autload file
|
||||
require_once realpath(dirname(__DIR__) . "/../../../vendor/autoload.php");
|
||||
|
After Width: | Height: | Size: 2.6 MiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 1.7 MiB |
@@ -0,0 +1 @@
|
||||
/* Replace this file with actual dump of your database */
|
||||
|
After Width: | Height: | Size: 214 KiB |
|
After Width: | Height: | Size: 169 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 14 MiB |
@@ -0,0 +1,9 @@
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc venenatis cursus eros, eu congue risus eleifend ut. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean aliquet mi diam, at consequat ex imperdiet eu. Nullam vulputate sollicitudin libero, tristique ullamcorper ante pretium eget. Nunc vehicula, risus ut hendrerit ornare, tortor est mattis urna, vitae egestas arcu tellus quis est. Sed mollis est sem. Aenean rhoncus ultricies sapien, id tempus elit lobortis ac. Pellentesque condimentum gravida purus a pretium. Nulla sed sapien mattis, auctor lacus quis, volutpat metus. Nunc mattis diam elit, viverra tincidunt nisl faucibus eu. Duis ac nisl tellus. Aenean eros lectus, malesuada in ex non, pharetra aliquam odio. Aenean ultricies pharetra mauris, ac rutrum quam posuere at. Phasellus et tempor turpis, ut sodales turpis. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
|
||||
|
||||
Sed fringilla orci at elit gravida, posuere varius elit eleifend. Nam libero dui, rutrum ac massa et, dictum egestas massa. Fusce rutrum, neque vitae vestibulum mattis, magna orci dictum turpis, ut laoreet eros urna lacinia ipsum. Donec eget ultrices eros. Duis sollicitudin ante est. Maecenas semper pellentesque scelerisque. Vestibulum eu venenatis tellus. Etiam nec massa sem. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Etiam blandit molestie justo, non euismod dolor aliquet ac. Duis consectetur enim in arcu suscipit, in tempus nisi commodo.
|
||||
|
||||
Donec sed venenatis nunc. Proin velit leo, porta eget erat elementum, dapibus posuere odio. Nam varius lectus eu cursus tristique. Ut tempus libero vehicula, iaculis augue sit amet, vestibulum justo. Vivamus porta diam vitae malesuada vestibulum. Donec mi dolor, semper at rutrum eget, vehicula non orci. Nunc dolor urna, laoreet et egestas vitae, sodales quis ipsum. Vivamus aliquet viverra enim cursus tincidunt. Pellentesque vel laoreet mi. Aenean ut rhoncus orci. Donec a purus venenatis, tempor dolor in, facilisis ex. Sed nec metus convallis, viverra nisl nec, luctus arcu. Integer blandit arcu a est posuere pharetra.
|
||||
|
||||
Aliquam ultricies lectus ac mauris luctus, a viverra neque rhoncus. Vestibulum id velit eu nisl efficitur lobortis. Sed id metus at ipsum imperdiet porta. Quisque in quam in turpis fermentum condimentum. Phasellus sagittis risus eu tempus scelerisque. Vivamus dapibus sem odio, vitae fermentum sem viverra et. Quisque sit amet cursus neque, vel hendrerit risus. Integer ut diam porta, volutpat risus in, iaculis diam. Suspendisse vulputate non quam et finibus.
|
||||
|
||||
Donec blandit, sem ut posuere dignissim, dolor lorem egestas magna, vel faucibus dui metus eget orci. Nullam ipsum lacus, imperdiet at nisl sed, condimentum dignissim lectus. Nunc orci libero, tincidunt a molestie vel, dapibus at mi. Quisque scelerisque sem quis massa suscipit, sit amet suscipit arcu volutpat. In tincidunt lacus in porttitor mattis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi rutrum gravida orci quis porta.
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 71 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 120 KiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="298.367px" height="298.365px" viewBox="0 0 298.367 298.365" enable-background="new 0 0 298.367 298.365"
|
||||
xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#13110C" d="M131.233,193.113H75.177c-24.224,0-43.931-19.708-43.931-43.932s19.707-43.93,43.931-43.93h56.056v-30
|
||||
H75.177c-40.831,0-73.931,33.1-73.931,73.93c0,40.832,33.1,73.932,73.931,73.932h56.056V193.113z"/>
|
||||
<path fill="#13110C" d="M224.222,75.252h-57.088v30h57.088c24.224,0,43.931,19.706,43.931,43.93s-19.707,43.932-43.931,43.932
|
||||
h-57.088v30h57.088c40.831,0,73.931-33.1,73.931-73.932C298.152,108.351,265.053,75.252,224.222,75.252z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#13110C" d="M192.391,164.182h-86.414c-8.284,0-15-6.716-15-15s6.716-15,15-15h86.414c8.284,0,15,6.716,15,15
|
||||
S200.675,164.182,192.391,164.182z"/>
|
||||
</g>
|
||||
<script type="text/javascript">
|
||||
alert('This app is probably vulnerable to XSS attacks!');
|
||||
</script>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 54 KiB |
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Suite/etc/suiteSchema.xsd">
|
||||
<suite name="WYSIWYGDisabledSuite">
|
||||
<before>
|
||||
<magentoCLI stepKey="disableWYSYWYG" command="config:set cms/wysiwyg/enabled disabled" />
|
||||
</before>
|
||||
<include>
|
||||
<group name="WYSIWYGDisabled"/>
|
||||
</include>
|
||||
<exclude>
|
||||
<group name="skip"/>
|
||||
</exclude>
|
||||
<after>
|
||||
<magentoCLI stepKey="disableWYSYWYG" command="config:set cms/wysiwyg/enabled enabled" />
|
||||
</after>
|
||||
</suite>
|
||||
</suites>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Suite/etc/suiteSchema.xsd">
|
||||
<suite name="sample">
|
||||
<before>
|
||||
<createData entity="defaultCategory" stepKey="createCategory"/>
|
||||
</before>
|
||||
<after>
|
||||
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
|
||||
</after>
|
||||
<include>
|
||||
<module name="Catalog" />
|
||||
<group name="login" />
|
||||
</include>
|
||||
<exclude>
|
||||
<test name="AddImageToWYSIWYGCatalogEditor"/>
|
||||
<module name="Catalog" file="AdminCreateCategoryTest.xml" />
|
||||
</exclude>
|
||||
</suite>
|
||||
</suites>
|
||||
@@ -0,0 +1,48 @@
|
||||
|
||||
Open Software License ("OSL") v. 3.0
|
||||
|
||||
This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
|
||||
|
||||
Licensed under the Open Software License version 3.0
|
||||
|
||||
1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
|
||||
|
||||
1. to reproduce the Original Work in copies, either alone or as part of a collective work;
|
||||
|
||||
2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
|
||||
|
||||
3. to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License;
|
||||
|
||||
4. to perform the Original Work publicly; and
|
||||
|
||||
5. to display the Original Work publicly.
|
||||
|
||||
2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
|
||||
|
||||
3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
|
||||
|
||||
4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
|
||||
|
||||
5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
|
||||
|
||||
6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
|
||||
|
||||
7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
|
||||
|
||||
8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
|
||||
|
||||
9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
|
||||
|
||||
10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
|
||||
|
||||
11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
|
||||
|
||||
12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
|
||||
|
||||
13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
|
||||
|
||||
14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
|
||||
|
||||
16. Modification of This License. This License is Copyright (C) 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.
|
||||
@@ -0,0 +1,48 @@
|
||||
|
||||
Academic Free License ("AFL") v. 3.0
|
||||
|
||||
This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
|
||||
|
||||
Licensed under the Academic Free License version 3.0
|
||||
|
||||
1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
|
||||
|
||||
1. to reproduce the Original Work in copies, either alone or as part of a collective work;
|
||||
|
||||
2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
|
||||
|
||||
3. to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License;
|
||||
|
||||
4. to perform the Original Work publicly; and
|
||||
|
||||
5. to display the Original Work publicly.
|
||||
|
||||
2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
|
||||
|
||||
3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
|
||||
|
||||
4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
|
||||
|
||||
5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
|
||||
|
||||
6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
|
||||
|
||||
7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
|
||||
|
||||
8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
|
||||
|
||||
9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
|
||||
|
||||
10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
|
||||
|
||||
11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
|
||||
|
||||
12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
|
||||
|
||||
13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
|
||||
|
||||
14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
|
||||
|
||||
16. Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Magento 2 Functional Tests
|
||||
|
||||
The Functional Tests Module for **Magento_ConfigurableProductCatalogSearch** Module.
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
|
||||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
|
||||
<test name="EndToEndB2CGuestUserTest">
|
||||
<!-- Search configurable product -->
|
||||
<comment userInput="Search configurable product" stepKey="commentSearchConfigurableProduct" after="searchAssertSimpleProduct2ImageNotDefault" />
|
||||
<actionGroup ref="StorefrontCheckCategoryConfigurableProduct" stepKey="searchAssertFilterCategoryConfigProduct" after="commentSearchConfigurableProduct">
|
||||
<argument name="product" value="$$createConfigProduct$$"/>
|
||||
<argument name="optionProduct" value="$$createConfigChildProduct1$$"/>
|
||||
</actionGroup>
|
||||
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
|
||||
<grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="searchGrabConfigProductImageSrc" after="searchAssertFilterCategoryConfigProduct"/>
|
||||
<assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$searchGrabConfigProductImageSrc" stepKey="searchAssertConfigProductImageNotDefault" after="searchGrabConfigProductImageSrc"/>
|
||||
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createConfigProduct.name$$)}}" stepKey="searchClickConfigProductView" after="searchAssertConfigProductImageNotDefault"/>
|
||||
<actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="searchAssertConfigProductPage" after="searchClickConfigProductView">
|
||||
<argument name="product" value="$$createConfigProduct$$"/>
|
||||
<argument name="optionProduct" value="$$createConfigChildProduct1$$"/>
|
||||
</actionGroup>
|
||||
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
|
||||
<grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="searchGrabConfigProductPageImageSrc" after="searchAssertConfigProductPage"/>
|
||||
<assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$searchGrabConfigProductPageImageSrc" stepKey="searchAssertConfigProductPageImageNotDefault" after="searchGrabConfigProductPageImageSrc"/>
|
||||
</test>
|
||||
</tests>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
|
||||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
|
||||
<test name="EndToEndB2CLoggedInUserTest">
|
||||
<!-- Search configurable product -->
|
||||
<comment userInput="Search configurable product" stepKey="commentSearchConfigurableProduct" after="searchAssertSimpleProduct2ImageNotDefault" />
|
||||
<actionGroup ref="StorefrontCheckCategoryConfigurableProduct" stepKey="searchAssertFilterCategoryConfigProduct" after="commentSearchConfigurableProduct">
|
||||
<argument name="product" value="$$createConfigProduct$$"/>
|
||||
<argument name="optionProduct" value="$$createConfigChildProduct1$$"/>
|
||||
</actionGroup>
|
||||
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
|
||||
<grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="searchGrabConfigProductImageSrc" after="searchAssertFilterCategoryConfigProduct"/>
|
||||
<assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$searchGrabConfigProductImageSrc" stepKey="searchAssertConfigProductImageNotDefault" after="searchGrabConfigProductImageSrc"/>
|
||||
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createConfigProduct.name$$)}}" stepKey="searchClickConfigProductView" after="searchAssertConfigProductImageNotDefault"/>
|
||||
<actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="searchAssertConfigProductPage" after="searchClickConfigProductView">
|
||||
<argument name="product" value="$$createConfigProduct$$"/>
|
||||
<argument name="optionProduct" value="$$createConfigChildProduct1$$"/>
|
||||
</actionGroup>
|
||||
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
|
||||
<grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="searchGrabConfigProductPageImageSrc" after="searchAssertConfigProductPage"/>
|
||||
<assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$searchGrabConfigProductPageImageSrc" stepKey="searchAssertConfigProductPageImageNotDefault" after="searchGrabConfigProductPageImageSrc"/>
|
||||
</test>
|
||||
</tests>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
|
||||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
|
||||
<!-- Check configurable product in wishlist -->
|
||||
<actionGroup name="StorefrontCustomerCheckConfigurableProductInWishlist">
|
||||
<arguments>
|
||||
<argument name="productVar"/>
|
||||
<argument name="optionProductVar" />
|
||||
</arguments>
|
||||
<waitForElement selector="{{StorefrontCustomerWishlistProductSection.ProductTitleByName(productVar.name)}}" time="30" stepKey="assertWishlistProductName"/>
|
||||
<see userInput="${{optionProductVar.price}}.00" selector="{{StorefrontCustomerWishlistProductSection.ProductPriceByName(productVar.name)}}" stepKey="AssertWishlistProductPrice"/>
|
||||
<moveMouseOver selector="{{StorefrontCustomerWishlistProductSection.ProductInfoByName(productVar.name)}}" stepKey="wishlistMoveMouseOverProduct" />
|
||||
<seeElement selector="{{StorefrontCustomerWishlistProductSection.ProductAddToCartByName(productVar.name)}}" stepKey="AssertWishlistAddToCart" />
|
||||
<seeElement selector="{{StorefrontCustomerWishlistProductSection.ProductImageByName(productVar.name)}}" stepKey="AssertWishlistProductImage" />
|
||||
</actionGroup>
|
||||
|
||||
<!-- Check configurable product in wishlist sidebar -->
|
||||
<actionGroup name="StorefrontCustomerCheckConfigurableProductInWishlistSidebar">
|
||||
<arguments>
|
||||
<argument name="productVar"/>
|
||||
<argument name="optionProductVar" />
|
||||
</arguments>
|
||||
<waitForElement selector="{{StorefrontCustomerWishlistSidebarSection.ProductTitleByName(productVar.name)}}" time="30" stepKey="assertWishlistSidebarProductName"/>
|
||||
<see userInput="${{optionProductVar.price}}.00" selector="{{StorefrontCustomerWishlistSidebarSection.ProductPriceByName(productVar.name)}}" stepKey="AssertWishlistSidebarProductPrice"/>
|
||||
<seeElement selector="{{StorefrontCustomerWishlistSidebarSection.ProductAddToCartByName(productVar.name)}}" stepKey="AssertWishlistSidebarAddToCart" />
|
||||
<seeElement selector="{{StorefrontCustomerWishlistSidebarSection.ProductImageByName(productVar.name)}}" stepKey="AssertWishlistSidebarProductImage" />
|
||||
</actionGroup>
|
||||
</actionGroups>
|
||||