Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
joshine
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
joshine
Commits
563a44a0
Commit
563a44a0
authored
Feb 10, 2023
by
wd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改目录以及加强banner自适应高度js,修改顶部包邮图片css以及添加手机模式下图片
parent
b73b29ac
Show whitespace changes
Inline
Side-by-side
Showing
52 changed files
with
222 additions
and
153 deletions
+222
-153
app/code/Joshine/Banner/Block/Adminhtml/Edit/BackButton.php
+1
-1
app/code/Joshine/Banner/Block/Adminhtml/Edit/DeleteButton.php
+1
-1
app/code/Joshine/Banner/Block/Adminhtml/Edit/GenericButton.php
+1
-1
app/code/Joshine/Banner/Block/Adminhtml/Edit/SaveButton.php
+1
-1
app/code/Joshine/Banner/Block/Index.php
+4
-4
app/code/Joshine/Banner/Controller/Index/Index.php
+2
-11
app/code/Joshine/Banner/Controller/adminhtml/Index/Add.php
+1
-1
app/code/Joshine/Banner/Controller/adminhtml/Index/Delete.php
+5
-4
app/code/Joshine/Banner/Controller/adminhtml/Index/Edit.php
+4
-4
app/code/Joshine/Banner/Controller/adminhtml/Index/FileUploader/Save.php
+3
-3
app/code/Joshine/Banner/Controller/adminhtml/Index/Index.php
+3
-3
app/code/Joshine/Banner/Controller/adminhtml/Index/Save.php
+4
-4
app/code/Joshine/Banner/Helper/Data.php
+1
-1
app/code/Joshine/Banner/Model/Bass.php
+5
-5
app/code/Joshine/Banner/Model/ResourceModel/Bass.php
+2
-2
app/code/Joshine/Banner/Model/ResourceModel/Bass/Collection.php
+4
-4
app/code/Joshine/Banner/Ui/Component/Listing/Column/ImgPatch.php
+1
-1
app/code/Joshine/Banner/Ui/Component/Listing/Column/PhoneImagePatch.php
+1
-1
app/code/Joshine/Banner/Ui/Component/Listing/Column/PostActions.php
+3
-3
app/code/Joshine/Banner/Ui/Component/Listing/Column/Status.php
+1
-1
app/code/Joshine/Banner/UiForm/Model/DataProvider.php
+2
-2
app/code/Joshine/Banner/etc/acl.xml
+3
-3
app/code/Joshine/Banner/etc/adminhtml/menu.xml
+12
-12
app/code/Joshine/Banner/etc/adminhtml/routes.xml
+3
-2
app/code/Joshine/Banner/etc/adminhtml/system.xml
+5
-5
app/code/Joshine/Banner/etc/config.xml
+3
-2
app/code/Joshine/Banner/etc/db_schema.xml
+1
-1
app/code/Joshine/Banner/etc/di.xml
+4
-4
app/code/Joshine/Banner/etc/frontend/routes.xml
+2
-1
app/code/Joshine/Banner/etc/module.xml
+2
-1
app/code/Joshine/Banner/registration.php
+2
-1
app/code/Joshine/Banner/view/adminhtml/layout/joshine_banner_index_edit.xml
+2
-1
app/code/Joshine/Banner/view/adminhtml/layout/joshine_banner_index_index.xml
+2
-1
app/code/Joshine/Banner/view/adminhtml/ui_component/joshine_banner_index_form.xml
+11
-11
app/code/Joshine/Banner/view/adminhtml/ui_component/joshine_banner_index_listing.xml
+11
-11
app/code/Joshine/Banner/view/frontend/layout/banner_index_index.xml
+2
-1
app/code/Joshine/Banner/view/frontend/requirejs-config.js
+2
-2
app/code/Joshine/Banner/view/frontend/templates/index.phtml
+6
-5
app/code/Joshine/Banner/view/frontend/web/css/banner.css
+9
-0
app/code/Joshine/Banner/view/frontend/web/css/banner1.css
+0
-0
app/code/Joshine/Banner/view/frontend/web/js/banner.js
+0
-1
app/code/Joshine/Table/Setup/InstallData.php
+1
-3
app/code/Joshine/Table/Setup/InstallSchema.php
+3
-3
app/code/Joshine/Table/Setup/UpgradeSchema.php
+5
-5
app/code/Joshine/Table/etc/module.xml
+5
-0
app/code/Joshine/Table/registration.php
+8
-0
app/code/Sparsh/FreeShippingBar/Block/Adminhtml/Entity/Edit/Tab/WhatToDisplay.php
+16
-2
app/code/Sparsh/FreeShippingBar/Controller/Adminhtml/Entity/Save.php
+26
-9
app/code/Sparsh/FreeShippingBar/etc/db_schema.xml
+1
-0
app/code/Sparsh/FreeShippingBar/view/frontend/templates/free_shipping_bar.phtml
+18
-1
app/design/frontend/Joshine/breeze/Magento_Cms/templates/default/home.phtml
+1
-1
app/design/frontend/Joshine/breeze/web/css/_custom.less
+6
-6
No files found.
app/code/
Test
/Banner/Block/Adminhtml/Edit/BackButton.php
→
app/code/
Joshine
/Banner/Block/Adminhtml/Edit/BackButton.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\Block\Adminhtml\Edit
;
namespace
Joshine
\Banner\Block\Adminhtml\Edit
;
use
Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface
;
use
Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface
;
...
...
app/code/
Test
/Banner/Block/Adminhtml/Edit/DeleteButton.php
→
app/code/
Joshine
/Banner/Block/Adminhtml/Edit/DeleteButton.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\Block\Adminhtml\Edit
;
namespace
Joshine
\Banner\Block\Adminhtml\Edit
;
use
Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface
;
use
Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface
;
...
...
app/code/
Test
/Banner/Block/Adminhtml/Edit/GenericButton.php
→
app/code/
Joshine
/Banner/Block/Adminhtml/Edit/GenericButton.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\Block\Adminhtml\Edit
;
namespace
Joshine
\Banner\Block\Adminhtml\Edit
;
use
Magento\Backend\Block\Widget\Context
;
use
Magento\Backend\Block\Widget\Context
;
use
Magento\Framework\Exception\NoSuchEntityException
;
use
Magento\Framework\Exception\NoSuchEntityException
;
...
...
app/code/
Test
/Banner/Block/Adminhtml/Edit/SaveButton.php
→
app/code/
Joshine
/Banner/Block/Adminhtml/Edit/SaveButton.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\Block\Adminhtml\Edit
;
namespace
Joshine
\Banner\Block\Adminhtml\Edit
;
use
Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface
;
use
Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface
;
...
...
app/code/
Test
/Banner/Block/Index.php
→
app/code/
Joshine
/Banner/Block/Index.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\Block
;
namespace
Joshine
\Banner\Block
;
use
Test
\Banner\Model\BassFactory
;
use
Joshine
\Banner\Model\BassFactory
;
class
Index
extends
\Magento\Framework\View\Element\Template
{
class
Index
extends
\Magento\Framework\View\Element\Template
{
...
@@ -9,8 +9,8 @@ class Index extends \Magento\Framework\View\Element\Template{
...
@@ -9,8 +9,8 @@ class Index extends \Magento\Framework\View\Element\Template{
protected
$helper
;
protected
$helper
;
public
function
__construct
(
\Magento\Framework\View\Element\Template\Context
$context
,
public
function
__construct
(
\Magento\Framework\View\Element\Template\Context
$context
,
\
Test
\Banner\Model\ResourceModel\Bass\CollectionFactory
$collectionFactory
,
\
Joshine
\Banner\Model\ResourceModel\Bass\CollectionFactory
$collectionFactory
,
\
Test
\Banner\Helper\Data
$helper
,
\
Joshine
\Banner\Helper\Data
$helper
,
array
$data
=
[]
array
$data
=
[]
)
)
{
{
...
...
app/code/
Test
/Banner/Controller/Index/Index.php
→
app/code/
Joshine
/Banner/Controller/Index/Index.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\Controller\Index
;
namespace
Joshine
\Banner\Controller\Index
;
use
Magento\Framework\App\Action\Context
;
use
Magento\Framework\App\Action\Context
;
use
Magento\Framework\View\Result\PageFactory
;
use
Magento\Framework\View\Result\PageFactory
;
use
Test
\Banner\Model\BassFactory
;
use
Joshine
\Banner\Model\BassFactory
;
class
Index
extends
\Magento\Framework\App\Action\Action
{
class
Index
extends
\Magento\Framework\App\Action\Action
{
protected
$_pageFactory
;
protected
$_pageFactory
;
...
@@ -20,15 +20,6 @@ class Index extends \Magento\Framework\App\Action\Action{
...
@@ -20,15 +20,6 @@ class Index extends \Magento\Framework\App\Action\Action{
public
function
execute
()
public
function
execute
()
{
{
// TODO: Implement execute() method.
// TODO: Implement execute() method.
/*$bass = $this->_bassFactory->create();
$collection = $bass->getCollection();
foreach ($collection as $item){
echo "<pre>";
print_r($item->getData());
echo "</pre>";
}
exit();*/
return
$this
->
_pageFactory
->
create
();
return
$this
->
_pageFactory
->
create
();
}
}
...
...
app/code/
Test
/Banner/Controller/adminhtml/Index/Add.php
→
app/code/
Joshine
/Banner/Controller/adminhtml/Index/Add.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\Controller\Adminhtml\Index
;
namespace
Joshine
\Banner\Controller\Adminhtml\Index
;
use
\Magento\Backend\App\Action
;
use
\Magento\Backend\App\Action
;
...
...
app/code/
Test
/Banner/Controller/adminhtml/Index/Delete.php
→
app/code/
Joshine
/Banner/Controller/adminhtml/Index/Delete.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\Controller\Adminhtml\Index
;
namespace
Joshine
\Banner\Controller\Adminhtml\Index
;
use
\Magento\Backend\App\Action
;
use
\Magento\Backend\App\Action
;
class
Delete
extends
Action
class
Delete
extends
Action
{
{
const
ADMIN_RESOURCE
=
'
Test
_Banner::index'
;
const
ADMIN_RESOURCE
=
'
Joshine
_Banner::index'
;
public
function
execute
()
public
function
execute
()
{
{
// TODO: Implement execute() method.
// TODO: Implement execute() method.
$id
=
$this
->
getRequest
()
->
getParam
(
'id'
);
$id
=
$this
->
getRequest
()
->
getParam
(
'id'
);
if
(
$id
>
0
){
if
(
$id
>
0
){
$model
=
$this
->
_objectManager
->
create
(
'
Test
\Banner\Model\Bass'
);
$model
=
$this
->
_objectManager
->
create
(
'
Joshine
\Banner\Model\Bass'
);
$model
->
load
(
$id
);
$model
->
load
(
$id
);
try
{
try
{
$model
->
delete
();
$model
->
delete
();
...
@@ -21,6 +21,6 @@ class Delete extends Action
...
@@ -21,6 +21,6 @@ class Delete extends Action
$this
->
messageManager
->
addSuccess
(
__
(
'Deleted error.'
));
$this
->
messageManager
->
addSuccess
(
__
(
'Deleted error.'
));
}
}
}
}
$this
->
_redirect
(
'
test
_banner/index'
);
$this
->
_redirect
(
'
joshine
_banner/index'
);
}
}
}
}
\ No newline at end of file
app/code/
Test
/Banner/Controller/adminhtml/Index/Edit.php
→
app/code/
Joshine
/Banner/Controller/adminhtml/Index/Edit.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\Controller\Adminhtml\Index
;
namespace
Joshine
\Banner\Controller\Adminhtml\Index
;
use
\Magento\Backend\App\Action
;
use
\Magento\Backend\App\Action
;
use
\Magento\Backend\App\Action\Context
;
use
\Magento\Backend\App\Action\Context
;
use
\Magento\Framework\View\Result\PageFactory
;
use
\Magento\Framework\View\Result\PageFactory
;
use
\Magento\Framework\Registry
;
use
\Magento\Framework\Registry
;
use
Magento\Shipping\Model\Rate\ResultFactory
;
use
Magento\Shipping\Model\Rate\ResultFactory
;
use
Test
\Banner\Model\BassFactory
;
use
Joshine
\Banner\Model\BassFactory
;
class
Edit
extends
Action
class
Edit
extends
Action
{
{
const
ADMIN_RESOURCE
=
"
Test
_Banner::index"
;
const
ADMIN_RESOURCE
=
"
Joshine
_Banner::index"
;
protected
$_coreRegistry
;
protected
$_coreRegistry
;
protected
$resultPageFactory
;
protected
$resultPageFactory
;
...
@@ -33,7 +33,7 @@ class Edit extends Action
...
@@ -33,7 +33,7 @@ class Edit extends Action
{
{
// TODO: Implement execute() method.
// TODO: Implement execute() method.
$id
=
$this
->
getRequest
()
->
getParam
(
'id'
);
$id
=
$this
->
getRequest
()
->
getParam
(
'id'
);
$model
=
$this
->
_objectManager
->
create
(
\
Test
\Banner\Model\Bass
::
class
);
$model
=
$this
->
_objectManager
->
create
(
\
Joshine
\Banner\Model\Bass
::
class
);
if
(
$id
){
if
(
$id
){
$model
->
load
(
$id
);
$model
->
load
(
$id
);
...
...
app/code/
Test
/Banner/Controller/adminhtml/Index/FileUploader/Save.php
→
app/code/
Joshine
/Banner/Controller/adminhtml/Index/FileUploader/Save.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\Controller\Adminhtml\Index\FileUploader
;
namespace
Joshine
\Banner\Controller\Adminhtml\Index\FileUploader
;
use
Magento\Backend\App\Action
;
use
Magento\Backend\App\Action
;
use
Magento\Framework\App\Filesystem\DirectoryList
;
use
Magento\Framework\App\Filesystem\DirectoryList
;
...
@@ -7,8 +7,8 @@ use Magento\Framework\UrlInterface;
...
@@ -7,8 +7,8 @@ use Magento\Framework\UrlInterface;
use
\Magento\Framework\Controller\ResultFactory
;
use
\Magento\Framework\Controller\ResultFactory
;
class
Save
extends
Action
class
Save
extends
Action
{
{
const
ADMIN_RESOURCE
=
"
Test
_Banner::index"
;
const
ADMIN_RESOURCE
=
"
Joshine
_Banner::index"
;
const
FILE_DIR
=
'
test
/banner'
;
const
FILE_DIR
=
'
joshine
/banner'
;
protected
$_fileUploaderFactory
;
protected
$_fileUploaderFactory
;
...
...
app/code/
Test
/Banner/Controller/adminhtml/Index/Index.php
→
app/code/
Joshine
/Banner/Controller/adminhtml/Index/Index.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\Controller\Adminhtml\Index
;
namespace
Joshine
\Banner\Controller\Adminhtml\Index
;
use
\Magento\Backend\App\Action
;
use
\Magento\Backend\App\Action
;
use
\Magento\Backend\App\Action\Context
;
use
\Magento\Backend\App\Action\Context
;
...
@@ -7,7 +7,7 @@ use \Magento\Framework\View\Result\PageFactory;
...
@@ -7,7 +7,7 @@ use \Magento\Framework\View\Result\PageFactory;
class
Index
extends
Action
class
Index
extends
Action
{
{
const
ADMIN_RESOURCE
=
"
Test
_Banner::index"
;
const
ADMIN_RESOURCE
=
"
Joshine
_Banner::index"
;
protected
$_resultPageFactory
;
protected
$_resultPageFactory
;
...
@@ -21,7 +21,7 @@ class Index extends Action
...
@@ -21,7 +21,7 @@ class Index extends Action
{
{
// TODO: Implement execute() method.
// TODO: Implement execute() method.
$resultPage
=
$this
->
_resultPageFactory
->
create
();
$resultPage
=
$this
->
_resultPageFactory
->
create
();
$resultPage
->
setActiveMenu
(
'
Test
_Banner::index'
);
$resultPage
->
setActiveMenu
(
'
Joshine
_Banner::index'
);
$resultPage
->
getConfig
()
->
getTitle
()
->
prepend
((
__
(
'Banners'
)));
$resultPage
->
getConfig
()
->
getTitle
()
->
prepend
((
__
(
'Banners'
)));
return
$resultPage
;
return
$resultPage
;
}
}
...
...
app/code/
Test
/Banner/Controller/adminhtml/Index/Save.php
→
app/code/
Joshine
/Banner/Controller/adminhtml/Index/Save.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\Controller\Adminhtml\Index
;
namespace
Joshine
\Banner\Controller\Adminhtml\Index
;
use
Magento\Backend\App\Action\Context
;
use
Magento\Backend\App\Action\Context
;
use
Test
\Banner\Model\BassFactory
;
use
Joshine
\Banner\Model\BassFactory
;
class
Save
extends
\Magento\Backend\App\Action
class
Save
extends
\Magento\Backend\App\Action
{
{
const
ADMIN_RESOURCE
=
"
Test
_Banner::index"
;
const
ADMIN_RESOURCE
=
"
Joshine
_Banner::index"
;
protected
$factory
;
protected
$factory
;
public
function
__construct
(
Context
$context
,
BassFactory
$factory
)
public
function
__construct
(
Context
$context
,
BassFactory
$factory
)
...
@@ -20,7 +20,7 @@ class Save extends \Magento\Backend\App\Action
...
@@ -20,7 +20,7 @@ class Save extends \Magento\Backend\App\Action
// TODO: Implement execute() method.
// TODO: Implement execute() method.
$data
=
$this
->
getRequest
()
->
getPostValue
();
$data
=
$this
->
getRequest
()
->
getPostValue
();
if
(
!
$data
){
if
(
!
$data
){
$this
->
_redirect
(
'
test
_banner/index/add'
);
$this
->
_redirect
(
'
joshine
_banner/index/add'
);
return
;
return
;
}
}
...
...
app/code/
Test
/Banner/Helper/Data.php
→
app/code/
Joshine
/Banner/Helper/Data.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\Helper
;
namespace
Joshine
\Banner\Helper
;
use
\Magento\Framework\App\Helper\AbstractHelper
;
use
\Magento\Framework\App\Helper\AbstractHelper
;
class
Data
extends
AbstractHelper
class
Data
extends
AbstractHelper
...
...
app/code/
Test
/Banner/Model/Bass.php
→
app/code/
Joshine
/Banner/Model/Bass.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\Model
;
namespace
Joshine
\Banner\Model
;
use
Magento\Framework\Model\AbstractModel
;
use
Magento\Framework\Model\AbstractModel
;
use
Magento\Framework\DataObject\IdentityInterface
;
use
Magento\Framework\DataObject\IdentityInterface
;
class
Bass
extends
AbstractModel
implements
IdentityInterface
class
Bass
extends
AbstractModel
implements
IdentityInterface
{
{
const
CACHE_TAG
=
'
test
_banner_bass'
;
const
CACHE_TAG
=
'
joshine
_banner_bass'
;
protected
$_cacheTat
=
'
test
_banner_bass'
;
protected
$_cacheTat
=
'
joshine
_banner_bass'
;
protected
$_eventPrefix
=
'
test
_banner_bass'
;
protected
$_eventPrefix
=
'
joshine
_banner_bass'
;
...
@@ -17,7 +17,7 @@ class Bass extends AbstractModel implements IdentityInterface
...
@@ -17,7 +17,7 @@ class Bass extends AbstractModel implements IdentityInterface
protected
function
_construct
()
protected
function
_construct
()
{
{
$this
->
_init
(
'
Test
\Banner\Model\ResourceModel\Bass'
);
$this
->
_init
(
'
Joshine
\Banner\Model\ResourceModel\Bass'
);
}
}
public
function
getIdentities
()
public
function
getIdentities
()
...
...
app/code/
Test
/Banner/Model/ResourceModel/Bass.php
→
app/code/
Joshine
/Banner/Model/ResourceModel/Bass.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\Model\ResourceModel
;
namespace
Joshine
\Banner\Model\ResourceModel
;
use
Magento\Framework\Model\ResourceModel\Db\AbstractDb
;
use
Magento\Framework\Model\ResourceModel\Db\AbstractDb
;
use
Magento\Framework\Model\ResourceModel\Db\Context
;
use
Magento\Framework\Model\ResourceModel\Db\Context
;
...
@@ -13,7 +13,7 @@ class Bass extends AbstractDb
...
@@ -13,7 +13,7 @@ class Bass extends AbstractDb
protected
function
_construct
()
protected
function
_construct
()
{
{
$this
->
_init
(
'
test
_banner_bass'
,
'id'
);
$this
->
_init
(
'
joshine
_banner_bass'
,
'id'
);
}
}
...
...
app/code/
Test
/Banner/Model/ResourceModel/Bass/Collection.php
→
app/code/
Joshine
/Banner/Model/ResourceModel/Bass/Collection.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\Model\ResourceModel\Bass
;
namespace
Joshine
\Banner\Model\ResourceModel\Bass
;
use
Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
;
use
Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
;
class
Collection
extends
AbstractCollection
class
Collection
extends
AbstractCollection
{
{
protected
$_idFieldName
=
'id'
;
protected
$_idFieldName
=
'id'
;
protected
$_eventPrefix
=
'
test
_banner_bass_collection'
;
protected
$_eventPrefix
=
'
joshine
_banner_bass_collection'
;
protected
$_eventObject
=
'bass_collection'
;
protected
$_eventObject
=
'bass_collection'
;
protected
function
_construct
(){
protected
function
_construct
(){
$this
->
_init
(
'Test\Banner\Model\Bass'
,
'Test\Banner\Model\ResourceModel\Bass'
);
$this
->
_init
(
'Joshine\Banner\Model\Bass'
,
'Joshine\Banner\Model\ResourceModel\Bass'
);
//$this->_init( \Test\Banner\Model\Bass::class, \Test\Banner\Model\ResourceModel\Bass::class );
}
}
}
}
\ No newline at end of file
app/code/
Test
/Banner/Ui/Component/Listing/Column/ImgPatch.php
→
app/code/
Joshine
/Banner/Ui/Component/Listing/Column/ImgPatch.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\Ui\Component\Listing\Column
;
namespace
Joshine
\Banner\Ui\Component\Listing\Column
;
use
Magento\Catalog\Helper\Image
;
use
Magento\Catalog\Helper\Image
;
use
Magento\Framework\UrlInterface
;
use
Magento\Framework\UrlInterface
;
...
...
app/code/
Test
/Banner/Ui/Component/Listing/Column/PhoneImagePatch.php
→
app/code/
Joshine
/Banner/Ui/Component/Listing/Column/PhoneImagePatch.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\Ui\Component\Listing\Column
;
namespace
Joshine
\Banner\Ui\Component\Listing\Column
;
use
Magento\Catalog\Helper\Image
;
use
Magento\Catalog\Helper\Image
;
use
Magento\Framework\UrlInterface
;
use
Magento\Framework\UrlInterface
;
...
...
app/code/
Test
/Banner/Ui/Component/Listing/Column/PostActions.php
→
app/code/
Joshine
/Banner/Ui/Component/Listing/Column/PostActions.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\Ui\Component\Listing\Column
;
namespace
Joshine
\Banner\Ui\Component\Listing\Column
;
use
Magento\Framework\View\Element\UiComponent\ContextInterface
;
use
Magento\Framework\View\Element\UiComponent\ContextInterface
;
use
Magento\Framework\View\Element\UiComponentFactory
;
use
Magento\Framework\View\Element\UiComponentFactory
;
...
@@ -8,8 +8,8 @@ use Magento\Framework\UrlInterface;
...
@@ -8,8 +8,8 @@ use Magento\Framework\UrlInterface;
class
PostActions
extends
Column
class
PostActions
extends
Column
{
{
const
URL_EDIT
=
'
test
_banner/index/edit'
;
const
URL_EDIT
=
'
joshine
_banner/index/edit'
;
const
URL_DELETE
=
'
test
_banner/index/delete'
;
const
URL_DELETE
=
'
joshine
_banner/index/delete'
;
protected
$urlBuilder
;
protected
$urlBuilder
;
...
...
app/code/
Test
/Banner/Ui/Component/Listing/Column/Status.php
→
app/code/
Joshine
/Banner/Ui/Component/Listing/Column/Status.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\Ui\Component\Listing\Column
;
namespace
Joshine
\Banner\Ui\Component\Listing\Column
;
use
Magento\Framework\View\Element\UiComponentFactory
;
use
Magento\Framework\View\Element\UiComponentFactory
;
use
Magento\Framework\View\Element\UiComponent\ContextInterface
;
use
Magento\Framework\View\Element\UiComponent\ContextInterface
;
...
...
app/code/
Test
/Banner/UiForm/Model/DataProvider.php
→
app/code/
Joshine
/Banner/UiForm/Model/DataProvider.php
View file @
563a44a0
<?php
<?php
namespace
Test
\Banner\UiForm\Model
;
namespace
Joshine
\Banner\UiForm\Model
;
use
Magento\Ui\DataProvider\AbstractDataProvider
;
use
Magento\Ui\DataProvider\AbstractDataProvider
;
use
Magento\Framework\App\RequestInterface
;
use
Magento\Framework\App\RequestInterface
;
use
Test
\Banner\Model\ResourceModel\Bass\CollectionFactory
;
use
Joshine
\Banner\Model\ResourceModel\Bass\CollectionFactory
;
use
Magento\Store\Model\StoreManagerInterface
;
use
Magento\Store\Model\StoreManagerInterface
;
class
DataProvider
extends
AbstractDataProvider
class
DataProvider
extends
AbstractDataProvider
...
...
app/code/
Test
/Banner/etc/acl.xml
→
app/code/
Joshine
/Banner/etc/acl.xml
View file @
563a44a0
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
<acl>
<acl>
<resources>
<resources>
<resource
id=
"Magento_Backend::admin"
>
<resource
id=
"Magento_Backend::admin"
>
<resource
id=
"Magento_Backend::
test"
title=
"Test
"
sortOrder=
"40"
>
<resource
id=
"Magento_Backend::
joshine"
title=
"Jpshone
"
sortOrder=
"40"
>
<resource
id=
"Magento_Backend::
test
_banner"
title=
"Banner"
sortOrder=
"10"
>
<resource
id=
"Magento_Backend::
Joshine
_banner"
title=
"Banner"
sortOrder=
"10"
>
<resource
id=
"
Test
_Banner::index"
title=
"Index"
sortOrder=
"10"
></resource>
<resource
id=
"
Joshine
_Banner::index"
title=
"Index"
sortOrder=
"10"
></resource>
</resource>
</resource>
</resource>
</resource>
</resource>
</resource>
...
...
app/code/
Test
/Banner/etc/adminhtml/menu.xml
→
app/code/
Joshine
/Banner/etc/adminhtml/menu.xml
View file @
563a44a0
...
@@ -2,31 +2,31 @@
...
@@ -2,31 +2,31 @@
<config
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:module:Magento_Backend:etc/menu.xsd"
>
<config
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:module:Magento_Backend:etc/menu.xsd"
>
<menu>
<menu>
<add
<add
id=
"Magento_Backend::
test
"
id=
"Magento_Backend::
joshine
"
title=
"Joshine"
title=
"Joshine"
module=
"Magento_Backend"
module=
"Magento_Backend"
sortOrder=
"99"
sortOrder=
"99"
resource=
"Magento_Backend::
test
"
resource=
"Magento_Backend::
joshine
"
/>
/>
<add
<add
id=
"Magento_Backend::
test
_banner"
id=
"Magento_Backend::
joshine
_banner"
title=
"
Test
"
title=
"
Joshine
"
translate=
"title"
translate=
"title"
module=
"Magento_Backend"
module=
"Magento_Backend"
sortOrder=
"10"
sortOrder=
"10"
parent=
"Magento_Backend::
test
"
parent=
"Magento_Backend::
joshine
"
resource=
"Magento_Backend::
test
_banner"
resource=
"Magento_Backend::
joshine
_banner"
/>
/>
<add
<add
id=
"
Test_Banner::index
"
id=
"
Joshine_Banner::joshine
"
title=
"Banner"
title=
"Banner"
module=
"
Test
_Banner"
module=
"
Joshine
_Banner"
sortOrder=
"10"
sortOrder=
"10"
parent=
"Magento_Backend::
test
_banner"
parent=
"Magento_Backend::
joshine
_banner"
action=
"
test
_banner/index/index"
action=
"
joshine
_banner/index/index"
resource=
"
Test
_Banner::index"
resource=
"
Joshine
_Banner::index"
/>
/>
<add
id=
"Sparsh_FreeShippingBar::free_shipping_bar_management"
<add
id=
"Sparsh_FreeShippingBar::free_shipping_bar_management"
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
translate=
"title"
translate=
"title"
action=
"sparsh_free_shipping_bar/entity"
action=
"sparsh_free_shipping_bar/entity"
module=
"Sparsh_FreeShippingBar"
module=
"Sparsh_FreeShippingBar"
parent=
"Magento_Backend::
test
_banner"
parent=
"Magento_Backend::
joshine
_banner"
sortOrder=
"20"
sortOrder=
"20"
resource=
"Sparsh_FreeShippingBar::free_shipping_bar_management"
resource=
"Sparsh_FreeShippingBar::free_shipping_bar_management"
dependsOnConfig=
"sparsh_free_shipping_bar/general/enable"
/>
dependsOnConfig=
"sparsh_free_shipping_bar/general/enable"
/>
...
...
app/code/
Test
/Banner/etc/adminhtml/routes.xml
→
app/code/
Joshine
/Banner/etc/adminhtml/routes.xml
View file @
563a44a0
<?xml version="1.0" ?>
<?xml version="1.0" ?>
<config
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:App/etc/routes.xsd"
>
<config
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:App/etc/routes.xsd"
>
<router
id=
"admin"
>
<router
id=
"admin"
>
<route
id=
"
test_banner"
frontName=
"test
_banner"
>
<route
id=
"
joshine_banner"
frontName=
"joshine
_banner"
>
<module
name=
"
Test
_Banner"
/>
<module
name=
"
Joshine
_Banner"
/>
</route>
</route>
</router>
</router>
</config>
</config>
\ No newline at end of file
app/code/
Test
/Banner/etc/adminhtml/system.xml
→
app/code/
Joshine
/Banner/etc/adminhtml/system.xml
View file @
563a44a0
<?xml version="1.0" ?>
<?xml version="1.0" ?>
<config
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:module:Magento_Config:etc/system_file.xsd"
>
<config
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:module:Magento_Config:etc/system_file.xsd"
>
<system>
<system>
<tab
id=
"
test
"
translate=
"label"
sortOrder=
"100"
>
<tab
id=
"
joshine
"
translate=
"label"
sortOrder=
"100"
>
<label>
Test
</label>
<label>
Joshine
</label>
</tab>
</tab>
<section
id=
"
test
_banner"
translate=
"label"
sortOrder=
"1"
showInDefault=
"1"
showInWebsite=
"0"
showInStore=
"0"
>
<section
id=
"
joshine
_banner"
translate=
"label"
sortOrder=
"1"
showInDefault=
"1"
showInWebsite=
"0"
showInStore=
"0"
>
<class>
separator-top
</class>
<class>
separator-top
</class>
<label>
Banner
</label>
<label>
Banner
</label>
<tab>
test
</tab>
<tab>
joshine
</tab>
<resource>
Test
_Banner::configuration
</resource>
<resource>
Joshine
_Banner::configuration
</resource>
<group
id=
"options"
translate=
"label"
type=
"text"
sortOrder=
"2"
showInDefault=
"1"
showInWebsite=
"1"
showInStore=
"1"
>
<group
id=
"options"
translate=
"label"
type=
"text"
sortOrder=
"2"
showInDefault=
"1"
showInWebsite=
"1"
showInStore=
"1"
>
<label>
Options
</label>
<label>
Options
</label>
<field
id=
"autoplay"
translate=
"label"
type=
"select"
sortOrder=
"1"
showInDefault=
"1"
showInWebsite=
"1"
showInStore=
"1"
>
<field
id=
"autoplay"
translate=
"label"
type=
"select"
sortOrder=
"1"
showInDefault=
"1"
showInWebsite=
"1"
showInStore=
"1"
>
...
...
app/code/
Test
/Banner/etc/config.xml
→
app/code/
Joshine
/Banner/etc/config.xml
View file @
563a44a0
<?xml version="1.0"?>
<?xml version="1.0"?>
<config
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:module:Magento_Store:etc/config.xsd"
>
<config
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:module:Magento_Store:etc/config.xsd"
>
<default>
<default>
<
test
_banner>
<
joshine
_banner>
<options>
<options>
<autoplay>
1
</autoplay>
<autoplay>
1
</autoplay>
<loop>
1
</loop>
<loop>
1
</loop>
</options>
</options>
</
test
_banner>
</
joshine
_banner>
</default>
</default>
</config>
</config>
\ No newline at end of file
app/code/
Test
/Banner/etc/db_schema.xml
→
app/code/
Joshine
/Banner/etc/db_schema.xml
View file @
563a44a0
<?xml version="1.0" ?>
<?xml version="1.0" ?>
<schema
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd"
>
<schema
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd"
>
<table
name=
"
test
_banner_bass"
>
<table
name=
"
joshine
_banner_bass"
>
<column
xsi:type=
"int"
name=
"id"
padding=
"10"
unsigned=
"true"
nullable=
"false"
comment=
"ID"
identity=
"true"
/>
<column
xsi:type=
"int"
name=
"id"
padding=
"10"
unsigned=
"true"
nullable=
"false"
comment=
"ID"
identity=
"true"
/>
<column
xsi:type=
"varchar"
name=
"title"
default=
""
nullable=
"false"
length=
"255"
comment=
"TITLE"
/>
<column
xsi:type=
"varchar"
name=
"title"
default=
""
nullable=
"false"
length=
"255"
comment=
"TITLE"
/>
<column
xsi:type=
"smallint"
name=
"status"
default=
"1"
nullable=
"false"
padding=
"2"
comment=
"STATUS 1=ENABLE 0=DISABLE"
/>
<column
xsi:type=
"smallint"
name=
"status"
default=
"1"
nullable=
"false"
padding=
"2"
comment=
"STATUS 1=ENABLE 0=DISABLE"
/>
...
...
app/code/
Test
/Banner/etc/di.xml
→
app/code/
Joshine
/Banner/etc/di.xml
View file @
563a44a0
...
@@ -4,15 +4,15 @@
...
@@ -4,15 +4,15 @@
<type
name=
"Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory"
>
<type
name=
"Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory"
>
<arguments>
<arguments>
<argument
name=
"collections"
xsi:type=
"array"
>
<argument
name=
"collections"
xsi:type=
"array"
>
<item
name=
"
test_banner_index_listing_data_source"
xsi:type=
"string"
>
Test
\Banner\Model\ResourceModel\Bass\Grid\Collection
</item>
<item
name=
"
joshine_banner_index_listing_data_source"
xsi:type=
"string"
>
Joshine
\Banner\Model\ResourceModel\Bass\Grid\Collection
</item>
</argument>
</argument>
</arguments>
</arguments>
</type>
</type>
<virtualType
name=
"
Test
\Banner\Model\ResourceModel\Bass\Grid\Collection"
type=
"Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult"
>
<virtualType
name=
"
Joshine
\Banner\Model\ResourceModel\Bass\Grid\Collection"
type=
"Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult"
>
<arguments>
<arguments>
<argument
name=
"mainTable"
xsi:type=
"string"
>
test
_banner_bass
</argument>
<argument
name=
"mainTable"
xsi:type=
"string"
>
joshine
_banner_bass
</argument>
<argument
name=
"resourceModel"
xsi:type=
"string"
>
Test
\Banner\Model\ResourceModel\Bass
</argument>
<argument
name=
"resourceModel"
xsi:type=
"string"
>
Joshine
\Banner\Model\ResourceModel\Bass
</argument>
</arguments>
</arguments>
</virtualType>
</virtualType>
...
...
app/code/
Test
/Banner/etc/frontend/routes.xml
→
app/code/
Joshine
/Banner/etc/frontend/routes.xml
View file @
563a44a0
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<config
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:App/etc/routes.xsd"
>
<config
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:App/etc/routes.xsd"
>
<router
id=
"standard"
>
<router
id=
"standard"
>
<route
frontName=
"banner"
id=
"banner"
>
<route
frontName=
"banner"
id=
"banner"
>
<module
name=
"
Test
_Banner"
/>
<module
name=
"
Joshine
_Banner"
/>
</route>
</route>
</router>
</router>
</config>
</config>
\ No newline at end of file
app/code/
Test
/Banner/etc/module.xml
→
app/code/
Joshine
/Banner/etc/module.xml
View file @
563a44a0
<?xml version="1.0" ?>
<?xml version="1.0" ?>
<config
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:Module/etc/module.xsd"
>
<config
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:Module/etc/module.xsd"
>
<module
name=
"
Test
_Banner"
setup_version=
"1.0.0"
/>
<module
name=
"
Joshine
_Banner"
setup_version=
"1.0.0"
/>
</config>
</config>
\ No newline at end of file
app/code/
Test
/Banner/registration.php
→
app/code/
Joshine
/Banner/registration.php
View file @
563a44a0
<?php
<?php
\Magento\Framework\Component\ComponentRegistrar
::
register
(
\Magento\Framework\Component\ComponentRegistrar
::
register
(
\Magento\Framework\Component\ComponentRegistrar
::
MODULE
,
\Magento\Framework\Component\ComponentRegistrar
::
MODULE
,
'
Test
_Banner'
,
'
Joshine
_Banner'
,
__DIR__
__DIR__
);
);
\ No newline at end of file
app/code/
Test/Banner/view/adminhtml/layout/test
_banner_index_edit.xml
→
app/code/
Joshine/Banner/view/adminhtml/layout/joshine
_banner_index_edit.xml
View file @
563a44a0
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<page
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
layout=
"admin-1column"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:View/Layout/etc/page_configuration.xsd"
>
<page
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
layout=
"admin-1column"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:View/Layout/etc/page_configuration.xsd"
>
<body>
<body>
<referenceContainer
name=
"content"
>
<referenceContainer
name=
"content"
>
<uiComponent
name=
"
test
_banner_index_form"
/>
<uiComponent
name=
"
joshine
_banner_index_form"
/>
</referenceContainer>
</referenceContainer>
</body>
</body>
</page>
</page>
\ No newline at end of file
app/code/
Test/Banner/view/adminhtml/layout/test
_banner_index_index.xml
→
app/code/
Joshine/Banner/view/adminhtml/layout/joshine
_banner_index_index.xml
View file @
563a44a0
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<page
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:View/Layout/etc/page_configuration.xsd"
>
<page
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:View/Layout/etc/page_configuration.xsd"
>
<body>
<body>
<referenceContainer
name=
"content"
>
<referenceContainer
name=
"content"
>
<uiComponent
name=
"
test
_banner_index_listing"
/>
<uiComponent
name=
"
joshine
_banner_index_listing"
/>
</referenceContainer>
</referenceContainer>
</body>
</body>
</page>
</page>
\ No newline at end of file
app/code/
Test/Banner/view/adminhtml/ui_component/test
_banner_index_form.xml
→
app/code/
Joshine/Banner/view/adminhtml/ui_component/joshine
_banner_index_form.xml
View file @
563a44a0
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<argument
name=
"data"
xsi:type=
"array"
>
<argument
name=
"data"
xsi:type=
"array"
>
<item
name=
"js_config"
xsi:type=
"array"
>
<item
name=
"js_config"
xsi:type=
"array"
>
<item
name=
"provider"
xsi:type=
"string"
>
test_banner_index_form.test
_banner_index_form_data_source
</item>
<item
name=
"provider"
xsi:type=
"string"
>
joshine_banner_index_form.joshine
_banner_index_form_data_source
</item>
</item>
</item>
<item
name=
"label"
xsi:type=
"string"
translate=
"true"
>
Banner
</item>
<item
name=
"label"
xsi:type=
"string"
translate=
"true"
>
Banner
</item>
...
@@ -15,22 +15,22 @@
...
@@ -15,22 +15,22 @@
<settings>
<settings>
<buttons>
<buttons>
<button
name=
"save"
class=
"
Test
\Banner\Block\Adminhtml\Edit\SaveButton"
></button>
<button
name=
"save"
class=
"
Joshine
\Banner\Block\Adminhtml\Edit\SaveButton"
></button>
<button
name=
"delete"
class=
"
Test
\Banner\Block\Adminhtml\Edit\DeleteButton"
></button>
<button
name=
"delete"
class=
"
Joshine
\Banner\Block\Adminhtml\Edit\DeleteButton"
></button>
<button
name=
"back"
class=
"
Test
\Banner\Block\Adminhtml\Edit\BackButton"
></button>
<button
name=
"back"
class=
"
Joshine
\Banner\Block\Adminhtml\Edit\BackButton"
></button>
</buttons>
</buttons>
<namespace>
test
_banner_index_form
</namespace>
<namespace>
joshine
_banner_index_form
</namespace>
<dataScope>
data
</dataScope>
<dataScope>
data
</dataScope>
<deps>
<deps>
<dep>
test_banner_index_form.test
_banner_index_form_data_source
</dep>
<dep>
joshine_banner_index_form.joshine
_banner_index_form_data_source
</dep>
</deps>
</deps>
</settings>
</settings>
<dataSource
name=
"
test
_banner_index_from_data_source"
>
<dataSource
name=
"
joshine
_banner_index_from_data_source"
>
<argument
name=
"data"
xsi:type=
"array"
>
<argument
name=
"data"
xsi:type=
"array"
>
<item
name=
"js_config"
xsi:type=
"array"
>
<item
name=
"js_config"
xsi:type=
"array"
>
...
@@ -39,10 +39,10 @@
...
@@ -39,10 +39,10 @@
</argument>
</argument>
<settings>
<settings>
<submitUrl
path=
"
test
_banner/index/save"
/>
<submitUrl
path=
"
joshine
_banner/index/save"
/>
</settings>
</settings>
<dataProvider
class=
"
Test\Banner\UiForm\Model\DataProvider"
name=
"test
_banner_index_form_data_source"
>
<dataProvider
class=
"
Joshine\Banner\UiForm\Model\DataProvider"
name=
"joshine
_banner_index_form_data_source"
>
<settings>
<settings>
<requestFieldName>
id
</requestFieldName>
<requestFieldName>
id
</requestFieldName>
<primaryFieldName>
id
</primaryFieldName>
<primaryFieldName>
id
</primaryFieldName>
...
@@ -143,7 +143,7 @@
...
@@ -143,7 +143,7 @@
<settings>
<settings>
<required>
false
</required>
<required>
false
</required>
<uploaderConfig>
<uploaderConfig>
<param
xsi:type=
"url"
name=
"url"
path=
"
test
_banner/index_fileUploader/save"
/>
<param
xsi:type=
"url"
name=
"url"
path=
"
joshine
_banner/index_fileUploader/save"
/>
</uploaderConfig>
</uploaderConfig>
<allowedExtensions>
jpg jpeg gif png
</allowedExtensions>
<allowedExtensions>
jpg jpeg gif png
</allowedExtensions>
<maxFileSize>
4194304
</maxFileSize>
<maxFileSize>
4194304
</maxFileSize>
...
@@ -166,7 +166,7 @@
...
@@ -166,7 +166,7 @@
<settings>
<settings>
<required>
false
</required>
<required>
false
</required>
<uploaderConfig>
<uploaderConfig>
<param
xsi:type=
"url"
name=
"url"
path=
"
test
_banner/index_fileUploader/save"
/>
<param
xsi:type=
"url"
name=
"url"
path=
"
joshine
_banner/index_fileUploader/save"
/>
</uploaderConfig>
</uploaderConfig>
<allowedExtensions>
jpg jpeg gif png
</allowedExtensions>
<allowedExtensions>
jpg jpeg gif png
</allowedExtensions>
<maxFileSize>
4194304
</maxFileSize>
<maxFileSize>
4194304
</maxFileSize>
...
...
app/code/
Test/Banner/view/adminhtml/ui_component/test
_banner_index_listing.xml
→
app/code/
Joshine/Banner/view/adminhtml/ui_component/joshine
_banner_index_listing.xml
View file @
563a44a0
...
@@ -7,12 +7,12 @@
...
@@ -7,12 +7,12 @@
包含该项添加和声明了组件
包含该项添加和声明了组件
-->
-->
<item
name=
"js_config"
xsi:type=
"array"
>
<item
name=
"js_config"
xsi:type=
"array"
>
<item
name=
"provider"
xsi:type=
"string"
>
test_banner_index_listing.test
_banner_index_listing_data_source
</item>
<item
name=
"provider"
xsi:type=
"string"
>
joshine_banner_index_listing.joshine
_banner_index_listing_data_source
</item>
<item
name=
"deps"
xsi:type=
"string"
>
test_banner_index_listing.test
_banner_index_listing_data_source
</item>
<item
name=
"deps"
xsi:type=
"string"
>
joshine_banner_index_listing.joshine
_banner_index_listing_data_source
</item>
</item>
</item>
<!--组件的名称 [ComponentName].[ComponentName]_data_source -->
<!--组件的名称 [ComponentName].[ComponentName]_data_source -->
<item
name=
"spinner"
xsi:type=
"string"
>
test
_banner_items_columns
</item>
<item
name=
"spinner"
xsi:type=
"string"
>
joshine
_banner_items_columns
</item>
<item
name=
"buttons"
xsi:type=
"array"
>
<item
name=
"buttons"
xsi:type=
"array"
>
<item
name=
"add"
xsi:type=
"array"
>
<item
name=
"add"
xsi:type=
"array"
>
...
@@ -26,13 +26,13 @@
...
@@ -26,13 +26,13 @@
</argument>
</argument>
<!--数据源 component属性注册的magento组件名称-->
<!--数据源 component属性注册的magento组件名称-->
<dataSource
name=
"
test
_banner_index_listing_data_source"
component=
"Magento_Ui/js/grid/provider"
>
<dataSource
name=
"
joshine
_banner_index_listing_data_source"
component=
"Magento_Ui/js/grid/provider"
>
<!--声明新的结构-->
<!--声明新的结构-->
<settings>
<settings>
<updateUrl
path=
"mui/index/render"
/>
<updateUrl
path=
"mui/index/render"
/>
</settings>
</settings>
<!--<aclResource>
Test
::Banner<aclResource/> 数据提供者 名称-->
<!--<aclResource>
Joshine
::Banner<aclResource/> 数据提供者 名称-->
<dataProvider
class=
"Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider"
name=
"
test
_banner_index_listing_data_source"
>
<dataProvider
class=
"Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider"
name=
"
joshine
_banner_index_listing_data_source"
>
<settings>
<settings>
<!--请求字段名一般为主键-->
<!--请求字段名一般为主键-->
<requestFieldName>
id
</requestFieldName>
<requestFieldName>
id
</requestFieldName>
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
</container>
</container>
<!-- 显示字段 columns name一定要改不然会出现load图片和遮罩层一直存在的bug -->
<!-- 显示字段 columns name一定要改不然会出现load图片和遮罩层一直存在的bug -->
<columns
name=
"
test
_banner_items_columns"
>
<columns
name=
"
joshine
_banner_items_columns"
>
<column
name=
"id"
>
<column
name=
"id"
>
<argument
name=
"data"
xsi:type=
"array"
>
<argument
name=
"data"
xsi:type=
"array"
>
...
@@ -126,7 +126,7 @@
...
@@ -126,7 +126,7 @@
</argument>
</argument>
</column>
</column>
<column
name=
"status"
class=
"
Test
\Banner\Ui\Component\Listing\Column\Status"
>
<column
name=
"status"
class=
"
Joshine
\Banner\Ui\Component\Listing\Column\Status"
>
<argument
name=
"data"
xsi:type=
"array"
>
<argument
name=
"data"
xsi:type=
"array"
>
<item
name=
"config"
xsi:type=
"array"
>
<item
name=
"config"
xsi:type=
"array"
>
<item
name=
"filter"
xsi:type=
"string"
>
text
</item>
<item
name=
"filter"
xsi:type=
"string"
>
text
</item>
...
@@ -135,7 +135,7 @@
...
@@ -135,7 +135,7 @@
</argument>
</argument>
</column>
</column>
<column
name=
"img_patch"
class=
"
Test
\Banner\Ui\Component\Listing\Column\ImgPatch"
>
<column
name=
"img_patch"
class=
"
Joshine
\Banner\Ui\Component\Listing\Column\ImgPatch"
>
<argument
name=
"data"
xsi:type=
"array"
>
<argument
name=
"data"
xsi:type=
"array"
>
<item
name=
"config"
xsi:type=
"array"
>
<item
name=
"config"
xsi:type=
"array"
>
<item
name=
"component"
xsi:type=
"string"
>
Magento_Ui/js/grid/columns/thumbnail
</item>
<item
name=
"component"
xsi:type=
"string"
>
Magento_Ui/js/grid/columns/thumbnail
</item>
...
@@ -145,7 +145,7 @@
...
@@ -145,7 +145,7 @@
</argument>
</argument>
</column>
</column>
<column
name=
"phone_img_patch"
class=
"
Test
\Banner\Ui\Component\Listing\Column\PhoneImagePatch"
>
<column
name=
"phone_img_patch"
class=
"
Joshine
\Banner\Ui\Component\Listing\Column\PhoneImagePatch"
>
<argument
name=
"data"
xsi:type=
"array"
>
<argument
name=
"data"
xsi:type=
"array"
>
<item
name=
"config"
xsi:type=
"array"
>
<item
name=
"config"
xsi:type=
"array"
>
<item
name=
"component"
xsi:type=
"string"
>
Magento_Ui/js/grid/columns/thumbnail
</item>
<item
name=
"component"
xsi:type=
"string"
>
Magento_Ui/js/grid/columns/thumbnail
</item>
...
@@ -156,7 +156,7 @@
...
@@ -156,7 +156,7 @@
</column>
</column>
<actionsColumn
name=
"actions"
class=
"
Test
\Banner\Ui\Component\Listing\Column\PostActions"
>
<actionsColumn
name=
"actions"
class=
"
Joshine
\Banner\Ui\Component\Listing\Column\PostActions"
>
<argument
name=
"data"
xsi:type=
"array"
>
<argument
name=
"data"
xsi:type=
"array"
>
<item
name=
"config"
xsi:type=
"array"
>
<item
name=
"config"
xsi:type=
"array"
>
<item
name=
"resizeEnabled"
xsi:type=
"boolean"
>
false
</item>
<item
name=
"resizeEnabled"
xsi:type=
"boolean"
>
false
</item>
...
...
app/code/
Test
/Banner/view/frontend/layout/banner_index_index.xml
→
app/code/
Joshine
/Banner/view/frontend/layout/banner_index_index.xml
View file @
563a44a0
<?xml version="1.0" ?>
<?xml version="1.0" ?>
<page
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
layout=
"1column"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:View/Layout/etc/page_configuration.xsd"
>
<page
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
layout=
"1column"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:View/Layout/etc/page_configuration.xsd"
>
<referenceContainer
name=
"content"
>
<referenceContainer
name=
"content"
>
<block
class=
"
Test\Banner\Block\Index"
name=
"banner_index_index"
template=
"Test
_Banner::index.phtml"
/>
<block
class=
"
Joshine\Banner\Block\Index"
name=
"banner_index_index"
template=
"Joshine
_Banner::index.phtml"
/>
</referenceContainer>
</referenceContainer>
</page>
</page>
\ No newline at end of file
app/code/
Test
/Banner/view/frontend/requirejs-config.js
→
app/code/
Joshine
/Banner/view/frontend/requirejs-config.js
View file @
563a44a0
var
config
=
{
var
config
=
{
paths
:
{
paths
:
{
'banner'
:
'
Test
_Banner/js/banner'
,
'banner'
:
'
Joshine
_Banner/js/banner'
,
'owlcarousel'
:
"
Test
_Banner/js/owl.carousel"
'owlcarousel'
:
"
Joshine
_Banner/js/owl.carousel"
},
},
shim
:
{
shim
:
{
'banner'
:
[
'jquery'
],
'banner'
:
[
'jquery'
],
...
...
app/code/
Test
/Banner/view/frontend/templates/index.phtml
→
app/code/
Joshine
/Banner/view/frontend/templates/index.phtml
View file @
563a44a0
<?php
<?php
/** @var $block \
Test
\Banner\Block\Index */
/** @var $block \
Joshine
\Banner\Block\Index */
$collection
=
$block
->
getCollection
();
$collection
=
$block
->
getCollection
();
?>
?>
<div
class=
"banner1"
style=
"background-color: #f0f0f0;"
></div>
<div
class=
"banner1"
style=
"background-color: #f0f0f0;
height: 10px;
"
></div>
<?php
foreach
(
$collection
->
getItems
()
as
$item
)
:?>
<?php
foreach
(
$collection
->
getItems
()
as
$item
)
:?>
<?
php
echo
$item
->
getData
(
'name'
);
?>
<?
php
echo
$item
->
getData
(
'name'
);
?>
<?php
endforeach
;
?>
<?php
endforeach
;
?>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
<?php
echo
$block
->
getViewFileUrl
(
'
Test
_Banner::css/banner.css'
);
?>
"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
<?php
echo
$block
->
getViewFileUrl
(
'
Joshine
_Banner::css/banner.css'
);
?>
"
>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
require
([
'jquery'
,
'banner'
],
function
(
$
){
require
([
'jquery'
,
'banner'
],
function
(
$
){
var
img_arr
=
var
img_arr
=
...
@@ -39,6 +39,7 @@ require(['jquery','banner'],function ($){
...
@@ -39,6 +39,7 @@ require(['jquery','banner'],function ($){
index
:
0
index
:
0
});
});
window
.
onload
=
function
(){
var
h_max
=
0
;
var
h_max
=
0
;
$
(
'.top_banner'
).
each
(
function
(
i
,
v
){
$
(
'.top_banner'
).
each
(
function
(
i
,
v
){
...
@@ -46,13 +47,12 @@ require(['jquery','banner'],function ($){
...
@@ -46,13 +47,12 @@ require(['jquery','banner'],function ($){
h_max
=
h
>
h_max
?
h
:
h_max
;
h_max
=
h
>
h_max
?
h
:
h_max
;
});
});
$
(
'.banner1'
).
height
(
h_max
);
$
(
'.banner1'
).
height
(
h_max
);
$
(
'.banner1'
).
css
(
'line-height'
,
h_max
+
'px'
);
$
(
'.banner1'
).
css
(
'line-height'
,
h_max
+
'px'
);
var
buttonTop
=
h_max
/
2
;
var
buttonTop
=
h_max
/
2
;
$
(
'#left'
).
css
({
'top'
:
buttonTop
,
'line-height'
:
0
});
$
(
'#left'
).
css
({
'top'
:
buttonTop
,
'line-height'
:
0
});
$
(
'#right'
).
css
({
'top'
:
buttonTop
,
'line-height'
:
0
});
$
(
'#right'
).
css
({
'top'
:
buttonTop
,
'line-height'
:
0
});
console
.
log
(
h_max
);
}
});
});
</script>
</script>
\ No newline at end of file
app/code/
Test
/Banner/view/frontend/web/css/banner.css
→
app/code/
Joshine
/Banner/view/frontend/web/css/banner.css
View file @
563a44a0
.banner1
,
.banner1
>
.imgbox
,
.banner1
>
.imgbox
>
a
,
.banner1
>
.imgbox
>
a
>
img
{
height
:
634px
;
}
.top_banner
{
.top_banner
{
width
:
100%
;
width
:
100%
;
}
}
input
#left
,
input
#right
{
input
#left
,
input
#right
{
top
:
300px
;
padding-top
:
2px
;
padding-top
:
2px
;
}
}
@media
(
max-width
:
768px
)
{
@media
(
max-width
:
768px
)
{
.banner1
,
.banner1
>
.imgbox
,
.banner1
>
.imgbox
>
a
,
.banner1
>
.imgbox
>
a
>
img
,
.top_banner
{
height
:
577px
;
}
input
#left
,
input
#right
{
input
#left
,
input
#right
{
top
:
280px
;
padding
:
1px
;
padding
:
1px
;
}
}
}
}
...
...
app/code/
Test
/Banner/view/frontend/web/css/banner1.css
→
app/code/
Joshine
/Banner/view/frontend/web/css/banner1.css
View file @
563a44a0
File moved
app/code/
Test
/Banner/view/frontend/web/js/banner.js
→
app/code/
Joshine
/Banner/view/frontend/web/js/banner.js
View file @
563a44a0
...
@@ -40,7 +40,6 @@ define(['jquery'],function ($){
...
@@ -40,7 +40,6 @@ define(['jquery'],function ($){
left
:
0
left
:
0
}).
end
().
children
(
"img"
).
css
({
}).
end
().
children
(
"img"
).
css
({
"width"
:
"100%"
,
"width"
:
"100%"
,
});
});
}
}
this
.
_obj
.
init
();
this
.
_obj
.
init
();
...
...
app/code/
Test/Banner
/Setup/InstallData.php
→
app/code/
Joshine/Table
/Setup/InstallData.php
View file @
563a44a0
<?php
<?php
namespace
Test\Banner
\Setup
;
namespace
Joshine\Table
\Setup
;
use
Magento\Framework\Setup\InstallDataInterface
;
use
Magento\Framework\Setup\InstallDataInterface
;
use
Magento\Framework\Setup\ModuleContextInterface
;
use
Magento\Framework\Setup\ModuleContextInterface
;
use
Magento\Framework\Setup\ModuleDataSetupInterface
;
use
Magento\Framework\Setup\ModuleDataSetupInterface
;
...
@@ -11,8 +11,6 @@ class InstallData implements InstallDataInterface
...
@@ -11,8 +11,6 @@ class InstallData implements InstallDataInterface
$adapter
=
$setup
->
getConnection
();
$adapter
=
$setup
->
getConnection
();
$setup
->
startSetup
();
$setup
->
startSetup
();
$adapter
->
insertMultiple
(
'test_banner_bass'
,[
'name'
=>
'test3'
]);
$adapter
->
insertMultiple
(
'test_banner_bass'
,[[
'name'
=>
'test4'
],[
'name'
=>
'test5'
]]);
$setup
->
endSetup
();
$setup
->
endSetup
();
}
}
...
...
app/code/
Test/Banner
/Setup/InstallSchema.php
→
app/code/
Joshine/Table
/Setup/InstallSchema.php
View file @
563a44a0
<?php
<?php
namespace
Test\Banner
\Setup
;
namespace
Joshine\Table
\Setup
;
use
Magento\Framework\DB\Ddl\Table
;
use
Magento\Framework\DB\Ddl\Table
;
use
Magento\Framework\Setup\InstallSchemaInterface
;
use
Magento\Framework\Setup\InstallSchemaInterface
;
...
@@ -10,8 +10,8 @@ class InstallSchema implements InstallSchemaInterface{
...
@@ -10,8 +10,8 @@ class InstallSchema implements InstallSchemaInterface{
public
function
install
(
SchemaSetupInterface
$setup
,
ModuleContextInterface
$context
){
public
function
install
(
SchemaSetupInterface
$setup
,
ModuleContextInterface
$context
){
$installer
=
$setup
;
$installer
=
$setup
;
$installer
->
startSetup
();
$installer
->
startSetup
();
if
(
!
$installer
->
tableExists
(
'
test_banner
_bass'
))
{
if
(
!
$installer
->
tableExists
(
'
joshine_table
_bass'
))
{
$table
=
$installer
->
getConnection
()
->
newTable
(
$installer
->
getTable
(
'
test_banner
_bass'
))
$table
=
$installer
->
getConnection
()
->
newTable
(
$installer
->
getTable
(
'
joshine_table
_bass'
))
->
addColumn
(
->
addColumn
(
'id'
,
'id'
,
Table
::
TYPE_INTEGER
,
Table
::
TYPE_INTEGER
,
...
...
app/code/
Test/Banner
/Setup/UpgradeSchema.php
→
app/code/
Joshine/Table
/Setup/UpgradeSchema.php
View file @
563a44a0
<?php
<?php
namespace
Test\Banner
\Setup
;
namespace
Joshine\Table
\Setup
;
use
Magento\Framework\App\ObjectManager
;
use
Magento\Framework\App\ObjectManager
;
use
Magento\Framework\DB\Ddl\Table
;
use
Magento\Framework\DB\Ddl\Table
;
...
@@ -15,12 +15,12 @@ class UpgradeSchema implements UpgradeSchemaInterface
...
@@ -15,12 +15,12 @@ class UpgradeSchema implements UpgradeSchemaInterface
{
{
$setup
->
startSetup
();
$setup
->
startSetup
();
if
(
version_compare
(
$context
->
getVersion
(),
'1.0.1'
,
'<'
)
&&
$setup
->
tableExists
(
'
test_banner
_bass'
)){
if
(
version_compare
(
$context
->
getVersion
(),
'1.0.1'
,
'<'
)
&&
$setup
->
tableExists
(
'
joshine_table
_bass'
)){
$this
->
getLogger
()
->
info
(
111
);
$this
->
getLogger
()
->
info
(
111
);
$connection
=
$setup
->
getConnection
();
$connection
=
$setup
->
getConnection
();
$connection
->
addColumn
(
$connection
->
addColumn
(
$setup
->
getTable
(
'
test_banner
_bass'
),
$setup
->
getTable
(
'
joshine_table
_bass'
),
'status'
,
'status'
,
[
[
'type'
=>
Table
::
TYPE_SMALLINT
,
'type'
=>
Table
::
TYPE_SMALLINT
,
...
@@ -32,7 +32,7 @@ class UpgradeSchema implements UpgradeSchemaInterface
...
@@ -32,7 +32,7 @@ class UpgradeSchema implements UpgradeSchemaInterface
);
);
$connection
->
addColumn
(
$connection
->
addColumn
(
$setup
->
getTable
(
'
test_banner
_bass'
),
$setup
->
getTable
(
'
joshine_table
_bass'
),
'created_at'
,
'created_at'
,
[
[
'type'
=>
Table
::
TYPE_TIMESTAMP
,
'type'
=>
Table
::
TYPE_TIMESTAMP
,
...
@@ -44,7 +44,7 @@ class UpgradeSchema implements UpgradeSchemaInterface
...
@@ -44,7 +44,7 @@ class UpgradeSchema implements UpgradeSchemaInterface
);
);
$connection
->
addColumn
(
$connection
->
addColumn
(
$setup
->
getTable
(
'
test_banner
_bass'
),
$setup
->
getTable
(
'
joshine_table
_bass'
),
'updated_at'
,
'updated_at'
,
[
[
'type'
=>
Table
::
TYPE_TIMESTAMP
,
'type'
=>
Table
::
TYPE_TIMESTAMP
,
...
...
app/code/Joshine/Table/etc/module.xml
0 → 100644
View file @
563a44a0
<?xml version="1.0" ?>
<config
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:Module/etc/module.xsd"
>
<module
name=
"Joshine_Table"
setup_version=
"1.0.2"
/>
</config>
\ No newline at end of file
app/code/Joshine/Table/registration.php
0 → 100644
View file @
563a44a0
<?php
\Magento\Framework\Component\ComponentRegistrar
::
register
(
\Magento\Framework\Component\ComponentRegistrar
::
MODULE
,
'Joshine_Table'
,
__DIR__
);
\ No newline at end of file
app/code/Sparsh/FreeShippingBar/Block/Adminhtml/Entity/Edit/Tab/WhatToDisplay.php
View file @
563a44a0
...
@@ -87,12 +87,13 @@ class WhatToDisplay extends \Magento\Backend\Block\Widget\Form\Generic
...
@@ -87,12 +87,13 @@ class WhatToDisplay extends \Magento\Backend\Block\Widget\Form\Generic
]
]
);
);
$fieldset
->
addField
(
$fieldset
->
addField
(
'background_img'
,
'background_img'
,
'image'
,
'image'
,
[
[
'label'
=>
__
(
'Background
i
mage'
),
'label'
=>
__
(
'Background
I
mage'
),
'title'
=>
__
(
'Background
i
mage'
),
'title'
=>
__
(
'Background
I
mage'
),
'name'
=>
'background_img'
,
'name'
=>
'background_img'
,
'required'
=>
false
,
'required'
=>
false
,
'disabled'
=>
$isElementDisabled
,
'disabled'
=>
$isElementDisabled
,
...
@@ -101,6 +102,19 @@ class WhatToDisplay extends \Magento\Backend\Block\Widget\Form\Generic
...
@@ -101,6 +102,19 @@ class WhatToDisplay extends \Magento\Backend\Block\Widget\Form\Generic
);
);
$fieldset
->
addField
(
$fieldset
->
addField
(
'background_img_phone'
,
'image'
,
[
'label'
=>
__
(
'Background Image Phone'
),
'title'
=>
__
(
'Background Image Phone'
),
'name'
=>
'background_img_phone'
,
'required'
=>
false
,
'disabled'
=>
$isElementDisabled
,
'none'
=>
__
(
'Pictures displayed in the current position'
)
]
);
$fieldset
->
addField
(
'is_clickable'
,
'is_clickable'
,
'select'
,
'select'
,
[
[
...
...
app/code/Sparsh/FreeShippingBar/Controller/Adminhtml/Entity/Save.php
View file @
563a44a0
...
@@ -60,7 +60,7 @@ class Save extends \Sparsh\FreeShippingBar\Controller\Adminhtml\Entity implement
...
@@ -60,7 +60,7 @@ class Save extends \Sparsh\FreeShippingBar\Controller\Adminhtml\Entity implement
$data
=
$this
->
getRequest
()
->
getPostValue
();
$data
=
$this
->
getRequest
()
->
getPostValue
();
if
(
$data
)
{
if
(
$data
)
{
//
try {
try
{
if
(
empty
(
$data
[
'entity_id'
]))
{
if
(
empty
(
$data
[
'entity_id'
]))
{
unset
(
$data
[
'entity_id'
]);
unset
(
$data
[
'entity_id'
]);
}
}
...
@@ -76,22 +76,39 @@ class Save extends \Sparsh\FreeShippingBar\Controller\Adminhtml\Entity implement
...
@@ -76,22 +76,39 @@ class Save extends \Sparsh\FreeShippingBar\Controller\Adminhtml\Entity implement
$data
[
'to_date'
]
=
null
;
$data
[
'to_date'
]
=
null
;
}
}
//pc img delete
if
(
isset
(
$data
[
'background_img'
][
'delete'
])
&&
$data
[
'background_img'
][
'delete'
]
==
1
){
if
(
isset
(
$data
[
'background_img'
][
'delete'
])
&&
$data
[
'background_img'
][
'delete'
]
==
1
){
$this
->
deleteImg
(
$data
[
'background_img'
][
'value'
]);
$this
->
deleteImg
(
$data
[
'background_img'
][
'value'
]);
$data
[
'background_img'
]
=
''
;
$data
[
'background_img'
]
=
''
;
}
}
//phone img deletc
if
(
isset
(
$data
[
'background_img_phone'
][
'delete'
])
&&
$data
[
'background_img_phone'
][
'delete'
]
==
1
){
$this
->
deleteImg
(
$data
[
'background_img_phone'
][
'value'
]);
$data
[
'background_img_phone'
]
=
''
;
}
//pc img upload
if
(
$_FILES
[
'background_img'
][
'name'
]){
if
(
$_FILES
[
'background_img'
][
'name'
]){
$this
->
saveImg
(
'background_img'
);
$this
->
saveImg
(
'background_img'
);
$data
[
'background_img'
]
=
'/'
.
self
::
FILE_DIR
.
'/'
.
$_FILES
[
'background_img'
][
'name'
];
$data
[
'background_img'
]
=
'/'
.
self
::
FILE_DIR
.
'/'
.
$_FILES
[
'background_img'
][
'name'
];
}
}
//phone img upload
if
(
$_FILES
[
'background_img_phone'
][
'name'
]){
$this
->
saveImg
(
'background_img_phone'
);
$data
[
'background_img_phone'
]
=
'/'
.
self
::
FILE_DIR
.
'/'
.
$_FILES
[
'background_img_phone'
][
'name'
];
}
//not request img info
if
(
is_array
(
$data
[
'background_img'
])){
if
(
is_array
(
$data
[
'background_img'
])){
//no delete and no upload new img
//no delete and no upload new img
unset
(
$data
[
'background_img'
]);
unset
(
$data
[
'background_img'
]);
}
}
if
(
is_array
(
$data
[
'background_img_phone'
])){
//no delete and no upload new img
unset
(
$data
[
'background_img_phone'
]);
}
$model
->
setData
(
$data
);
$model
->
setData
(
$data
);
$model
->
save
();
$model
->
save
();
...
@@ -107,13 +124,13 @@ class Save extends \Sparsh\FreeShippingBar\Controller\Adminhtml\Entity implement
...
@@ -107,13 +124,13 @@ class Save extends \Sparsh\FreeShippingBar\Controller\Adminhtml\Entity implement
}
}
$this
->
_redirect
(
'*/*/'
);
$this
->
_redirect
(
'*/*/'
);
return
;
return
;
//
} catch (\Exception $e) {
}
catch
(
\Exception
$e
)
{
//
$this->messageManager->addErrorMessage(
$this
->
messageManager
->
addErrorMessage
(
//
__('Something went wrong while saving the shipping bar data. Please review the error log.')
__
(
'Something went wrong while saving the shipping bar data. Please review the error log.'
)
//
);
);
//
$this->_redirect('*/*/edit', ['entity_id' => (int)$this->getRequest()->getParam('entity_id')]);
$this
->
_redirect
(
'*/*/edit'
,
[
'entity_id'
=>
(
int
)
$this
->
getRequest
()
->
getParam
(
'entity_id'
)]);
//
return;
return
;
//
}
}
$this
->
_redirect
(
'*/*/'
);
$this
->
_redirect
(
'*/*/'
);
return
;
return
;
}
}
...
...
app/code/Sparsh/FreeShippingBar/etc/db_schema.xml
View file @
563a44a0
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
<column
xsi:type=
"tinyint"
name=
"is_active"
padding=
"2"
unsigned=
"false"
nullable=
"false"
identity=
"false"
default=
"1"
comment=
"Is Active"
/>
<column
xsi:type=
"tinyint"
name=
"is_active"
padding=
"2"
unsigned=
"false"
nullable=
"false"
identity=
"false"
default=
"1"
comment=
"Is Active"
/>
<column
xsi:type=
"int"
name=
"sort_order"
padding=
"3"
unsigned=
"true"
nullable=
"false"
identity=
"false"
default=
"1"
comment=
"Sort Order"
/>
<column
xsi:type=
"int"
name=
"sort_order"
padding=
"3"
unsigned=
"true"
nullable=
"false"
identity=
"false"
default=
"1"
comment=
"Sort Order"
/>
<column
xsi:type=
"varchar"
name=
"background_img"
nullable=
"false"
length=
"255"
default=
""
comment=
"Bar Background Image"
/>
<column
xsi:type=
"varchar"
name=
"background_img"
nullable=
"false"
length=
"255"
default=
""
comment=
"Bar Background Image"
/>
<column
xsi:type=
"varchar"
name=
"background_img_phone"
nullable=
"false"
length=
"255"
default=
""
comment=
"Bar Background Phone Image"
/>
<column
xsi:type=
"timestamp"
name=
"created_at"
on_update=
"false"
nullable=
"false"
default=
"CURRENT_TIMESTAMP"
comment=
"Creation Time"
/>
<column
xsi:type=
"timestamp"
name=
"created_at"
on_update=
"false"
nullable=
"false"
default=
"CURRENT_TIMESTAMP"
comment=
"Creation Time"
/>
<column
xsi:type=
"timestamp"
name=
"updated_at"
on_update=
"true"
nullable=
"false"
default=
"CURRENT_TIMESTAMP"
comment=
"Update Time"
/>
<column
xsi:type=
"timestamp"
name=
"updated_at"
on_update=
"true"
nullable=
"false"
default=
"CURRENT_TIMESTAMP"
comment=
"Update Time"
/>
<constraint
xsi:type=
"primary"
referenceId=
"PRIMARY"
>
<constraint
xsi:type=
"primary"
referenceId=
"PRIMARY"
>
...
...
app/code/Sparsh/FreeShippingBar/view/frontend/templates/free_shipping_bar.phtml
View file @
563a44a0
...
@@ -23,8 +23,25 @@ if ($isModuleEnable):
...
@@ -23,8 +23,25 @@ if ($isModuleEnable):
endif
;
endif
;
?>
?>
<?php
if
(
$isFreeShippingBarAvailable
)
:
?>
<?php
if
(
$isFreeShippingBarAvailable
)
:
?>
<style>
.sparsh-free-shipping-bar-goal-message
{
width
:
100%
;
height
:
60px
;
background-image
:
url
(
"
<?=
$block
->
getImgUrl
(
$barData
[
'background_img'
])
?>
");
}
@media (max-width: 768px) {
.sparsh-free-shipping-bar-goal-message{
background-image: url("
<?=
$block
->
getImgUrl
(
$barData
[
'background_img_phone'
])
?>
"
);
width
:
100%
;
height
:
40px
;
}
}
</style>
<div
class=
"sparsh-free-shipping-bar-goal-message"
<div
class=
"sparsh-free-shipping-bar-goal-message"
style=
"
background-image: url(
<?=
$block
->
getImgUrl
(
$barData
[
'background_img'
])
?>
); background-repeat: no-repeat;background-position: center center; height: 60px;
line-height: initial; text-align: center; background-color:
<?=
/* @noEscape */
$barData
[
'bar_background_color'
]
?>
; font-size:
<?=
/* @noEscape */
$barData
[
'bar_font_size'
]
.
'px'
?>
"
>
style=
"
background-size: 100%;
line-height: initial; text-align: center; background-color:
<?=
/* @noEscape */
$barData
[
'bar_background_color'
]
?>
; font-size:
<?=
/* @noEscape */
$barData
[
'bar_font_size'
]
.
'px'
?>
"
>
<a
<?=
/* @noEscape */
$barData
[
'is_clickable'
]
?
'href='
.
$barData
[
'bar_link_url'
]
:
null
?>
<a
<?=
/* @noEscape */
$barData
[
'is_clickable'
]
?
'href='
.
$barData
[
'bar_link_url'
]
:
null
?>
<?=
/* @noEscape */
$barData
[
'is_clickable'
]
?
(
$barData
[
'is_link_open_in_new_page'
]
?
'target=_blank'
:
'target=_self'
)
:
null
?>
<?=
/* @noEscape */
$barData
[
'is_clickable'
]
?
(
$barData
[
'is_link_open_in_new_page'
]
?
'target=_blank'
:
'target=_self'
)
:
null
?>
style=
"color:
<?=
/* @noEscape */
$barData
[
'bar_text_color'
]
?>
"
>
style=
"color:
<?=
/* @noEscape */
$barData
[
'bar_text_color'
]
?>
"
>
...
...
app/design/frontend/Joshine/breeze/Magento_Cms/templates/default/home.phtml
View file @
563a44a0
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*/
*/
?>
?>
<?php
echo
$block
->
getLayout
()
->
createBlock
(
'
Test\Banner\Block\Index'
)
->
setTemplate
(
'Test
_Banner::index.phtml'
)
->
toHtml
();
?>
<?php
echo
$block
->
getLayout
()
->
createBlock
(
'
Joshine\Banner\Block\Index'
)
->
setTemplate
(
'Joshine
_Banner::index.phtml'
)
->
toHtml
();
?>
<?php
echo
$block
->
getLayout
()
->
createBlock
(
'Magento\Cms\Block\Block'
)
->
setBlockId
(
'home_top_category_thumnail'
)
->
toHtml
();
?>
<?php
echo
$block
->
getLayout
()
->
createBlock
(
'Magento\Cms\Block\Block'
)
->
setBlockId
(
'home_top_category_thumnail'
)
->
toHtml
();
?>
<?php
echo
$block
->
getLayout
()
->
createBlock
(
'Magento\Cms\Block\Block'
)
->
setBlockId
(
'home_new_arrivals'
)
->
toHtml
();
?>
<?php
echo
$block
->
getLayout
()
->
createBlock
(
'Magento\Cms\Block\Block'
)
->
setBlockId
(
'home_new_arrivals'
)
->
toHtml
();
?>
<?php
echo
$block
->
getLayout
()
->
createBlock
(
'Magento\Cms\Block\Block'
)
->
setBlockId
(
'flashsaleproduct'
)
->
toHtml
();
?>
<?php
echo
$block
->
getLayout
()
->
createBlock
(
'Magento\Cms\Block\Block'
)
->
setBlockId
(
'flashsaleproduct'
)
->
toHtml
();
?>
...
...
app/design/frontend/Joshine/breeze/web/css/_custom.less
View file @
563a44a0
...
@@ -334,7 +334,7 @@ footer .footer_link{
...
@@ -334,7 +334,7 @@ footer .footer_link{
color: #666666;
color: #666666;
}
}
.
header_bar
{
.
sparsh-free-shipping-bar-goal-message
{
width: 100%;
width: 100%;
padding-top: 0px;
padding-top: 0px;
margin-top: 0px;
margin-top: 0px;
...
@@ -342,7 +342,7 @@ footer .footer_link{
...
@@ -342,7 +342,7 @@ footer .footer_link{
z-index: 11;
z-index: 11;
}
}
.page-wrapper .page-header,
header_bar
{
.page-wrapper .page-header,
sparsh-free-shipping-bar-goal-message
{
background: #f2f2f2;
background: #f2f2f2;
width: 100%;
width: 100%;
padding-top: 0px;
padding-top: 0px;
...
@@ -382,11 +382,11 @@ footer .footer_link{
...
@@ -382,11 +382,11 @@ footer .footer_link{
}
}
@media screen and (max-width:637.98px) {
@media screen and (max-width:637.98px) {
.
header_bar
{
.
sparsh-free-shipping-bar-goal-message
{
position: fixed;
position: fixed;
}
}
.page-wrapper .page-header,
header_bar
{
.page-wrapper .page-header,
sparsh-free-shipping-bar-goal-message
{
position: fixed;
position: fixed;
}
}
}
}
...
@@ -525,10 +525,10 @@ ul {
...
@@ -525,10 +525,10 @@ ul {
@media (max-width: 767px){
@media (max-width: 767px){
.page-main > .columns{
.page-main > .columns{
margin-top: 100px
!important
;
margin-top: 100px;
}
}
.cms-page-view .page-main > .columns{
.cms-page-view .page-main > .columns{
margin-top: 100px
!important
;
margin-top: 100px;
}
}
#product-review-container #customer-reviews .block .block-content {
#product-review-container #customer-reviews .block .block-content {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment