├── Api
├── GraphqlInterface.php
└── InformationInterface.php
├── Controller
└── Adminhtml
│ └── Setting
│ └── Index.php
├── Model
├── Api
│ ├── Model
│ │ ├── Blog
│ │ │ ├── Category.php
│ │ │ └── Post.php
│ │ ├── Common
│ │ │ ├── Address.php
│ │ │ ├── Country.php
│ │ │ ├── Customer.php
│ │ │ ├── Page.php
│ │ │ ├── Seo.php
│ │ │ ├── Vuefront.php
│ │ │ └── Zone.php
│ │ ├── Startup
│ │ │ └── Startup.php
│ │ └── Store
│ │ │ ├── Cart.php
│ │ │ ├── Category.php
│ │ │ ├── Checkout.php
│ │ │ ├── Compare.php
│ │ │ ├── Manufacturer.php
│ │ │ ├── Product.php
│ │ │ ├── Review.php
│ │ │ └── Wishlist.php
│ ├── Resolver
│ │ ├── Blog
│ │ │ ├── Category.php
│ │ │ ├── Post.php
│ │ │ └── Review.php
│ │ ├── Common
│ │ │ ├── Account.php
│ │ │ ├── Contact.php
│ │ │ ├── Country.php
│ │ │ ├── File.php
│ │ │ ├── Home.php
│ │ │ ├── Language.php
│ │ │ ├── Page.php
│ │ │ └── Zone.php
│ │ ├── Startup
│ │ │ └── Startup.php
│ │ └── Store
│ │ │ ├── Cart.php
│ │ │ ├── Category.php
│ │ │ ├── Checkout.php
│ │ │ ├── Compare.php
│ │ │ ├── Currency.php
│ │ │ ├── Manufacturer.php
│ │ │ ├── Option.php
│ │ │ ├── Product.php
│ │ │ ├── Review.php
│ │ │ └── Wishlist.php
│ └── System
│ │ ├── Engine
│ │ ├── Loader.php
│ │ ├── Model.php
│ │ ├── Registry.php
│ │ └── Resolver.php
│ │ ├── Library
│ │ ├── Currency.php
│ │ ├── Image.php
│ │ ├── Response.php
│ │ ├── SafeException.php
│ │ └── Store.php
│ │ └── Startup.php
├── Apps.php
├── GraphqlModel.php
├── InformationModel.php
├── ResourceModel
│ ├── Apps.php
│ ├── Apps
│ │ └── Collection.php
│ ├── Settings.php
│ └── Settings
│ │ └── Collection.php
├── ServiceOutputProcessor.php
└── Settings.php
├── Plugin
├── CorsRequestMatchPlugin.php
└── CorsRequestOptionsPlugin.php
├── README.md
├── composer.json
├── etc
├── acl.xml
├── adminhtml
│ ├── menu.xml
│ ├── routes.xml
│ └── system.xml
├── config.xml
├── db_schema.xml
├── di.xml
├── email_templates.xml
├── mapping.json
├── module.xml
├── schema.graphql
├── schemaAdmin.graphql
└── webapi.xml
├── registration.php
└── view
├── adminhtml
├── layout
│ ├── default.xml
│ └── vuefront_setting_index.xml
├── requirejs-config.js
├── templates
│ └── setting.phtml
└── web
│ ├── css
│ ├── admin.css
│ ├── bootstrap.css
│ ├── bootstrap.css.map
│ ├── bootstrap.scss
│ ├── bootstrap
│ │ ├── _alerts.scss
│ │ ├── _badges.scss
│ │ ├── _breadcrumbs.scss
│ │ ├── _button-groups.scss
│ │ ├── _buttons.scss
│ │ ├── _carousel.scss
│ │ ├── _close.scss
│ │ ├── _code.scss
│ │ ├── _component-animations.scss
│ │ ├── _dropdowns.scss
│ │ ├── _forms.scss
│ │ ├── _glyphicons.scss
│ │ ├── _grid.scss
│ │ ├── _input-groups.scss
│ │ ├── _jumbotron.scss
│ │ ├── _labels.scss
│ │ ├── _list-group.scss
│ │ ├── _media.scss
│ │ ├── _mixins.scss
│ │ ├── _modals.scss
│ │ ├── _navbar.scss
│ │ ├── _navs.scss
│ │ ├── _normalize.scss
│ │ ├── _pager.scss
│ │ ├── _pagination.scss
│ │ ├── _panels.scss
│ │ ├── _popovers.scss
│ │ ├── _print.scss
│ │ ├── _progress-bars.scss
│ │ ├── _responsive-embed.scss
│ │ ├── _responsive-utilities.scss
│ │ ├── _scaffolding.scss
│ │ ├── _tables.scss
│ │ ├── _theme.scss
│ │ ├── _thumbnails.scss
│ │ ├── _tooltip.scss
│ │ ├── _type.scss
│ │ ├── _utilities.scss
│ │ ├── _variables.scss
│ │ ├── _wells.scss
│ │ └── mixins
│ │ │ ├── _alerts.scss
│ │ │ ├── _background-variant.scss
│ │ │ ├── _border-radius.scss
│ │ │ ├── _buttons.scss
│ │ │ ├── _center-block.scss
│ │ │ ├── _clearfix.scss
│ │ │ ├── _forms.scss
│ │ │ ├── _gradients.scss
│ │ │ ├── _grid-framework.scss
│ │ │ ├── _grid.scss
│ │ │ ├── _hide-text.scss
│ │ │ ├── _image.scss
│ │ │ ├── _labels.scss
│ │ │ ├── _list-group.scss
│ │ │ ├── _nav-divider.scss
│ │ │ ├── _nav-vertical-align.scss
│ │ │ ├── _opacity.scss
│ │ │ ├── _pagination.scss
│ │ │ ├── _panels.scss
│ │ │ ├── _progress-bar.scss
│ │ │ ├── _reset-filter.scss
│ │ │ ├── _reset-text.scss
│ │ │ ├── _resize.scss
│ │ │ ├── _responsive-visibility.scss
│ │ │ ├── _size.scss
│ │ │ ├── _tab-focus.scss
│ │ │ ├── _table-row.scss
│ │ │ ├── _text-emphasis.scss
│ │ │ ├── _text-overflow.scss
│ │ │ └── _vendor-prefixes.scss
│ ├── custom.css
│ └── icon.css
│ ├── fonts
│ ├── icomoon.eot
│ ├── icomoon.svg
│ ├── icomoon.ttf
│ └── icomoon.woff
│ ├── images
│ └── logo.png
│ └── js
│ ├── pax
│ ├── .babelrc
│ ├── .browserslistrc
│ ├── .editorconfig
│ ├── .eslintrc.js
│ ├── assets
│ │ ├── img
│ │ │ ├── Bottom_image.svg
│ │ │ ├── Top_image.svg
│ │ │ ├── banned-email.svg
│ │ │ ├── bottom-info.svg
│ │ │ ├── confirm-email.svg
│ │ │ ├── firstBuild.svg
│ │ │ ├── footer-modal.svg
│ │ │ ├── logo-icon.svg
│ │ │ ├── logo.svg
│ │ │ ├── profile.png
│ │ │ ├── rocket.png
│ │ │ ├── rocket.svg
│ │ │ ├── top-info.svg
│ │ │ └── user.svg
│ │ └── scss
│ │ │ ├── _colors.scss
│ │ │ ├── _modal.scss
│ │ │ ├── _variables.scss
│ │ │ ├── customMediaVariables.css
│ │ │ ├── main.scss
│ │ │ └── variables.json
│ ├── components
│ │ ├── access.vue
│ │ ├── activity.vue
│ │ ├── alien.vue
│ │ ├── apps.vue
│ │ ├── banned.vue
│ │ ├── banner.vue
│ │ ├── check.vue
│ │ ├── confirm.vue
│ │ ├── development.vue
│ │ ├── editApp.vue
│ │ ├── firstBuild.vue
│ │ ├── header.vue
│ │ ├── header
│ │ │ ├── Account.vue
│ │ │ ├── Activation.vue
│ │ │ └── Logo.vue
│ │ ├── information.vue
│ │ ├── login.vue
│ │ ├── modal.vue
│ │ ├── rebuild.vue
│ │ ├── register.vue
│ │ ├── sign-in-banner.vue
│ │ ├── signIn.vue
│ │ ├── subscription.vue
│ │ └── welcome.vue
│ ├── core
│ │ ├── App.vue
│ │ ├── main.js
│ │ └── utils
│ │ │ ├── i18n.js
│ │ │ ├── index.js
│ │ │ ├── layouts.js
│ │ │ ├── plugins.js
│ │ │ ├── router.js
│ │ │ └── store.js
│ ├── index.html
│ ├── layouts
│ │ ├── auth.vue
│ │ ├── confirm.vue
│ │ └── default.vue
│ ├── locales
│ │ └── en
│ │ │ └── index.js
│ ├── middleware
│ │ ├── alien.js
│ │ ├── authenticated.js
│ │ ├── banned.js
│ │ ├── confirmed.js
│ │ ├── noAlien.js
│ │ ├── noBanned.js
│ │ ├── notAuthenticated.js
│ │ ├── notConfirmed.js
│ │ └── withEmail.js
│ ├── package.json
│ ├── pages
│ │ └── index.vue
│ ├── pax.config.js
│ ├── plugins
│ │ ├── VeeValidate.js
│ │ ├── apollo.js
│ │ ├── axios.js
│ │ ├── bootstrapVue.js
│ │ ├── clipboard.js
│ │ ├── cookie.js
│ │ ├── fontawesome.js
│ │ ├── modal.js
│ │ ├── moment.js
│ │ └── scrollTo.js
│ ├── postcss.config.js
│ ├── store
│ │ ├── account.js
│ │ ├── apollo.js
│ │ ├── apps.js
│ │ ├── auth.js
│ │ ├── cms.js
│ │ ├── index.js
│ │ ├── information.js
│ │ └── settings.js
│ ├── webpack-manifest.js
│ ├── webpack.config.js
│ └── yarn.lock
│ └── vuefront
│ ├── custom.css
│ ├── custom.js
│ └── manifest.json
└── frontend
└── email
└── email_template.html
/Api/GraphqlInterface.php:
--------------------------------------------------------------------------------
1 | resultPageFactory = $resultPageFactory;
15 | }
16 |
17 | public function execute()
18 | {
19 | return $resultPage = $this->resultPageFactory->create(false, ['test' => 'test']);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Model/Api/Model/Blog/Category.php:
--------------------------------------------------------------------------------
1 | _collectionFactory = $collectionFactory;
17 | $this->_categoryFactory = $categoryFactory;
18 | }
19 |
20 | public function getCategory($category_id)
21 | {
22 | return $this->_categoryFactory->create()->load($category_id);
23 | }
24 |
25 | public function getCategories($data = [])
26 | {
27 | /** @var $collection \Vuefront\Blog\Model\ResourceModel\Category\Collection */
28 | $collection = $this->_collectionFactory->create();
29 |
30 | // $collection->addStoreFilter($this->store->getStoreId());
31 |
32 | if ($data['size'] != '-1') {
33 | $collection->setPageSize($data['size']);
34 | $collection->setCurPage($data['page']);
35 | }
36 |
37 | if ($data['parent'] != -1) {
38 | if ($data['parent'] == 0) {
39 | $collection->addFieldToFilter('parent_id', 0);
40 | } else {
41 | $collection->addFieldToFilter('parent_id', $data['parent']);
42 | }
43 | }
44 |
45 | if (isset($data['order']) && ($data['order'] == 'DESC')) {
46 | $order = "DESC";
47 | } else {
48 | $order = "ASC";
49 | }
50 |
51 | $sort_data = [
52 | 'id' => 'category_id',
53 | 'name' => 'title',
54 | 'sort_order' => 'sort_order'
55 | ];
56 |
57 | if (isset($data['sort']) && in_array($data['sort'], array_keys($sort_data))) {
58 | $sort = $sort_data[$data['sort']];
59 | } else {
60 | $sort = "sort_order";
61 | }
62 |
63 | $collection->setOrder($sort, $order);
64 |
65 | $collection->load();
66 |
67 | return $collection;
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/Model/Api/Model/Blog/Post.php:
--------------------------------------------------------------------------------
1 | _collectionFactory = $collectionFactory;
19 | $this->_postFactory = $postFactory;
20 | $this->_categoryFactory = $categoryFactory;
21 | }
22 |
23 | public function getPost($post_id)
24 | {
25 | return $this->_postFactory->create()->load($post_id);
26 | }
27 |
28 | public function getPosts($data)
29 | {
30 | /** @var $collection \Vuefront\Blog\Model\ResourceModel\Post\Collection */
31 | $collection = $this->_collectionFactory->create();
32 |
33 | if ($data['category_id'] != 0) {
34 | $collection->addCategoryFilter($this->_categoryFactory->create()->load($data['category_id']));
35 | }
36 |
37 | if (isset($data['order']) && ($data['order'] == 'DESC')) {
38 | $order = "DESC";
39 | } else {
40 | $order = "ASC";
41 | }
42 |
43 | $sort_data = [
44 | 'id' => 'post_id',
45 | 'sort_order' => 'date_added'
46 | ];
47 |
48 | if (isset($data['sort']) && in_array($data['sort'], array_keys($sort_data))) {
49 | $sort = $sort_data[$data['sort']];
50 | } else {
51 | $sort = "date_added";
52 | }
53 |
54 | $collection->setOrder($sort, $order);
55 |
56 | $collection->load();
57 |
58 | return $collection;
59 | }
60 |
61 | public function getNextPost($post_id)
62 | {
63 | /** @var $collection \Vuefront\Blog\Model\ResourceModel\Post\Collection */
64 | $collection = $this->_collectionFactory->create();
65 |
66 | $collection->addFieldToFilter('post_id', ['gt' => $post_id]);
67 |
68 | $collection->setOrder('date_added', 'ASC');
69 |
70 | $collection->load();
71 |
72 | return $collection;
73 | }
74 |
75 | public function getPrevPost($post_id)
76 | {
77 | /** @var $collection \Vuefront\Blog\Model\ResourceModel\Post\Collection */
78 | $collection = $this->_collectionFactory->create();
79 |
80 | $collection->addFieldToFilter('post_id', ['lt' => $post_id]);
81 |
82 | $collection->setOrder('post_id', 'DESC');
83 |
84 | $collection->load();
85 |
86 | return $collection;
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/Model/Api/Model/Common/Address.php:
--------------------------------------------------------------------------------
1 | _addressFactory = $addressFactory;
15 | }
16 |
17 | public function addAddress($customer, $data)
18 | {
19 | $address = $this->_addressFactory->create();
20 | $address->setCity($data['city']);
21 | $address->setCompany($data['company']);
22 | $address->setFirstname($data['firstName']);
23 | $address->setLastname($data['lastName']);
24 | $address->setPostcode($data['zipcode']);
25 | $address->setRegionId($data['zoneId']);
26 | $address->setCountryId($data['countryId']);
27 | $address->setStreet($data['address1'] . ' ' . $data['address2']);
28 | $address->setTelephone(' ');
29 | $address->setCustomer($customer);
30 | $address->save();
31 |
32 | return $address;
33 | }
34 |
35 | public function editAddress($address_id, $data)
36 | {
37 | $address = $this->_addressFactory->create()->load($address_id);
38 |
39 | $address->setCity($data['city']);
40 | $address->setCompany($data['company']);
41 | $address->setFirstname($data['firstName']);
42 | $address->setLastname($data['lastName']);
43 | $address->setPostcode($data['zipcode']);
44 | $address->setRegionId($data['zoneId']);
45 | $address->setCountryId($data['countryId']);
46 | $address->setStreet($data['address1'] . ' ' . $data['address2']);
47 | $address->setTelephone(' ');
48 | $address->save();
49 |
50 | return $address;
51 | }
52 |
53 | public function deleteAddress($address_id)
54 | {
55 | $this->_addressFactory->create()->load($address_id)->delete();
56 | }
57 |
58 | public function getAddress($address_id)
59 | {
60 | return $this->_addressFactory->create()->load($address_id);
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/Model/Api/Model/Common/Country.php:
--------------------------------------------------------------------------------
1 | _collectionFactory = $collectionFactory;
17 | $this->_countryFactory = $countryFactory;
18 | }
19 |
20 | public function getCountry($country_id)
21 | {
22 | return $this->_countryFactory->create()->load($country_id);
23 | }
24 |
25 | public function getCountries($data)
26 | {
27 | /** @var $collection \Magento\Directory\Model\ResourceModel\Country\Collection */
28 | $collection = $this->_collectionFactory->create();
29 |
30 | if (!empty($data['search'])) {
31 | $collection->join('msp_tfa_country_codes', 'msp_tfa_country_codes.code = main_table.iso2_code');
32 | $collection->addFieldToFilter('name', ['like' => '%' . $data['search'] . '%']);
33 | }
34 |
35 | if ($data['size'] != '-1') {
36 | $collection->setPageSize($data['size']);
37 | $collection->setCurPage($data['page']);
38 | }
39 |
40 | if (isset($data['order']) && ($data['order'] == 'DESC')) {
41 | $order = "DESC";
42 | } else {
43 | $order = "ASC";
44 | }
45 |
46 | $sort_data = [
47 | 'id' => 'country_id',
48 | 'title' => 'iso2_code'
49 | ];
50 |
51 | if (isset($data['sort']) && in_array($data['sort'], array_keys($sort_data))) {
52 | $sort = $sort_data[$data['sort']];
53 | } else {
54 | $sort = "country_id";
55 | }
56 |
57 | $collection->setOrder($sort, $order);
58 |
59 | $collection->load();
60 |
61 | return $collection;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/Model/Api/Model/Common/Customer.php:
--------------------------------------------------------------------------------
1 | _collectionFactory = $collectionFactory;
17 | $this->_customerFactory = $customerFactory;
18 | }
19 |
20 | public function getCustomer($customer_id)
21 | {
22 | return $this->_customerFactory->create()->load($customer_id);
23 | }
24 |
25 | public function getCustomers($data)
26 | {
27 | /** @var $collection \Magento\Customer\Model\ResourceModel\Customer\Collection */
28 | $collection = $this->_collectionFactory->create();
29 |
30 | if (!empty($data['search'])) {
31 | $collection->addFieldToFilter([
32 | ['attribute'=>'firstname', 'like' => '%' . $data['search'] . '%'],
33 | ['attribute'=>'lastname', 'like' => '%' . $data['search'] . '%'],
34 | ]);
35 | }
36 |
37 | if ($data['size'] != '-1') {
38 | $collection->setPageSize($data['size']);
39 | $collection->setCurPage($data['page']);
40 | }
41 |
42 | if (isset($data['order']) && ($data['order'] == 'DESC')) {
43 | $order = "DESC";
44 | } else {
45 | $order = "ASC";
46 | }
47 |
48 | $sort_data = [
49 | 'id' => 'entity_id',
50 | 'sort_order' => 'position'
51 | ];
52 |
53 | if (isset($data['sort']) && in_array($data['sort'], array_keys($sort_data))) {
54 | $sort = $sort_data[$data['sort']];
55 | } else {
56 | $sort = "entity_id";
57 | }
58 |
59 | $collection->setOrder($sort, $order);
60 | $collection->load();
61 |
62 | return $collection;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/Model/Api/Model/Common/Page.php:
--------------------------------------------------------------------------------
1 | _collectionFactory = $collectionFactory;
17 | $this->_pageFactory = $pageFactory;
18 | }
19 |
20 | public function getPage($page_id)
21 | {
22 | return $this->_pageFactory->create()->load($page_id);
23 | }
24 |
25 | public function getPages($data)
26 | {
27 | /** @var $collection \Magento\Cms\Model\ResourceModel\Page\Collection */
28 | $collection = $this->_collectionFactory->create();
29 |
30 | if (!empty($data['search'])) {
31 | $collection->addFieldToFilter('title', ['like' => '%' . $data['search'] . '%']);
32 | }
33 |
34 | if ($data['size'] != '-1') {
35 | $collection->setPageSize($data['size']);
36 | $collection->setCurPage($data['page']);
37 | }
38 |
39 | if (isset($data['order']) && ($data['order'] == 'DESC')) {
40 | $order = "DESC";
41 | } else {
42 | $order = "ASC";
43 | }
44 |
45 | $sort_data = [
46 | 'id' => 'page_id',
47 | 'title' => 'title',
48 | 'sort_order' => 'sort_order'
49 | ];
50 |
51 | if (isset($data['sort']) && in_array($data['sort'], array_keys($sort_data))) {
52 | $sort = $sort_data[$data['sort']];
53 | } else {
54 | $sort = "sort_order";
55 | }
56 |
57 | $collection->setOrder($sort, $order);
58 |
59 | $collection->load();
60 |
61 | return $collection;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/Model/Api/Model/Common/Vuefront.php:
--------------------------------------------------------------------------------
1 | _appsFactory = $appsFactory;
21 | $this->_curl = $curl;
22 | $this->_jsonSerializer = $jsonSerializer;
23 | }
24 |
25 | public function editApp($name, $appSetting)
26 | {
27 | $appSetting['codename'] = $name;
28 |
29 | $app = $this->_appsFactory->create()->getCollection();
30 | $app->addFieldToSelect('*');
31 | $app->addFieldToFilter('codename', ['like' => $name]);
32 | $result = $app->load();
33 |
34 | $model = $result->getFirstItem();
35 |
36 | foreach ($appSetting as $key => $value) {
37 | $model->setData($key, $value);
38 | }
39 |
40 | $model->save();
41 | }
42 |
43 | public function getApp($name)
44 | {
45 | $collection = $this->_appsFactory->create()->getCollection();
46 |
47 | foreach ($collection as $key => $value) {
48 | $data = $value->getData();
49 |
50 | if ($data['codename'] == $codename) {
51 | return $value->getData();
52 | }
53 | }
54 |
55 | return false;
56 | }
57 |
58 | public function getAppsForEvent()
59 | {
60 | $collection = $this->_appsFactory->create()->getCollection();
61 |
62 | $result = [];
63 | foreach ($collection as $key => $value) {
64 | if (!empty($value['eventUrl'])) {
65 | $result[] = $value;
66 | }
67 | }
68 |
69 | return $result;
70 | }
71 |
72 | public function pushEvent($name, $data)
73 | {
74 | $apps = $this->getAppsForEvent();
75 |
76 | foreach ($apps as $key => $value) {
77 | $output = $this->request($value['eventUrl'], [
78 | 'name' => $name,
79 | 'data' => $data,
80 | ]);
81 |
82 | if ($output) {
83 | $data = $output;
84 | }
85 | }
86 |
87 | return $data;
88 | }
89 |
90 | public function request($url, $data, $token = false)
91 | {
92 | $this->_curl->addHeader('Content-type', 'application/json');
93 |
94 | if ($token) {
95 | $this->_curl->addHeader('Authorization', ' Bearer '.$token);
96 | }
97 |
98 | $this->_curl->post($url, $this->_jsonSerializer->serialize($data));
99 |
100 | $result = $this->_curl->getBody();
101 |
102 | $result = $this->_jsonSerializer->unserialize($result);
103 |
104 | return $result;
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/Model/Api/Model/Common/Zone.php:
--------------------------------------------------------------------------------
1 | _collectionFactory = $collectionFactory;
17 | $this->_regionFactory = $regionFactory;
18 | }
19 |
20 | public function getZone($zone_id)
21 | {
22 | return $this->_regionFactory->create()->load($zone_id);
23 | }
24 |
25 | public function getZones($data)
26 | {
27 | /** @var $collection \Magento\Directory\Model\ResourceModel\Region\Collection */
28 | $collection = $this->_collectionFactory->create();
29 |
30 | if (!empty($data['search'])) {
31 | $collection->addFieldToFilter('name', ['like' => '%' . $data['search'] . '%']);
32 | }
33 | if (!empty($data['country_id'])) {
34 | $collection->addFieldToFilter('country_id', $data['country_id']);
35 | }
36 |
37 | if ($data['size'] != '-1') {
38 | $collection->setPageSize($data['size']);
39 | $collection->setCurPage($data['page']);
40 | }
41 |
42 | if (isset($data['order']) && ($data['order'] == 'DESC')) {
43 | $order = "DESC";
44 | } else {
45 | $order = "ASC";
46 | }
47 |
48 | $sort_data = [
49 | 'id' => 'region_id',
50 | 'title' => 'name'
51 | ];
52 |
53 | if (isset($data['sort']) && in_array($data['sort'], array_keys($sort_data))) {
54 | $sort = $sort_data[$data['sort']];
55 | } else {
56 | $sort = "region_id";
57 | }
58 |
59 | $collection->setOrder($sort, $order);
60 | $collection->load();
61 |
62 | return $collection;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/Model/Api/Model/Store/Category.php:
--------------------------------------------------------------------------------
1 | _collectionFactory = $collectionFactory;
17 | $this->_categoryFactory = $categoryFactory;
18 | }
19 |
20 | public function getCategory($category_id)
21 | {
22 | return $this->_categoryFactory->create()->load($category_id);
23 | }
24 |
25 | public function getCategories($data = [])
26 | {
27 | $collection = $this->_collectionFactory->create();
28 |
29 | $collection->addAttributeToSelect('*');
30 |
31 | if (!empty($data['search'])) {
32 | $collection->addFieldToFilter('name', ['like' => '%' . $data['search'] . '%']);
33 | }
34 |
35 | if ($data['top']) {
36 | $collection->addAttributeToFilter('include_in_menu', ['eq' => $data['top'] ? 1 : 0]);
37 | }
38 |
39 | if ($data['size'] != '-1') {
40 | $collection->setPage($data['page'], $data['size']);
41 | }
42 |
43 | $collection->addFieldToFilter('is_active', 1);
44 |
45 | if ($data['parent'] != -1) {
46 | if ($data['parent'] == 0) {
47 | $collection->addFieldToFilter('parent_id', $this->store->getRootCategoryId());
48 | } else {
49 | $collection->addFieldToFilter('parent_id', $data['parent']);
50 | }
51 | }
52 |
53 | if (isset($data['order']) && ($data['order'] == 'DESC')) {
54 | $order = "DESC";
55 | } else {
56 | $order = "ASC";
57 | }
58 |
59 | $sort_data = [
60 | 'id' => 'entity_id',
61 | 'sort_order' => 'position'
62 | ];
63 |
64 | if (isset($data['sort']) && in_array($data['sort'], array_keys($sort_data))) {
65 | $sort = $sort_data[$data['sort']];
66 | } else {
67 | $sort = "position";
68 | }
69 |
70 | $collection->setOrder($sort, $order);
71 |
72 | $collection->load();
73 |
74 | return $collection;
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/Model/Api/Model/Store/Checkout.php:
--------------------------------------------------------------------------------
1 | _appsFactory = $appsFactory;
21 | $this->_curl = $curl;
22 | $this->_jsonSerializer = $jsonSerializer;
23 | }
24 |
25 | public function getJwt($codename)
26 | {
27 |
28 | $collection = $this->_appsFactory->create()->getCollection();
29 |
30 | $jwt = '';
31 |
32 | foreach ($collection as $key => $value) {
33 | $data = $value->getData();
34 |
35 | if ($data['codename'] == $codename) {
36 | $jwt = $data['jwt'];
37 | }
38 | }
39 |
40 | return $jwt;
41 | }
42 |
43 | public function requestCheckout($query, $variables)
44 | {
45 | $jwt = $this->getJwt('vuefront-checkout-app');
46 |
47 | $requestData = [
48 | 'operationName' => null,
49 | 'variables' => $variables,
50 | 'query' => $query
51 | ];
52 |
53 | $headr = [];
54 |
55 | $headr[] = 'Content-type: application/json';
56 | $headr[] = 'Authorization: '.$jwt;
57 |
58 | $this->_curl->addHeader('Content-type', 'application/json');
59 | $this->_curl->addHeader('Authorization', $jwt);
60 | $this->_curl->setOption(CURLOPT_SSL_VERIFYHOST, false);
61 | $this->_curl->setOption(CURLOPT_SSL_VERIFYPEER, false);
62 | $this->_curl->post(
63 | 'https://api.checkout.vuefront.com/graphql',
64 | $this->_jsonSerializer->serialize($requestData)
65 | );
66 |
67 | $result = $this->_curl->getBody();
68 |
69 | $result = $this->_jsonSerializer->unserialize($result);
70 |
71 | return $result['data'];
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/Model/Api/Model/Store/Compare.php:
--------------------------------------------------------------------------------
1 | _sessionManager = $sessionManager;
18 | }
19 |
20 | public function getCompare()
21 | {
22 | $result = [];
23 |
24 | if (!empty($this->_sessionManager->getCompare())) {
25 | $result = $this->_sessionManager->getCompare();
26 | }
27 |
28 | return $result;
29 | }
30 |
31 | public function addCompare($product_id)
32 | {
33 |
34 | $compare = $this->_sessionManager->getCompare();
35 |
36 | if (!$compare) {
37 | $compare = [];
38 | }
39 |
40 | if (!in_array($product_id, $compare)) {
41 | if (count($compare) >= 4) {
42 | array_shift($compare);
43 | }
44 | $compare[] = (int)$product_id;
45 | }
46 |
47 | $this->_sessionManager->setCompare($compare);
48 | }
49 |
50 | public function deleteCompare($product_id)
51 | {
52 | if ($this->_sessionManager->getCompare()) {
53 | $compare = $this->_sessionManager->getCompare();
54 | $key = array_search($product_id, $compare);
55 |
56 | if ($key !== false) {
57 | unset($compare[$key]);
58 | }
59 | $this->_sessionManager->setCompare($compare);
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/Model/Api/Model/Store/Manufacturer.php:
--------------------------------------------------------------------------------
1 | _collectionFactory = $collectionFactory;
33 | $this->_manufacturerFactory = $manufacturerFactory;
34 | $this->_resourceBrand = $resourceBrand;
35 | }
36 |
37 | public function getManufacturer($manufacturer_id)
38 | {
39 | return $this->_manufacturerFactory->create()->load($manufacturer_id);
40 | }
41 |
42 | public function getManufacturerByProduct($product_id)
43 | {
44 | $table = $this->_resourceBrand->getTable('vuefront_brands_brand_product');
45 | $brandData = $this->_resourceBrand->getConnection()->
46 | select()->
47 | from($table)->
48 | where('product_id='.$product_id)->
49 | query()->
50 | fetch();
51 | $brandId = 0;
52 | if ($brandData) {
53 | $brandId = $brandData['brand_id'];
54 | }
55 |
56 | return $brandId;
57 | }
58 |
59 | public function getManufacturers($data = [])
60 | {
61 | $collection = $this->_collectionFactory->create();
62 |
63 | $collection->addFieldToSelect('*');
64 |
65 | if (!empty($data['search'])) {
66 | $collection->addFieldToFilter('name', ['like' => '%' . $data['search'] . '%']);
67 | }
68 |
69 | if ($data['size'] != '-1') {
70 | $collection->setPageSize($data['size']);
71 | $collection->setCurPage($data['page']);
72 | }
73 |
74 | if (isset($data['order']) && ($data['order'] == 'DESC')) {
75 | $order = "DESC";
76 | } else {
77 | $order = "ASC";
78 | }
79 |
80 | $sort_data = [
81 | 'id' => 'brand_id',
82 | 'sort_order' => 'date_added'
83 | ];
84 |
85 | if (isset($data['sort']) && in_array($data['sort'], array_keys($sort_data))) {
86 | $sort = $sort_data[$data['sort']];
87 | } else {
88 | $sort = "date_added";
89 | }
90 |
91 | $collection->setOrder("`" . $sort . "`", $order);
92 |
93 | $collection->load();
94 |
95 | return $collection;
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/Model/Api/Model/Store/Review.php:
--------------------------------------------------------------------------------
1 | _collectionFactory = $collectionFactory;
15 | }
16 |
17 | public function getReviews($product_id)
18 | {
19 | /** @var $collection \Magento\Review\Model\ResourceModel\Review\Collection */
20 | $collection = $this->_collectionFactory->create();
21 |
22 | $collection->addStoreFilter(
23 | $this->store->getStoreId()
24 | )->addStatusFilter(
25 | \Magento\Review\Model\Review::STATUS_APPROVED
26 | )->addEntityFilter(
27 | 'product',
28 | $product_id
29 | )->setDateOrder();
30 |
31 | $collection->load();
32 |
33 | $collection->addRateVotes();
34 |
35 | return $collection;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Model/Api/Model/Store/Wishlist.php:
--------------------------------------------------------------------------------
1 | _sessionManager = $sessionManager;
18 | }
19 |
20 | public function getWishlist()
21 | {
22 | $result = [];
23 |
24 | if (!empty($this->_sessionManager->getWishList())) {
25 | $result = $this->_sessionManager->getWishList();
26 | }
27 |
28 | return $result;
29 | }
30 |
31 | public function addWishlist($product_id)
32 | {
33 | $wishList = $this->_sessionManager->getWishList();
34 |
35 | if (!$wishList) {
36 | $wishList = [];
37 | }
38 |
39 | if (!in_array($product_id, $wishList)) {
40 | $wishList[] = (int)$product_id;
41 | }
42 |
43 | $this->_sessionManager->setWishList($wishList);
44 | }
45 |
46 | public function deleteWishlist($product_id)
47 | {
48 | if ($this->_sessionManager->getWishList()) {
49 | $wishList = $this->_sessionManager->getWishList();
50 | $key = array_search($product_id, $wishList);
51 |
52 | if ($key !== false) {
53 | unset($wishList[$key]);
54 | }
55 |
56 | $this->_sessionManager->setWishList($wishList);
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/Model/Api/Resolver/Blog/Review.php:
--------------------------------------------------------------------------------
1 | _commentFactory = $commentFactory;
28 | $this->_session = $session;
29 | $this->_scopeConfig = $scopeConfig;
30 | }
31 |
32 | public function add($args)
33 | {
34 | $comment = $this->_commentFactory->create();
35 | $comment->setData([
36 | 'post_id' => $args['id'],
37 | 'rating' => $args['rating'],
38 | 'author' => $args['author'],
39 | 'description' => $args['content']
40 | ]);
41 |
42 | $comment->setStatus(0);
43 |
44 | $comment->save();
45 |
46 | return $this->load->resolver('blog/post/get', $args);
47 | }
48 |
49 | public function get($data)
50 | {
51 | /** @var $post \Vuefront\Blog\Model\Post */
52 | $post = $data['post'];
53 | /** @var \Vuefront\Blog\Model\ResourceModel\Comment\Collection $collection */
54 | $collection = $post->getComments();
55 |
56 | $comments = [];
57 | /** @var \Vuefront\Blog\Model\Comment $comment */
58 | foreach ($collection->getItems() as $comment) {
59 | $comments[] = [
60 | 'author' => $comment->getAuthor(),
61 | 'author_email' => '',
62 | 'created_at' => $comment->getDateAdded(),
63 | 'content' => $comment->getDescription(),
64 | 'rating' => $comment->getRating()
65 | ];
66 | }
67 |
68 | return [
69 | 'content' => $comments,
70 | 'totalElements' => $post->getCommentsCount()
71 | ];
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/Model/Api/Resolver/Common/Contact.php:
--------------------------------------------------------------------------------
1 | _scopeConfig = $scopeConfig;
31 | $this->_stateModel = $stateModel;
32 | $this->_transportBuilder = $transportBuilder;
33 | }
34 |
35 | public function get()
36 | {
37 | return [
38 | 'store' => $this->_scopeConfig->getValue('general/store_information/name', ScopeInterface::SCOPE_STORE),
39 | 'email' => $this->_scopeConfig->getValue('trans_email/ident_general/email', ScopeInterface::SCOPE_STORE),
40 | 'address' => $this->store->getFormattedAddress(),
41 | 'geocode' => '',
42 | 'locations' => [],
43 | 'telephone' => $this->_scopeConfig
44 | ->getValue('general/store_information/phone', ScopeInterface::SCOPE_STORE),
45 | 'fax' => '',
46 | 'open' => $this->_scopeConfig->getValue('general/store_information/hours', ScopeInterface::SCOPE_STORE),
47 | 'comment' => ''
48 | ];
49 | }
50 |
51 | public function send($args)
52 | {
53 | $this->_stateModel->suspend();
54 | try {
55 | $sender = [
56 | 'name' => $args['name'],
57 | 'email' => $args['email'],
58 | ];
59 |
60 | $storeScope = ScopeInterface::SCOPE_STORE;
61 | $transport = $this->_transportBuilder
62 | ->setTemplateIdentifier('send_email_email_template')
63 | ->setTemplateOptions(
64 | [
65 | 'area' => Area::AREA_FRONTEND,
66 | 'store' => Store::DEFAULT_STORE_ID,
67 | ]
68 | )
69 | ->setTemplateVars($args)
70 | ->setFrom($sender)
71 | ->addTo($this->_scopeConfig->getValue('trans_email/ident_general/email', $storeScope))
72 | ->getTransport();
73 |
74 | $transport->sendMessage();
75 | $this->_stateModel->resume();
76 | } catch (\Exception $e) {
77 | $this->_stateModel->resume();
78 | throw new \Magento\Framework\Exception\MailException(__($e->getMessage()));
79 | }
80 |
81 | return [
82 | "status" => true
83 | ];
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/Model/Api/Resolver/Common/Country.php:
--------------------------------------------------------------------------------
1 | load->model('common/country');
14 |
15 | /** @var $country \Magento\Directory\Model\Country */
16 | if (!isset($args['country'])) {
17 | $country = $this->model_common_country->getCountry($args['id']);
18 | } else {
19 | $country = $args['country'];
20 | }
21 |
22 | return [
23 | 'id' => function () use ($country) {
24 | return $country->getId();
25 | },
26 | 'name' => function () use ($country) {
27 | return $country->getName();
28 | }
29 | ];
30 | }
31 |
32 | public function getList($args)
33 | {
34 | $this->load->model('common/country');
35 | $countries = [];
36 |
37 | /** @var $collection \Magento\Directory\Model\ResourceModel\Country\Collection */
38 | $collection = $this->model_common_country->getCountries($args);
39 | $country_total = $collection->getSize();
40 |
41 | foreach ($collection->getItems() as $value) {
42 | $countries[] = $this->get(['country' => $value]);
43 | }
44 |
45 | return [
46 | 'content' => $countries,
47 | 'first' => $args['page'] === 1,
48 | 'last' => $args['page'] === ceil($country_total / $args['size']),
49 | 'number' => (int)$args['page'],
50 | 'numberOfElements' => count($countries),
51 | 'size' => (int)$args['size'],
52 | 'totalPages' => (int)ceil($country_total / $args['size']),
53 | 'totalElements' => (int)$country_total,
54 | ];
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/Model/Api/Resolver/Common/File.php:
--------------------------------------------------------------------------------
1 | 'English',
17 | 'code' => 'en-gb',
18 | 'image' => '',
19 | 'active' => true
20 | ];
21 |
22 | return $languages;
23 | }
24 |
25 | public function edit($args)
26 | {
27 | return $this->get();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Model/Api/Resolver/Common/Page.php:
--------------------------------------------------------------------------------
1 | load->model('common/page');
12 |
13 | /** @var $page \Magento\Cms\Model\Page */
14 | if (!isset($args['page'])) {
15 | $page = $this->model_common_page->getPage($args['id']);
16 | } else {
17 | $page = $args['page'];
18 | }
19 |
20 | return [
21 | 'id' => function () use ($page) {
22 | return $page->getId();
23 | },
24 | 'title' => function () use ($page) {
25 | return $page->getTitle();
26 | },
27 | 'name' => function () use ($page) {
28 | return $page->getTitle();
29 | },
30 | 'description' => function () use ($page) {
31 | return $page->getContent();
32 | },
33 | 'sort_order' => function () use ($page) {
34 | return $page->getSortOrder();
35 | },
36 | 'keyword' => function () use ($page) {
37 | return $page->getIdentifier();
38 | },
39 | 'url' => function ($root, $args) use ($page) {
40 | return $this->url([
41 | 'parent' => $root,
42 | 'args' => $args,
43 | 'page' => $page
44 | ]);
45 | },
46 | 'meta' => function () use ($page) {
47 | return [
48 | 'title' => $page->getMetaTitle() != '' ? $page->getMetaTitle() : $page->getTitle(),
49 | 'description' => $page->getMetaDescription() ? $page->getMetaDescription() : '',
50 | 'keyword' => $page->getMetaKeywords() ? $page->getMetaKeywords() : ''
51 | ];
52 | }
53 | ];
54 | }
55 |
56 | public function getList($args)
57 | {
58 | $this->load->model('common/page');
59 |
60 | /** @var $collection \Magento\Cms\Model\ResourceModel\Page\Collection */
61 | $collection = $this->model_common_page->getPages($args);
62 |
63 | $page_total = $collection->getSize();
64 |
65 | $pages = [];
66 |
67 | foreach ($collection->getItems() as $page) {
68 | $pages[] = $this->get(['page' => $page]);
69 | }
70 |
71 | return [
72 | 'content' => $pages,
73 | 'first' => $args['page'] === 1,
74 | 'last' => $args['page'] === ceil($page_total / $args['size']),
75 | 'number' => (int)$args['page'],
76 | 'numberOfElements' => count($pages),
77 | 'size' => (int)$args['size'],
78 | 'totalPages' => (int)ceil($page_total / $args['size']),
79 | 'totalElements' => (int)$page_total,
80 | ];
81 | }
82 |
83 | public function url($data)
84 | {
85 | /** @var $page_info \Magento\Cms\Model\Page */
86 | $page_info = $data['page'];
87 | $result = $data['args']['url'];
88 |
89 | $result = str_replace("_id", $page_info->getId(), $result);
90 | $result = str_replace("_name", $page_info->getTitle(), $result);
91 |
92 | if ($page_info->getIdentifier() != "") {
93 | $result = '/' . $page_info->getIdentifier();
94 | }
95 |
96 | return $result;
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/Model/Api/Resolver/Common/Zone.php:
--------------------------------------------------------------------------------
1 | load->model('common/zone');
14 |
15 | /** @var $zone \Magento\Directory\Model\Region */
16 | if (!isset($args['zone'])) {
17 | $zone = $this->model_common_zone->getZone($args['id']);
18 | } else {
19 | $zone = $args['zone'];
20 | }
21 |
22 | return [
23 | 'id' => function () use ($zone) {
24 | return $zone->getId();
25 | },
26 | 'name' => function () use ($zone) {
27 | return $zone->getName();
28 | },
29 | 'countryId' => function () use ($zone) {
30 | return $zone->getCountryId();
31 | }
32 | ];
33 | }
34 |
35 | public function getList($args)
36 | {
37 | $this->load->model('common/zone');
38 | $zones = [];
39 |
40 | /** @var $collection \Magento\Directory\Model\ResourceModel\Region\Collection */
41 | $collection = $this->model_common_zone->getZones($args);
42 | $zone_total = $collection->getSize();
43 |
44 | foreach ($collection->getItems() as $value) {
45 | $zones[] = $this->get(['zone' => $value]);
46 | }
47 |
48 | return [
49 | 'content' => $zones,
50 | 'first' => $args['page'] === 1,
51 | 'last' => $args['page'] === ceil($zone_total / $args['size']),
52 | 'number' => (int)$args['page'],
53 | 'numberOfElements' => count($zones),
54 | 'size' => (int)$args['size'],
55 | 'totalPages' => (int)ceil($zone_total / $args['size']),
56 | 'totalElements' => (int)$zone_total,
57 | ];
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/Model/Api/Resolver/Startup/Startup.php:
--------------------------------------------------------------------------------
1 | load->model('startup/startup');
14 |
15 | try {
16 | $query = $input['query'];
17 | $sources = [$this->model_startup_startup->getSchema()];
18 | if ($this->model_startup_startup->checkAccess()) {
19 | $sources[] = $this->model_startup_startup->getAdminSchema();
20 | }
21 |
22 | $source = $this->model_startup_startup->mergeSchemas($sources);
23 | $source = $this->model_startup_startup->parseSchema($source);
24 | $resolvers = $this->model_startup_startup->getResolvers();
25 |
26 | $schema = BuildSchema::build($source);
27 |
28 | $variableValues = isset($input['variables']) ? $input['variables'] : null;
29 | $result = GraphQL::executeQuery($schema, $query, $resolvers, null, $variableValues)->toArray();
30 | } catch (\Exception $e) {
31 | $result = [
32 | 'error' => [
33 | 'message' => $e->getMessage()
34 | ]
35 | ];
36 | }
37 |
38 | $this->response->setOutput($result);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Model/Api/Resolver/Store/Compare.php:
--------------------------------------------------------------------------------
1 | load->model('store/compare');
12 |
13 | $this->model_store_compare->addCompare($args['id']);
14 |
15 | return $this->get();
16 | }
17 |
18 | public function remove($args)
19 | {
20 | $this->load->model('store/compare');
21 | $this->model_store_compare->deleteCompare($args['id']);
22 |
23 | return $this->get();
24 | }
25 |
26 | public function get($args = [])
27 | {
28 | $this->load->model('store/compare');
29 | $compare = [];
30 | $results = $this->model_store_compare->getCompare();
31 |
32 | foreach ($results as $product_id) {
33 | $compare[] = $this->load->resolver('store/product/get', ['id' => $product_id]);
34 | }
35 |
36 | return $compare;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Model/Api/Resolver/Store/Currency.php:
--------------------------------------------------------------------------------
1 | _currencyModel = $currencyModel;
28 | $this->_currencyBundle = $currencyBundle;
29 | $this->_resolverModel = $resolverModel;
30 | }
31 |
32 | public function get()
33 | {
34 | $currencies = [];
35 |
36 | foreach ($this->_currencyModel->getConfigAllowCurrencies() as $code) {
37 | $allCurrencies = $this->_currencyBundle->get(
38 | $this->_resolverModel->getLocale()
39 | )['Currencies'];
40 |
41 | $currency = $this->_currencyModel->load($code);
42 |
43 | $currencies[] = [
44 | 'title' => $allCurrencies[$code][1] ?: $code,
45 | 'name' => $allCurrencies[$code][1] ?: $code,
46 | 'code' => $code,
47 | 'symbol_left' => $currency->getCurrencySymbol(),
48 | 'symbol_right' => '',
49 | 'active' => $code == $this->store->getCurrencyCode()
50 | ];
51 | }
52 |
53 | return $currencies;
54 | }
55 |
56 | public function edit($args)
57 | {
58 | $this->store->setCurrencyCode($args['code']);
59 | return $this->get();
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/Model/Api/Resolver/Store/Option.php:
--------------------------------------------------------------------------------
1 | _ratingFactory = $ratingFactory;
20 | $this->_reviewFactory = $reviewFactory;
21 | }
22 |
23 | public function add($args)
24 | {
25 | $productId = $args['id'];
26 | $reviewFinalData['ratings'][1] = $args['rating'];
27 | $reviewFinalData['nickname'] = $args['author'];
28 | $reviewFinalData['title'] = "";
29 | $reviewFinalData['detail'] = $args['content'];
30 | $review = $this->_reviewFactory->create()->setData($reviewFinalData);
31 | $review->unsetData('review_id');
32 | $review->setEntityId($review->getEntityIdByCode(\Magento\Review\Model\Review::ENTITY_PRODUCT_CODE))
33 | ->setEntityPkValue($productId)
34 | ->setStatusId(\Magento\Review\Model\Review::STATUS_APPROVED)
35 | ->setStoreId($this->store->getStoreId())
36 | ->setStores([$this->store->getStoreId()])
37 | ->save();
38 |
39 | foreach ($reviewFinalData['ratings'] as $ratingId => $optionId) {
40 | $this->_ratingFactory->create()
41 | ->setRatingId($ratingId)
42 | ->setReviewId($review->getId())
43 | ->addOptionVote($optionId, $productId);
44 | }
45 | $review->aggregate();
46 |
47 | return $this->load->resolver('store/product/get', $args);
48 | }
49 |
50 | public function get($data)
51 | {
52 | $this->load->model('store/review');
53 | /** @var $product \Magento\Catalog\Model\Product */
54 | $product = $data['product'];
55 | /** @var $collection \Magento\Review\Model\ResourceModel\Review\Collection */
56 | $collection = $this->model_store_review->getReviews($product->getId());
57 |
58 | $comments = [];
59 |
60 | /** @var \Magento\Review\Model\Review $comment */
61 | foreach ($collection->getItems() as $comment) {
62 | $avg = 0;
63 | if (count($comment->getRatingVotes())) {
64 | $ratings = [];
65 | foreach ($comment->getRatingVotes() as $rating) {
66 | $ratings[] = $rating->getPercent();
67 | }
68 | $avg = array_sum($ratings) / count($ratings);
69 | }
70 |
71 | $comments[] = [
72 | 'author' => $comment->getData('nickname'),
73 | 'author_email' => '',
74 | 'created_at' => $comment->getData('created_at'),
75 | 'content' => $comment->getData('detail'),
76 | 'rating' => (float)$avg * 5 / 100
77 | ];
78 | }
79 |
80 | return $comments;
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/Model/Api/Resolver/Store/Wishlist.php:
--------------------------------------------------------------------------------
1 | load->model('store/wishlist');
12 |
13 | $this->model_store_wishlist->addWishlist($args['id']);
14 |
15 | return $this->getList();
16 | }
17 |
18 | public function remove($args)
19 | {
20 | $this->load->model('store/wishlist');
21 | $this->model_store_wishlist->deleteWishlist($args['id']);
22 |
23 | return $this->getList();
24 | }
25 |
26 | public function getList($args = [])
27 | {
28 | $this->load->model('store/wishlist');
29 | $wishlist = [];
30 | $results = $this->model_store_wishlist->getWishlist();
31 |
32 | foreach ($results as $product_id) {
33 | $wishlist[] = $this->load->resolver('store/product/get', ['id' => $product_id]);
34 | }
35 |
36 | return $wishlist;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Model/Api/System/Engine/Model.php:
--------------------------------------------------------------------------------
1 | registry = $registry;
20 | }
21 |
22 | public function __get($key)
23 | {
24 | return $this->registry->get($key);
25 | }
26 |
27 | public function __set($key, $value)
28 | {
29 | $this->registry->set($key, $value);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Model/Api/System/Engine/Registry.php:
--------------------------------------------------------------------------------
1 | data[$key]) ? $this->data[$key] : null);
11 | }
12 |
13 | public function set($key, $value)
14 | {
15 | $this->data[$key] = $value;
16 | }
17 |
18 | public function has($key)
19 | {
20 | return isset($this->data[$key]);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Model/Api/System/Engine/Resolver.php:
--------------------------------------------------------------------------------
1 | registry = $registry;
25 | }
26 |
27 | public function __get($key)
28 | {
29 | return $this->registry->get($key);
30 | }
31 |
32 | public function __set($key, $value)
33 | {
34 | $this->registry->set($key, $value);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Model/Api/System/Library/Currency.php:
--------------------------------------------------------------------------------
1 | currency = $currency;
13 | }
14 |
15 | public function format($price)
16 | {
17 | return $this->currency->currency($price, true, false);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Model/Api/System/Library/Image.php:
--------------------------------------------------------------------------------
1 | storeManager = $storeManager;
25 | $this->imageFactory = $imageFactory;
26 | $this->_fileSystem = $filesystem;
27 | $this->_directory = $this->_fileSystem->getDirectoryWrite(DirectoryList::MEDIA);
28 | }
29 |
30 | public function resize($imageName, $width = 258, $height = 200, $prefix = 'catalog/product')
31 | {
32 | $absolutePath = $this->_fileSystem
33 | ->getDirectoryRead(\Magento\Framework\App\Filesystem\DirectoryList::ROOT)
34 | ->getAbsolutePath('/pub/media/') . $imageName;
35 | $absolutePath = str_replace('//media/', '/', $absolutePath);
36 | $imageResized = $this->_fileSystem
37 | ->getDirectoryRead(\Magento\Framework\App\Filesystem\DirectoryList::MEDIA)
38 | ->getAbsolutePath('resized/' . $width . '/') . $imageName;
39 | $imageResized = str_replace('//', '/', $imageResized);
40 | $imageResize = $this->imageFactory->create();
41 | $imageResize->open($absolutePath);
42 | $imageResize->constrainOnly(true);
43 | $imageResize->keepTransparency(true);
44 | $imageResize->keepFrame(false);
45 | $imageResize->keepAspectRatio(true);
46 | $imageResize->resize($width, $height);
47 | $destination = $imageResized;
48 | $imageResize->save($destination);
49 |
50 | $resizedURL = $this->storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA)
51 | . 'resized/' . $width . '/' . $imageName;
52 |
53 | return $resizedURL;
54 | }
55 |
56 | public function getUrl($imagePath, $prefix = 'catalog/product')
57 | {
58 | return $this->storeManager->getStore()->getBaseUrl(UrlInterface::URL_TYPE_MEDIA) . $prefix . $imagePath;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/Model/Api/System/Library/Response.php:
--------------------------------------------------------------------------------
1 | output = $output;
11 | }
12 |
13 | public function getOutput()
14 | {
15 | return $this->output;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Model/Api/System/Library/SafeException.php:
--------------------------------------------------------------------------------
1 | storeManager = $storeManager;
13 | }
14 |
15 | public function getBaseUrl()
16 | {
17 | return $this->storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA);
18 | }
19 |
20 | public function getStoreId()
21 | {
22 | return $this->storeManager->getStore()->getId();
23 | }
24 |
25 | public function getWebsiteId()
26 | {
27 | return $this->storeManager->getStore()->getWebsiteId();
28 | }
29 |
30 | public function getName()
31 | {
32 | return $this->storeManager->getStore()->getName();
33 | }
34 |
35 | public function getFormattedAddress()
36 | {
37 | return $this->storeManager->getStore()->getFormattedAddress();
38 | }
39 |
40 | public function getCurrencyCode()
41 | {
42 | return $this->storeManager->getStore()->getCurrentCurrency()->getCode();
43 | }
44 |
45 | public function setCurrencyCode($currency)
46 | {
47 | $this->storeManager->getStore()->setCurrentCurrencyCode($currency);
48 | }
49 |
50 | public function getLocale()
51 | {
52 | return $this->storeManager->getStore()->getLocale();
53 | }
54 |
55 | public function getRootCategoryId()
56 | {
57 | return $this->storeManager->getStore()->getRootCategoryId();
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/Model/Api/System/Startup.php:
--------------------------------------------------------------------------------
1 | loader = $loader;
22 | $this->registry = $registry;
23 | $this->registry->set('load', $loader);
24 | $this->registry->set('currency', $currency);
25 | $this->registry->set('image', $image);
26 | $this->registry->set('response', $response);
27 | $this->registry->set('store', $store);
28 | $this->registry->set('driver', $driver);
29 | }
30 |
31 | /**
32 | * @param $body
33 | * @param $driver \Magento\Framework\Filesystem\Driver\File
34 | */
35 | public function start($body, $driver)
36 | {
37 | $this->loader->resolver('startup/startup', $body);
38 |
39 | return $this->registry->get('response')->getOutput();
40 | }
41 |
42 | /**
43 | * @param $body
44 | * @param $driver \Magento\Framework\Filesystem\Driver\File
45 | * @param $orderId
46 | */
47 | public function callback($body, $driver, $orderId)
48 | {
49 | $this->loader->resolver('store/checkout/callback', ['body' => $body, 'orderId' => $orderId]);
50 |
51 | return $this->registry->get('response')->getOutput();
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Model/Apps.php:
--------------------------------------------------------------------------------
1 | _init(\Vuefront\Vuefront\Model\ResourceModel\Apps::class);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Model/ResourceModel/Apps.php:
--------------------------------------------------------------------------------
1 | _init('vuefront_apps', 'app_id');
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Model/ResourceModel/Apps/Collection.php:
--------------------------------------------------------------------------------
1 | _init(
11 | \Vuefront\Vuefront\Model\Apps::class,
12 | \Vuefront\Vuefront\Model\ResourceModel\Apps::class
13 | );
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Model/ResourceModel/Settings.php:
--------------------------------------------------------------------------------
1 | _init('vuefront_settings', 'setting_id');
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Model/ResourceModel/Settings/Collection.php:
--------------------------------------------------------------------------------
1 | _init(
11 | \Vuefront\Vuefront\Model\Settings::class,
12 | \Vuefront\Vuefront\Model\ResourceModel\Settings::class
13 | );
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Model/ServiceOutputProcessor.php:
--------------------------------------------------------------------------------
1 | methodsMapProcessor->getMethodReturnType($serviceClassName, $serviceMethodName);
21 | if ($serviceClassName == \Vuefront\Vuefront\Api\GraphqlInterface::class) {
22 | return $data;
23 | } elseif ($serviceClassName == \Vuefront\Vuefront\Api\InformationInterface::class) {
24 | return $data;
25 | } else {
26 | return $this->convertValue($data, $dataType);
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Model/Settings.php:
--------------------------------------------------------------------------------
1 | _init(\Vuefront\Vuefront\Model\ResourceModel\Settings::class);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Plugin/CorsRequestMatchPlugin.php:
--------------------------------------------------------------------------------
1 | request = $request;
19 | $this->routeFactory = $routeFactory;
20 | }
21 |
22 | public function aroundMatch(
23 | Router $subject,
24 | callable $proceed,
25 | Request $request
26 | ) {
27 | try {
28 | $returnValue = $proceed($request);
29 | } catch (\Magento\Framework\Webapi\Exception $e) {
30 | $requestHttpMethod = $this->request->getHttpMethod();
31 |
32 | $position = strpos($this->request->getRequestUri(), 'vuefront');
33 | if ($requestHttpMethod === 'OPTIONS' && $position > 0) {
34 | return $this->createRoute();
35 | } else {
36 | throw $e;
37 | }
38 | }
39 | return $returnValue;
40 | }
41 |
42 | protected function createRoute()
43 | {
44 | $route = $this->routeFactory->createRoute(
45 | \Magento\Webapi\Controller\Rest\Router\Route::class,
46 | '/V1/vuefront/cors'
47 | );
48 |
49 | $route->setServiceClass(\Vuefront\Vuefront\Api\GraphqlInterface::class)
50 | ->setServiceMethod('cors')
51 | ->setSecure(false)
52 | ->setAclResources(['anonymous'])
53 | ->setParameters([]);
54 |
55 | return $route;
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/Plugin/CorsRequestOptionsPlugin.php:
--------------------------------------------------------------------------------
1 | isGet() && !$subject->isPost()
14 | && !$subject->isPut() && !$subject->isDelete()
15 | && !$subject->isOptions()) {
16 | throw new InputException(__('Request method is invalid.'));
17 | }
18 | return $subject->getMethod();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vuefront/module-vuefront",
3 | "description": "Vuefront api for magento2",
4 | "type": "magento2-module",
5 | "version": "0.3.1",
6 | "canonical": false,
7 | "require": {
8 | "webonyx/graphql-php": ">=0.12.6",
9 | "vuefront/module-blog" : ">=0.1.2",
10 | "vuefront/module-brands": ">=0.1.2",
11 | "ext-json": "*"
12 | },
13 | "license": [
14 | "OSL-3.0",
15 | "AFL-3.0"
16 | ],
17 | "autoload": {
18 | "files": [
19 | "registration.php"
20 | ],
21 | "psr-4": {
22 | "Vuefront\\Vuefront\\": ""
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/etc/acl.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/etc/adminhtml/menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
16 |
17 |
--------------------------------------------------------------------------------
/etc/adminhtml/routes.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/etc/adminhtml/system.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 | separator-top
10 |
11 | vuefront
12 | Vuefront_Vuefront::vuefront_config
13 |
15 |
16 |
18 |
19 | Magento\Config\Model\Config\Source\Yesno
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/etc/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 | 1
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/etc/db_schema.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/etc/di.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/etc/email_templates.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
--------------------------------------------------------------------------------
/etc/mapping.json:
--------------------------------------------------------------------------------
1 | {
2 | "accountLogin": "common/account/login",
3 | "accountLogout": "common/account/logout",
4 | "accountRegister": "common/account/register",
5 | "accountEdit": "common/account/edit",
6 | "accountEditPassword": "common/account/editPassword",
7 | "accountCheckLogged": "common/account/isLogged",
8 | "accountAddressList": "common/account/addressList",
9 | "accountAddress": "common/account/address",
10 | "accountAddAddress": "common/account/addAddress",
11 | "accountEditAddress": "common/account/editAddress",
12 | "accountRemoveAddress": "common/account/removeAddress",
13 |
14 | "manufacturerList": "store/manufacturer/getList",
15 | "manufacturer": "store/manufacturer/get",
16 |
17 | "customersList": "common/account/customerList",
18 | "customer": "common/account/getCustomer",
19 |
20 | "optionsList": "store/option/getList",
21 | "option": "store/option/get",
22 |
23 | "home": "common/home/get",
24 |
25 | "updateApp": "common/home/updateApp",
26 | "updateSite": "common/home/updateSite",
27 |
28 | "searchUrl": "common/home/searchUrl",
29 |
30 | "uploadFile": "common/file/upload",
31 |
32 | "countriesList": "common/country/getList",
33 | "country": "common/country/get",
34 |
35 | "zonesList": "common/zone/getList",
36 | "zone": "common/zone/get",
37 |
38 | "categoryBlog": "blog/category/get",
39 | "categoriesBlogList": "blog/category/getList",
40 |
41 | "post": "blog/post/get",
42 | "postsList": "blog/post/getList",
43 | "addBlogPostReview": "blog/review/add",
44 |
45 | "checkoutLink": "store/checkout/link",
46 | "paymentAddress": "store/checkout/paymentAddress",
47 | "shippingAddress": "store/checkout/shippingAddress",
48 | "paymentMethods": "store/checkout/paymentMethods",
49 | "shippingMethods": "store/checkout/shippingMethods",
50 | "createOrder": "store/checkout/createOrder",
51 | "updateOrder": "store/checkout/updateOrder",
52 | "confirmOrder": "store/checkout/confirmOrder",
53 | "totals": "store/checkout/totals",
54 |
55 | "authProxy": "common/home/authProxy",
56 |
57 | "cart": "store/cart/get",
58 | "addToCart": "store/cart/add",
59 | "updateCart": "store/cart/update",
60 | "removeCart": "store/cart/remove",
61 | "clearCart": "store/cart/clear",
62 |
63 | "category": "store/category/get",
64 | "categoriesList": "store/category/getList",
65 |
66 | "compare": "store/compare/get",
67 | "addToCompare": "store/compare/add",
68 | "removeCompare": "store/compare/remove",
69 |
70 | "currency": "store/currency/get",
71 | "editCurrency": "store/currency/edit",
72 |
73 | "language": "common/language/get",
74 | "editLanguage": "common/language/edit",
75 |
76 | "page": "common/page/get",
77 | "pagesList": "common/page/getList",
78 |
79 | "productsList": "store/product/getList",
80 | "product": "store/product/get",
81 | "addReview": "store/review/add",
82 |
83 | "wishlist": "store/wishlist/getList",
84 | "addToWishlist": "store/wishlist/add",
85 | "removeWishlist": "store/wishlist/remove",
86 |
87 | "contactSend": "common/contact/send",
88 | "contact": "common/contact/get",
89 |
90 | "version": "common/home/version"
91 | }
92 |
--------------------------------------------------------------------------------
/etc/module.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/etc/schemaAdmin.graphql:
--------------------------------------------------------------------------------
1 | type CustomerResult {
2 | content: [Customer]
3 | first: Boolean
4 | last: Boolean
5 | number: Int
6 | numberOfElements: Int
7 | size: Int
8 | totalPages: Int
9 | totalElements: Int
10 | }
11 | type OptionResult {
12 | content: [Option]
13 | first: Boolean
14 | last: Boolean
15 | number: Int
16 | numberOfElements: Int
17 | size: Int
18 | totalPages: Int
19 | totalElements: Int
20 | }
21 |
22 | type Option {
23 | id: String
24 | name: String
25 | type: String
26 | sort_order: Int
27 | values: [OptionValue]
28 | }
29 |
30 | input InputAppSetting {
31 | eventUrl: String
32 | jwt: String
33 | authUrl: String
34 | }
35 |
36 | type AppSetting {
37 | codename: String
38 | authUrl: String
39 | eventUrl: String
40 | jwt: String
41 | }
42 |
43 | type RootQueryType {
44 | customersList(page: Int = 1, size: Int = 10, search: String, sort: String = "email", order: String = "ASC"): CustomerResult
45 | customer(id: String): Customer
46 | option(id: String): Option
47 | optionsList(page: Int = 1, size: Int = 10, search: String, sort: String = "sort_order", order: String = "ASC"): OptionResult
48 | }
49 | type RootMutationType {
50 | updateApp(name: String, settings: InputAppSetting): AppSetting
51 | updateSite(number: Int): Boolean
52 | }
53 |
--------------------------------------------------------------------------------
/etc/webapi.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/registration.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/view/adminhtml/layout/vuefront_setting_index.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | Vuefront
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/view/adminhtml/requirejs-config.js:
--------------------------------------------------------------------------------
1 | var config = {
2 | paths: {
3 | 'vuefront': 'Vuefront_Vuefront/js/vuefront/custom'
4 | }
5 | };
6 |
--------------------------------------------------------------------------------
/view/adminhtml/templates/setting.phtml:
--------------------------------------------------------------------------------
1 |
2 | get(\Magento\Store\Model\StoreManagerInterface::class);
5 | $moduleManager = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Framework\Module\Manager::class);
6 | $uriBuilder = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Backend\Model\UrlInterface::class);
7 | $tokenModel = \Magento\Framework\App\ObjectManager::getInstance()
8 | ->get(\Magento\Integration\Model\Oauth\Token::class);
9 | $authModel = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Backend\Model\Auth\Session::class);
10 | $adminUserId = $authModel->getUser()->getId();
11 | ?>
12 |
13 |
14 |
26 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/admin.css:
--------------------------------------------------------------------------------
1 | .module-content {
2 | padding: 60px 0px;
3 | }
4 |
5 | .module-content__form {
6 | max-width: 45%;
7 | margin: 0 auto;
8 | }
9 |
10 | .module-content__row {
11 | padding-top: 30px;
12 | padding-bottom: 30px;
13 | }
14 |
15 | .mb-1 {
16 | margin-bottom: 15px;
17 | }
18 |
19 | .mb-2 {
20 | margin-bottom: 25px;
21 | }
22 |
23 | @media (max-width: 767px) {
24 | .module-content__form {
25 | max-width: 100%;
26 | }
27 | }
28 |
29 | .module-content__description {
30 | font-size: 12px;
31 | color: #777;
32 | text-align: center;
33 | line-height: 20px;
34 | padding-top: 20px;
35 | }
36 |
37 | .module-content__image img {
38 | width: 200px;
39 | }
40 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap.scss:
--------------------------------------------------------------------------------
1 | .vuefront-content {
2 | // Core variables and mixins
3 | @import 'bootstrap/variables';
4 | @import 'bootstrap/mixins';
5 |
6 | // Core CSS
7 | @import 'bootstrap/scaffolding';
8 | @import 'bootstrap/type';
9 | @import 'bootstrap/code';
10 | @import 'bootstrap/grid';
11 | @import 'bootstrap/forms';
12 | @import 'bootstrap/buttons';
13 |
14 | // Components
15 | @import 'bootstrap/component-animations';
16 | @import 'bootstrap/input-groups';
17 | @import 'bootstrap/pager';
18 | @import 'bootstrap/labels';
19 | @import 'bootstrap/media';
20 | @import 'bootstrap/list-group';
21 | @import 'bootstrap/panels';
22 | @import 'bootstrap/responsive-embed';
23 | @import 'bootstrap/wells';
24 | @import 'bootstrap/close';
25 |
26 | // Utility classes
27 | @import 'bootstrap/utilities';
28 | @import 'bootstrap/responsive-utilities';
29 | }
30 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/_alerts.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Alerts
3 | // --------------------------------------------------
4 |
5 |
6 | // Base styles
7 | // -------------------------
8 |
9 | .alert {
10 | padding: $alert-padding;
11 | margin-bottom: $line-height-computed;
12 | border: 1px solid transparent;
13 | border-radius: $alert-border-radius;
14 |
15 | // Headings for larger alerts
16 | h4 {
17 | margin-top: 0;
18 | color: inherit; // Specified for the h4 to prevent conflicts of changing $headings-color
19 | }
20 |
21 | // Provide class for links that match alerts
22 | .alert-link {
23 | font-weight: $alert-link-font-weight;
24 | }
25 |
26 | // Improve alignment and spacing of inner content
27 | > p,
28 | > ul {
29 | margin-bottom: 0;
30 | }
31 |
32 | > p + p {
33 | margin-top: 5px;
34 | }
35 | }
36 |
37 | // Dismissible alerts
38 | //
39 | // Expand the right padding and account for the close button's positioning.
40 |
41 | // The misspelled .alert-dismissable was deprecated in 3.2.0.
42 | .alert-dismissable,
43 | .alert-dismissible {
44 | padding-right: ($alert-padding + 20);
45 |
46 | // Adjust close link position
47 | .close {
48 | position: relative;
49 | top: -2px;
50 | right: -21px;
51 | color: inherit;
52 | }
53 | }
54 |
55 | // Alternate styles
56 | //
57 | // Generate contextual modifier classes for colorizing the alert.
58 |
59 | .alert-success {
60 | @include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text);
61 | }
62 |
63 | .alert-info {
64 | @include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text);
65 | }
66 |
67 | .alert-warning {
68 | @include alert-variant($alert-warning-bg, $alert-warning-border, $alert-warning-text);
69 | }
70 |
71 | .alert-danger {
72 | @include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text);
73 | }
74 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/_badges.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Badges
3 | // --------------------------------------------------
4 |
5 |
6 | // Base class
7 | .badge {
8 | display: inline-block;
9 | min-width: 10px;
10 | padding: 3px 7px;
11 | font-size: $font-size-small;
12 | font-weight: $badge-font-weight;
13 | line-height: $badge-line-height;
14 | color: $badge-color;
15 | text-align: center;
16 | white-space: nowrap;
17 | vertical-align: middle;
18 | background-color: $badge-bg;
19 | border-radius: $badge-border-radius;
20 |
21 | // Empty badges collapse automatically (not available in IE8)
22 | &:empty {
23 | display: none;
24 | }
25 |
26 | // Quick fix for badges in buttons
27 | .btn & {
28 | position: relative;
29 | top: -1px;
30 | }
31 |
32 | .btn-xs &,
33 | .btn-group-xs > .btn & {
34 | top: 0;
35 | padding: 1px 5px;
36 | }
37 |
38 | // [converter] extracted a& to a.badge
39 |
40 | // Account for badges in navs
41 | .list-group-item.active > &,
42 | .nav-pills > .active > a > & {
43 | color: $badge-active-color;
44 | background-color: $badge-active-bg;
45 | }
46 |
47 | .list-group-item > & {
48 | float: right;
49 | }
50 |
51 | .list-group-item > & + & {
52 | margin-right: 5px;
53 | }
54 |
55 | .nav-pills > li > a > & {
56 | margin-left: 3px;
57 | }
58 | }
59 |
60 | // Hover state, but only for links
61 | a.badge {
62 | &:hover,
63 | &:focus {
64 | color: $badge-link-hover-color;
65 | text-decoration: none;
66 | cursor: pointer;
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/_breadcrumbs.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Breadcrumbs
3 | // --------------------------------------------------
4 |
5 |
6 | .breadcrumb {
7 | padding: $breadcrumb-padding-vertical $breadcrumb-padding-horizontal;
8 | margin-bottom: $line-height-computed;
9 | list-style: none;
10 | background-color: $breadcrumb-bg;
11 | border-radius: $border-radius-base;
12 |
13 | > li {
14 | display: inline-block;
15 |
16 | + li:before {
17 | padding: 0 5px;
18 | color: $breadcrumb-color;
19 | // [converter] Workaround for https://github.com/sass/libsass/issues/1115
20 | $nbsp: "\00a0";
21 | content: "#{$breadcrumb-separator}#{$nbsp}"; // Unicode space added since inline-block means non-collapsing white-space
22 | }
23 | }
24 |
25 | > .active {
26 | color: $breadcrumb-active-color;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/_close.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Close icons
3 | // --------------------------------------------------
4 |
5 |
6 | .close {
7 | float: right;
8 | font-size: ($font-size-base * 1.5);
9 | font-weight: $close-font-weight;
10 | line-height: 1;
11 | color: $close-color;
12 | text-shadow: $close-text-shadow;
13 | @include opacity(.2);
14 |
15 | &:hover,
16 | &:focus {
17 | color: $close-color;
18 | text-decoration: none;
19 | cursor: pointer;
20 | @include opacity(.5);
21 | }
22 |
23 | // [converter] extracted button& to button.close
24 | }
25 |
26 | // Additional properties for button version
27 | // iOS requires the button element instead of an anchor tag.
28 | // If you want the anchor version, it requires `href="#"`.
29 | // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
30 | button.close {
31 | padding: 0;
32 | cursor: pointer;
33 | background: transparent;
34 | border: 0;
35 | -webkit-appearance: none;
36 | appearance: none;
37 | }
38 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/_code.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Code (inline and block)
3 | // --------------------------------------------------
4 |
5 |
6 | // Inline and block code styles
7 | code,
8 | kbd,
9 | pre,
10 | samp {
11 | font-family: $font-family-monospace;
12 | }
13 |
14 | // Inline code
15 | code {
16 | padding: 2px 4px;
17 | font-size: 90%;
18 | color: $code-color;
19 | background-color: $code-bg;
20 | border-radius: $border-radius-base;
21 | }
22 |
23 | // User input typically entered via keyboard
24 | kbd {
25 | padding: 2px 4px;
26 | font-size: 90%;
27 | color: $kbd-color;
28 | background-color: $kbd-bg;
29 | border-radius: $border-radius-small;
30 | box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
31 |
32 | kbd {
33 | padding: 0;
34 | font-size: 100%;
35 | font-weight: 700;
36 | box-shadow: none;
37 | }
38 | }
39 |
40 | // Blocks of code
41 | pre {
42 | display: block;
43 | padding: (($line-height-computed - 1) / 2);
44 | margin: 0 0 ($line-height-computed / 2);
45 | font-size: ($font-size-base - 1); // 14px to 13px
46 | line-height: $line-height-base;
47 | color: $pre-color;
48 | word-break: break-all;
49 | word-wrap: break-word;
50 | background-color: $pre-bg;
51 | border: 1px solid $pre-border-color;
52 | border-radius: $border-radius-base;
53 |
54 | // Account for some code outputs that place code tags in pre tags
55 | code {
56 | padding: 0;
57 | font-size: inherit;
58 | color: inherit;
59 | white-space: pre-wrap;
60 | background-color: transparent;
61 | border-radius: 0;
62 | }
63 | }
64 |
65 | // Enable scrollable blocks of code
66 | .pre-scrollable {
67 | max-height: $pre-scrollable-max-height;
68 | overflow-y: scroll;
69 | }
70 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/_component-animations.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Component animations
3 | // --------------------------------------------------
4 |
5 | // Heads up!
6 | //
7 | // We don't use the `.opacity()` mixin here since it causes a bug with text
8 | // fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.
9 |
10 | .fade {
11 | opacity: 0;
12 | @include transition(opacity .15s linear);
13 |
14 | &.in {
15 | opacity: 1;
16 | }
17 | }
18 |
19 | .collapse {
20 | display: none;
21 |
22 | &.in {
23 | display: block;
24 | }
25 |
26 | // [converter] extracted tr&.in to tr.collapse.in
27 | // [converter] extracted tbody&.in to tbody.collapse.in
28 | }
29 |
30 | tr.collapse.in {
31 | display: table-row;
32 | }
33 |
34 | tbody.collapse.in {
35 | display: table-row-group;
36 | }
37 |
38 | .collapsing {
39 | position: relative;
40 | height: 0;
41 | overflow: hidden;
42 | @include transition-property(height, visibility);
43 | @include transition-duration(.35s);
44 | @include transition-timing-function(ease);
45 | }
46 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/_grid.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Grid system
3 | // --------------------------------------------------
4 |
5 |
6 | // Container widths
7 | //
8 | // Set the container width, and override it for fixed navbars in media queries.
9 |
10 | .container {
11 | @include container-fixed;
12 |
13 | @media (min-width: $screen-sm-min) {
14 | width: $container-sm;
15 | }
16 | @media (min-width: $screen-md-min) {
17 | width: $container-md;
18 | }
19 | @media (min-width: $screen-lg-min) {
20 | width: $container-lg;
21 | }
22 | }
23 |
24 |
25 | // Fluid container
26 | //
27 | // Utilizes the mixin meant for fixed width containers, but without any defined
28 | // width for fluid, full width layouts.
29 |
30 | .container-fluid {
31 | @include container-fixed;
32 | }
33 |
34 |
35 | // Row
36 | //
37 | // Rows contain and clear the floats of your columns.
38 |
39 | .row {
40 | @include make-row;
41 | }
42 |
43 | .row-no-gutters {
44 | margin-right: 0;
45 | margin-left: 0;
46 |
47 | [class*="col-"] {
48 | padding-right: 0;
49 | padding-left: 0;
50 | }
51 | }
52 |
53 |
54 | // Columns
55 | //
56 | // Common styles for small and large grid columns
57 |
58 | @include make-grid-columns;
59 |
60 |
61 | // Extra small grid
62 | //
63 | // Columns, offsets, pushes, and pulls for extra small devices like
64 | // smartphones.
65 |
66 | @include make-grid(xs);
67 |
68 |
69 | // Small grid
70 | //
71 | // Columns, offsets, pushes, and pulls for the small device range, from phones
72 | // to tablets.
73 |
74 | @media (min-width: $screen-sm-min) {
75 | @include make-grid(sm);
76 | }
77 |
78 |
79 | // Medium grid
80 | //
81 | // Columns, offsets, pushes, and pulls for the desktop device range.
82 |
83 | @media (min-width: $screen-md-min) {
84 | @include make-grid(md);
85 | }
86 |
87 |
88 | // Large grid
89 | //
90 | // Columns, offsets, pushes, and pulls for the large desktop device range.
91 |
92 | @media (min-width: $screen-lg-min) {
93 | @include make-grid(lg);
94 | }
95 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/_jumbotron.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Jumbotron
3 | // --------------------------------------------------
4 |
5 |
6 | .jumbotron {
7 | padding-top: $jumbotron-padding;
8 | padding-bottom: $jumbotron-padding;
9 | margin-bottom: $jumbotron-padding;
10 | color: $jumbotron-color;
11 | background-color: $jumbotron-bg;
12 |
13 | h1,
14 | .h1 {
15 | color: $jumbotron-heading-color;
16 | }
17 |
18 | p {
19 | margin-bottom: ($jumbotron-padding / 2);
20 | font-size: $jumbotron-font-size;
21 | font-weight: 200;
22 | }
23 |
24 | > hr {
25 | border-top-color: darken($jumbotron-bg, 10%);
26 | }
27 |
28 | .container &,
29 | .container-fluid & {
30 | padding-right: ($grid-gutter-width / 2);
31 | padding-left: ($grid-gutter-width / 2);
32 | border-radius: $border-radius-large; // Only round corners at higher resolutions if contained in a container
33 | }
34 |
35 | .container {
36 | max-width: 100%;
37 | }
38 |
39 | @media screen and (min-width: $screen-sm-min) {
40 | padding-top: ($jumbotron-padding * 1.6);
41 | padding-bottom: ($jumbotron-padding * 1.6);
42 |
43 | .container &,
44 | .container-fluid & {
45 | padding-right: ($jumbotron-padding * 2);
46 | padding-left: ($jumbotron-padding * 2);
47 | }
48 |
49 | h1,
50 | .h1 {
51 | font-size: $jumbotron-heading-font-size;
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/_labels.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Labels
3 | // --------------------------------------------------
4 |
5 | .label {
6 | display: inline;
7 | padding: .2em .6em .3em;
8 | font-size: 75%;
9 | font-weight: 700;
10 | line-height: 1;
11 | color: $label-color;
12 | text-align: center;
13 | white-space: nowrap;
14 | vertical-align: baseline;
15 | border-radius: .25em;
16 |
17 | // [converter] extracted a& to a.label
18 |
19 | // Empty labels collapse automatically (not available in IE8)
20 | &:empty {
21 | display: none;
22 | }
23 |
24 | // Quick fix for labels in buttons
25 | .btn & {
26 | position: relative;
27 | top: -1px;
28 | }
29 | }
30 |
31 | // Add hover effects, but only for links
32 | a.label {
33 | &:hover,
34 | &:focus {
35 | color: $label-link-hover-color;
36 | text-decoration: none;
37 | cursor: pointer;
38 | }
39 | }
40 |
41 | // Colors
42 | // Contextual variations (linked labels get darker on :hover)
43 |
44 | .label-default {
45 | @include label-variant($label-default-bg);
46 | }
47 |
48 | .label-primary {
49 | @include label-variant($label-primary-bg);
50 | }
51 |
52 | .label-success {
53 | @include label-variant($label-success-bg);
54 | }
55 |
56 | .label-info {
57 | @include label-variant($label-info-bg);
58 | }
59 |
60 | .label-warning {
61 | @include label-variant($label-warning-bg);
62 | }
63 |
64 | .label-danger {
65 | @include label-variant($label-danger-bg);
66 | }
67 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/_media.scss:
--------------------------------------------------------------------------------
1 | .media {
2 | // Proper spacing between instances of .media
3 | margin-top: 15px;
4 |
5 | &:first-child {
6 | margin-top: 0;
7 | }
8 | }
9 |
10 | .media,
11 | .media-body {
12 | overflow: hidden;
13 | zoom: 1;
14 | }
15 |
16 | .media-body {
17 | width: 10000px;
18 | }
19 |
20 | .media-object {
21 | display: block;
22 |
23 | // Fix collapse in webkit from max-width: 100% and display: table-cell.
24 | &.img-thumbnail {
25 | max-width: none;
26 | }
27 | }
28 |
29 | .media-right,
30 | .media > .pull-right {
31 | padding-left: 10px;
32 | }
33 |
34 | .media-left,
35 | .media > .pull-left {
36 | padding-right: 10px;
37 | }
38 |
39 | .media-left,
40 | .media-right,
41 | .media-body {
42 | display: table-cell;
43 | vertical-align: top;
44 | }
45 |
46 | .media-middle {
47 | vertical-align: middle;
48 | }
49 |
50 | .media-bottom {
51 | vertical-align: bottom;
52 | }
53 |
54 | // Reset margins on headings for tighter default spacing
55 | .media-heading {
56 | margin-top: 0;
57 | margin-bottom: 5px;
58 | }
59 |
60 | // Media list variation
61 | //
62 | // Undo default ul/ol styles
63 | .media-list {
64 | padding-left: 0;
65 | list-style: none;
66 | }
67 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/_mixins.scss:
--------------------------------------------------------------------------------
1 | // Mixins
2 | // --------------------------------------------------
3 | // Utilities
4 | @import "mixins/hide-text";
5 | @import "mixins/opacity";
6 | @import "mixins/image";
7 | @import "mixins/labels";
8 | @import "mixins/reset-filter";
9 | @import "mixins/resize";
10 | @import "mixins/responsive-visibility";
11 | @import "mixins/size";
12 | @import "mixins/tab-focus";
13 | @import "mixins/reset-text";
14 | @import "mixins/text-emphasis";
15 | @import "mixins/text-overflow";
16 | @import "mixins/vendor-prefixes";
17 | // Components
18 | @import "mixins/alerts";
19 | @import "mixins/buttons";
20 | @import "mixins/panels";
21 | @import "mixins/pagination";
22 | @import "mixins/list-group";
23 | @import "mixins/nav-divider";
24 | @import "mixins/forms";
25 | @import "mixins/progress-bar";
26 | @import "mixins/table-row";
27 | // Skins
28 | @import "mixins/background-variant";
29 | @import "mixins/border-radius";
30 | @import "mixins/gradients";
31 | // Layout
32 | @import "mixins/clearfix";
33 | @import "mixins/center-block";
34 | @import "mixins/nav-vertical-align";
35 | @import "mixins/grid-framework";
36 | @import "mixins/grid";
37 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/_pager.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Pager pagination
3 | // --------------------------------------------------
4 |
5 |
6 | .pager {
7 | padding-left: 0;
8 | margin: $line-height-computed 0;
9 | text-align: center;
10 | list-style: none;
11 | @include clearfix;
12 |
13 | li {
14 | display: inline;
15 |
16 | > a,
17 | > span {
18 | display: inline-block;
19 | padding: 5px 14px;
20 | background-color: $pager-bg;
21 | border: 1px solid $pager-border;
22 | border-radius: $pager-border-radius;
23 | }
24 |
25 | > a:hover,
26 | > a:focus {
27 | text-decoration: none;
28 | background-color: $pager-hover-bg;
29 | }
30 | }
31 |
32 | .next {
33 | > a,
34 | > span {
35 | float: right;
36 | }
37 | }
38 |
39 | .previous {
40 | > a,
41 | > span {
42 | float: left;
43 | }
44 | }
45 |
46 | .disabled {
47 | > a,
48 | > a:hover,
49 | > a:focus,
50 | > span {
51 | color: $pager-disabled-color;
52 | cursor: $cursor-disabled;
53 | background-color: $pager-bg;
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/_pagination.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Pagination (multiple pages)
3 | // --------------------------------------------------
4 | .pagination {
5 | display: inline-block;
6 | padding-left: 0;
7 | margin: $line-height-computed 0;
8 | border-radius: $border-radius-base;
9 |
10 | > li {
11 | display: inline; // Remove list-style and block-level defaults
12 | > a,
13 | > span {
14 | position: relative;
15 | float: left; // Collapse white-space
16 | padding: $padding-base-vertical $padding-base-horizontal;
17 | margin-left: -1px;
18 | line-height: $line-height-base;
19 | color: $pagination-color;
20 | text-decoration: none;
21 | background-color: $pagination-bg;
22 | border: 1px solid $pagination-border;
23 |
24 | &:hover,
25 | &:focus {
26 | z-index: 2;
27 | color: $pagination-hover-color;
28 | background-color: $pagination-hover-bg;
29 | border-color: $pagination-hover-border;
30 | }
31 | }
32 |
33 | &:first-child {
34 | > a,
35 | > span {
36 | margin-left: 0;
37 | @include border-left-radius($border-radius-base);
38 | }
39 | }
40 |
41 | &:last-child {
42 | > a,
43 | > span {
44 | @include border-right-radius($border-radius-base);
45 | }
46 | }
47 | }
48 |
49 | > .active > a,
50 | > .active > span {
51 | &,
52 | &:hover,
53 | &:focus {
54 | z-index: 3;
55 | color: $pagination-active-color;
56 | cursor: default;
57 | background-color: $pagination-active-bg;
58 | border-color: $pagination-active-border;
59 | }
60 | }
61 |
62 | > .disabled {
63 | > span,
64 | > span:hover,
65 | > span:focus,
66 | > a,
67 | > a:hover,
68 | > a:focus {
69 | color: $pagination-disabled-color;
70 | cursor: $cursor-disabled;
71 | background-color: $pagination-disabled-bg;
72 | border-color: $pagination-disabled-border;
73 | }
74 | }
75 | }
76 |
77 | // Sizing
78 | // --------------------------------------------------
79 |
80 | // Large
81 | .pagination-lg {
82 | @include pagination-size($padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $border-radius-large);
83 | }
84 |
85 | // Small
86 | .pagination-sm {
87 | @include pagination-size($padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $border-radius-small);
88 | }
89 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/_print.scss:
--------------------------------------------------------------------------------
1 | /*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
2 |
3 | // ==========================================================================
4 | // Print styles.
5 | // Inlined to avoid the additional HTTP request: h5bp.com/r
6 | // ==========================================================================
7 |
8 | @media print {
9 | *,
10 | *:before,
11 | *:after {
12 | color: #000 !important; // Black prints faster: h5bp.com/s
13 | text-shadow: none !important;
14 | background: transparent !important;
15 | box-shadow: none !important;
16 | }
17 |
18 | a,
19 | a:visited {
20 | text-decoration: underline;
21 | }
22 |
23 | a[href]:after {
24 | content: " (" attr(href) ")";
25 | }
26 |
27 | abbr[title]:after {
28 | content: " (" attr(title) ")";
29 | }
30 |
31 | // Don't show links that are fragment identifiers,
32 | // or use the `javascript:` pseudo protocol
33 | a[href^="#"]:after,
34 | a[href^="javascript:"]:after {
35 | content: "";
36 | }
37 |
38 | pre,
39 | blockquote {
40 | border: 1px solid #999;
41 | page-break-inside: avoid;
42 | }
43 |
44 | thead {
45 | display: table-header-group; // h5bp.com/t
46 | }
47 |
48 | tr,
49 | img {
50 | page-break-inside: avoid;
51 | }
52 |
53 | img {
54 | max-width: 100% !important;
55 | }
56 |
57 | p,
58 | h2,
59 | h3 {
60 | orphans: 3;
61 | widows: 3;
62 | }
63 |
64 | h2,
65 | h3 {
66 | page-break-after: avoid;
67 | }
68 |
69 | // Bootstrap specific changes start
70 |
71 | // Bootstrap components
72 | .navbar {
73 | display: none;
74 | }
75 | .btn,
76 | .dropup > .btn {
77 | > .caret {
78 | border-top-color: #000 !important;
79 | }
80 | }
81 | .label {
82 | border: 1px solid #000;
83 | }
84 |
85 | .table {
86 | border-collapse: collapse !important;
87 |
88 | td,
89 | th {
90 | background-color: #fff !important;
91 | }
92 | }
93 | .table-bordered {
94 | th,
95 | td {
96 | border: 1px solid #ddd !important;
97 | }
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/_progress-bars.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Progress bars
3 | // --------------------------------------------------
4 |
5 |
6 | // Bar animations
7 | // -------------------------
8 |
9 | // WebKit
10 | @-webkit-keyframes progress-bar-stripes {
11 | from {
12 | background-position: 40px 0;
13 | }
14 | to {
15 | background-position: 0 0;
16 | }
17 | }
18 |
19 | // Spec and IE10+
20 | @keyframes progress-bar-stripes {
21 | from {
22 | background-position: 40px 0;
23 | }
24 | to {
25 | background-position: 0 0;
26 | }
27 | }
28 |
29 |
30 | // Bar itself
31 | // -------------------------
32 |
33 | // Outer container
34 | .progress {
35 | height: $line-height-computed;
36 | margin-bottom: $line-height-computed;
37 | overflow: hidden;
38 | background-color: $progress-bg;
39 | border-radius: $progress-border-radius;
40 | @include box-shadow(inset 0 1px 2px rgba(0, 0, 0, .1));
41 | }
42 |
43 | // Bar of progress
44 | .progress-bar {
45 | float: left;
46 | width: 0%;
47 | height: 100%;
48 | font-size: $font-size-small;
49 | line-height: $line-height-computed;
50 | color: $progress-bar-color;
51 | text-align: center;
52 | background-color: $progress-bar-bg;
53 | @include box-shadow(inset 0 -1px 0 rgba(0, 0, 0, .15));
54 | @include transition(width .6s ease);
55 | }
56 |
57 | // Striped bars
58 | //
59 | // `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the
60 | // `.progress-bar-striped` class, which you just add to an existing
61 | // `.progress-bar`.
62 | .progress-striped .progress-bar,
63 | .progress-bar-striped {
64 | @include gradient-striped;
65 | background-size: 40px 40px;
66 | }
67 |
68 | // Call animation for the active one
69 | //
70 | // `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the
71 | // `.progress-bar.active` approach.
72 | .progress.active .progress-bar,
73 | .progress-bar.active {
74 | @include animation(progress-bar-stripes 2s linear infinite);
75 | }
76 |
77 |
78 | // Variations
79 | // -------------------------
80 |
81 | .progress-bar-success {
82 | @include progress-bar-variant($progress-bar-success-bg);
83 | }
84 |
85 | .progress-bar-info {
86 | @include progress-bar-variant($progress-bar-info-bg);
87 | }
88 |
89 | .progress-bar-warning {
90 | @include progress-bar-variant($progress-bar-warning-bg);
91 | }
92 |
93 | .progress-bar-danger {
94 | @include progress-bar-variant($progress-bar-danger-bg);
95 | }
96 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/_responsive-embed.scss:
--------------------------------------------------------------------------------
1 | // Embeds responsive
2 | //
3 | // Credit: Nicolas Gallagher and SUIT CSS.
4 |
5 | .embed-responsive {
6 | position: relative;
7 | display: block;
8 | height: 0;
9 | padding: 0;
10 | overflow: hidden;
11 |
12 | .embed-responsive-item,
13 | iframe,
14 | embed,
15 | object,
16 | video {
17 | position: absolute;
18 | top: 0;
19 | bottom: 0;
20 | left: 0;
21 | width: 100%;
22 | height: 100%;
23 | border: 0;
24 | }
25 | }
26 |
27 | // Modifier class for 16:9 aspect ratio
28 | .embed-responsive-16by9 {
29 | padding-bottom: 56.25%;
30 | }
31 |
32 | // Modifier class for 4:3 aspect ratio
33 | .embed-responsive-4by3 {
34 | padding-bottom: 75%;
35 | }
36 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/_thumbnails.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Thumbnails
3 | // --------------------------------------------------
4 |
5 |
6 | // Mixin and adjust the regular image class
7 | .thumbnail {
8 | display: block;
9 | padding: $thumbnail-padding;
10 | margin-bottom: $line-height-computed;
11 | line-height: $line-height-base;
12 | background-color: $thumbnail-bg;
13 | border: 1px solid $thumbnail-border;
14 | border-radius: $thumbnail-border-radius;
15 | @include transition(border .2s ease-in-out);
16 |
17 | > img,
18 | a > img {
19 | @include img-responsive;
20 | margin-right: auto;
21 | margin-left: auto;
22 | }
23 |
24 | // [converter] extracted a&:hover, a&:focus, a&.active to a.thumbnail:hover, a.thumbnail:focus, a.thumbnail.active
25 |
26 | // Image captions
27 | .caption {
28 | padding: $thumbnail-caption-padding;
29 | color: $thumbnail-caption-color;
30 | }
31 | }
32 |
33 | // Add a hover state for linked versions only
34 | a.thumbnail:hover,
35 | a.thumbnail:focus,
36 | a.thumbnail.active {
37 | border-color: $link-color;
38 | }
39 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/_utilities.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Utility classes
3 | // --------------------------------------------------
4 |
5 |
6 | // Floats
7 | // -------------------------
8 |
9 | .clearfix {
10 | @include clearfix;
11 | }
12 |
13 | .center-block {
14 | @include center-block;
15 | }
16 |
17 | .pull-right {
18 | float: right !important;
19 | }
20 |
21 | .pull-left {
22 | float: left !important;
23 | }
24 |
25 |
26 | // Toggling content
27 | // -------------------------
28 |
29 | // Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1
30 | .hide {
31 | display: none !important;
32 | }
33 |
34 | .show {
35 | display: block !important;
36 | }
37 |
38 | .invisible {
39 | visibility: hidden;
40 | }
41 |
42 | .text-hide {
43 | @include text-hide;
44 | }
45 |
46 |
47 | // Hide from screenreaders and browsers
48 | //
49 | // Credit: HTML5 Boilerplate
50 |
51 | .hidden {
52 | display: none !important;
53 | }
54 |
55 |
56 | // For Affix plugin
57 | // -------------------------
58 |
59 | .affix {
60 | position: fixed;
61 | }
62 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/_wells.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Wells
3 | // --------------------------------------------------
4 |
5 |
6 | // Base class
7 | .well {
8 | min-height: 20px;
9 | padding: 19px;
10 | margin-bottom: 20px;
11 | background-color: $well-bg;
12 | border: 1px solid $well-border;
13 | border-radius: $border-radius-base;
14 | @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, .05));
15 |
16 | blockquote {
17 | border-color: #ddd;
18 | border-color: rgba(0, 0, 0, .15);
19 | }
20 | }
21 |
22 | // Sizes
23 | .well-lg {
24 | padding: 24px;
25 | border-radius: $border-radius-large;
26 | }
27 |
28 | .well-sm {
29 | padding: 9px;
30 | border-radius: $border-radius-small;
31 | }
32 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/mixins/_alerts.scss:
--------------------------------------------------------------------------------
1 | // Alerts
2 |
3 | @mixin alert-variant($background, $border, $text-color) {
4 | color: $text-color;
5 | background-color: $background;
6 | border-color: $border;
7 |
8 | hr {
9 | border-top-color: darken($border, 5%);
10 | }
11 |
12 | .alert-link {
13 | color: darken($text-color, 10%);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/mixins/_background-variant.scss:
--------------------------------------------------------------------------------
1 | // Contextual backgrounds
2 |
3 | // [converter] $parent hack
4 | @mixin bg-variant($parent, $color) {
5 | #{$parent} {
6 | background-color: $color;
7 | }
8 | a#{$parent}:hover,
9 | a#{$parent}:focus {
10 | background-color: darken($color, 10%);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/mixins/_border-radius.scss:
--------------------------------------------------------------------------------
1 | // Single side border-radius
2 |
3 | @mixin border-top-radius($radius) {
4 | border-top-left-radius: $radius;
5 | border-top-right-radius: $radius;
6 | }
7 |
8 | @mixin border-right-radius($radius) {
9 | border-top-right-radius: $radius;
10 | border-bottom-right-radius: $radius;
11 | }
12 |
13 | @mixin border-bottom-radius($radius) {
14 | border-bottom-right-radius: $radius;
15 | border-bottom-left-radius: $radius;
16 | }
17 |
18 | @mixin border-left-radius($radius) {
19 | border-top-left-radius: $radius;
20 | border-bottom-left-radius: $radius;
21 | }
22 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/mixins/_buttons.scss:
--------------------------------------------------------------------------------
1 | // Button variants
2 | //
3 | // Easily pump out default styles, as well as :hover, :focus, :active,
4 | // and disabled options for all buttons
5 |
6 | @mixin button-variant($color, $background, $border) {
7 | color: $color;
8 | background-color: $background;
9 | border-color: $border;
10 |
11 | &:focus,
12 | &.focus {
13 | color: $color;
14 | background-color: darken($background, 10%);
15 | border-color: darken($border, 25%);
16 | }
17 | &:hover {
18 | color: $color;
19 | background-color: darken($background, 10%);
20 | border-color: darken($border, 12%);
21 | }
22 | &:active,
23 | &.active,
24 | .open > &.dropdown-toggle {
25 | color: $color;
26 | background-color: darken($background, 10%);
27 | background-image: none;
28 | border-color: darken($border, 12%);
29 |
30 | &:hover,
31 | &:focus,
32 | &.focus {
33 | color: $color;
34 | background-color: darken($background, 17%);
35 | border-color: darken($border, 25%);
36 | }
37 | }
38 | &.disabled,
39 | &[disabled],
40 | fieldset[disabled] & {
41 | &:hover,
42 | &:focus,
43 | &.focus {
44 | background-color: $background;
45 | border-color: $border;
46 | }
47 | }
48 |
49 | .badge {
50 | color: $background;
51 | background-color: $color;
52 | }
53 | }
54 |
55 | // Button sizes
56 | @mixin button-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
57 | padding: $padding-vertical $padding-horizontal;
58 | font-size: $font-size;
59 | line-height: $line-height;
60 | border-radius: $border-radius;
61 | }
62 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/mixins/_center-block.scss:
--------------------------------------------------------------------------------
1 | // Center-align a block level element
2 |
3 | @mixin center-block() {
4 | display: block;
5 | margin-right: auto;
6 | margin-left: auto;
7 | }
8 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/mixins/_clearfix.scss:
--------------------------------------------------------------------------------
1 | // Clearfix
2 | //
3 | // For modern browsers
4 | // 1. The space content is one way to avoid an Opera bug when the
5 | // contenteditable attribute is included anywhere else in the document.
6 | // Otherwise it causes space to appear at the top and bottom of elements
7 | // that are clearfixed.
8 | // 2. The use of `table` rather than `block` is only necessary if using
9 | // `:before` to contain the top-margins of child elements.
10 | //
11 | // Source: http://nicolasgallagher.com/micro-clearfix-hack/
12 |
13 | @mixin clearfix() {
14 | &:before,
15 | &:after {
16 | display: table; // 2
17 | content: " "; // 1
18 | }
19 | &:after {
20 | clear: both;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/view/adminhtml/web/css/bootstrap/mixins/_forms.scss:
--------------------------------------------------------------------------------
1 | // Form validation states
2 | //
3 | // Used in forms.less to generate the form validation CSS for warnings, errors,
4 | // and successes.
5 |
6 | @mixin form-control-validation($text-color: #555, $border-color: #ccc, $background-color: #f5f5f5) {
7 | // Color the label and help text
8 | .help-block,
9 | .control-label,
10 | .radio,
11 | .checkbox,
12 | .radio-inline,
13 | .checkbox-inline,
14 | &.radio label,
15 | &.checkbox label,
16 | &.radio-inline label,
17 | &.checkbox-inline label {
18 | color: $text-color;
19 | }
20 | // Set the border and box shadow on specific inputs to match
21 | .form-control {
22 | border-color: $border-color;
23 | @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, .075)); // Redeclare so transitions work
24 | &:focus {
25 | border-color: darken($border-color, 10%);
26 | $shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px lighten($border-color, 20%);
27 | @include box-shadow($shadow);
28 | }
29 | }
30 | // Set validation states also for addons
31 | .input-group-addon {
32 | color: $text-color;
33 | background-color: $background-color;
34 | border-color: $border-color;
35 | }
36 | // Optional feedback icon
37 | .form-control-feedback {
38 | color: $text-color;
39 | }
40 | }
41 |
42 |
43 | // Form control focus state
44 | //
45 | // Generate a customized focus state and for any input with the specified color,
46 | // which defaults to the `$input-border-focus` variable.
47 | //
48 | // We highly encourage you to not customize the default value, but instead use
49 | // this to tweak colors on an as-needed basis. This aesthetic change is based on
50 | // WebKit's default styles, but applicable to a wider range of browsers. Its
51 | // usability and accessibility should be taken into account with any change.
52 | //
53 | // Example usage: change the default blue border and shadow to white for better
54 | // contrast against a dark gray background.
55 | @mixin form-control-focus($color: $input-border-focus) {
56 | $color-rgba: rgba(red($color), green($color), blue($color), .6);
57 | &:focus {
58 | border-color: $color;
59 | outline: 0;
60 | @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px $color-rgba);
61 | }
62 | }
63 |
64 | // Form control sizing
65 | //
66 | // Relative text size, padding, and border-radii changes for form controls. For
67 | // horizontal sizing, wrap controls in the predefined grid classes. `