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
90c6d153
Commit
90c6d153
authored
Mar 20, 2023
by
lmf
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into production
parents
81e51bfa
17d0c5f5
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
309 additions
and
201 deletions
+309
-201
app/code/Joshine/Review/Block/Images.php
+124
-124
app/code/Joshine/Sales/Plugin/DefaultRendererPlugin.php
+11
-0
app/code/Joshine/Sales/Plugin/ItemsSortPlugin.php
+15
-0
app/code/Joshine/Sales/etc/di.xml
+4
-0
app/code/Magento/Checkout/Block/Cart/Shipping.php
+16
-3
app/code/Magento/Checkout/Block/Onepage.php
+8
-2
app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml
+0
-1
app/code/Magento/Checkout/view/frontend/templates/cart/methods-new.phtml
+52
-33
app/code/Magento/Checkout/view/frontend/templates/cart/shipping.phtml
+10
-1
app/code/Magento/Checkout/view/frontend/web/js/view/address-get.js
+1
-0
app/code/Magento/Checkout/view/frontend/web/js/view/summary/shipping.js
+11
-3
app/design/frontend/Joshine/breeze/Magento_Checkout/templates/onepage.phtml
+4
-0
app/design/frontend/Joshine/breeze/Magento_Swatches/web/js/swatch-renderer.js
+1
-1
app/design/frontend/Joshine/breeze/web/css/_custom.less
+52
-33
No files found.
app/code/Joshine/Review/Block/Images.php
View file @
90c6d153
<?php
<?php
namespace
Joshine\Review\Block
;
namespace
Joshine\Review\Block
;
use
Joshine\Review\Model\ResourceModel\Images\Collection
;
use
Joshine\Review\Model\ResourceModel\Images\Collection
;
use
Joshine\Review\Helper\ImageHelper
;
use
Joshine\Review\Helper\ImageHelper
;
use
Magento\Framework\View\Element\Template
;
use
Magento\Framework\View\Element\Template
;
use
Joshine\Review\Model\ResourceModel\Images\CollectionFactory
;
use
Joshine\Review\Model\ResourceModel\Images\CollectionFactory
;
/**
/**
* Class Images
* Class Images
* @package Amasty\AdvancedReview\Block
* @package Amasty\AdvancedReview\Block
*/
*/
class
Images
extends
\Magento\Framework\View\Element\Template
class
Images
extends
\Magento\Framework\View\Element\Template
{
{
//评论缩略图宽度
//评论缩略图宽度
const
REVIEW_COVER_WIDTH
=
200
;
const
REVIEW_COVER_WIDTH
=
200
;
/**
/**
* @var string
* @var string
*/
*/
protected
$_template
=
'Joshine_Review::images.phtml'
;
protected
$_template
=
'Joshine_Review::images.phtml'
;
private
$reviewId
;
private
$reviewId
;
private
$productId
;
private
$productId
;
/**
/**
* @var int
* @var int
*/
*/
/**
/**
* @var \Magento\Framework\Json\EncoderInterface
* @var \Magento\Framework\Json\EncoderInterface
*/
*/
private
$jsonEncoder
;
private
$jsonEncoder
;
/**
/**
* @var CollectionFactory
* @var CollectionFactory
*/
*/
private
$collectionFactory
;
private
$collectionFactory
;
/**
/**
* @var ImageHelper
* @var ImageHelper
*/
*/
private
$imageHelper
;
private
$imageHelper
;
public
function
__construct
(
public
function
__construct
(
Template\Context
$context
,
Template\Context
$context
,
CollectionFactory
$collectionFactory
,
CollectionFactory
$collectionFactory
,
\Magento\Framework\Json\EncoderInterface
$jsonEncoder
,
\Magento\Framework\Json\EncoderInterface
$jsonEncoder
,
ImageHelper
$imageHelper
,
ImageHelper
$imageHelper
,
array
$data
=
[]
array
$data
=
[]
)
{
)
{
parent
::
__construct
(
$context
,
$data
);
parent
::
__construct
(
$context
,
$data
);
$this
->
jsonEncoder
=
$jsonEncoder
;
$this
->
jsonEncoder
=
$jsonEncoder
;
$this
->
collectionFactory
=
$collectionFactory
;
$this
->
collectionFactory
=
$collectionFactory
;
$this
->
imageHelper
=
$imageHelper
;
$this
->
imageHelper
=
$imageHelper
;
}
}
/**
/**
* @return int
* @return int
*/
*/
public
function
getReviewId
()
:
int
public
function
getReviewId
()
{
{
return
$this
->
reviewId
;
return
$this
->
reviewId
;
}
}
/**
/**
* @param $reviewId
* @param $reviewId
*
*
* @return $this
* @return $this
*/
*/
public
function
setReviewId
(
$reviewId
)
:
Images
public
function
setReviewId
(
$reviewId
)
{
{
$this
->
reviewId
=
$reviewId
;
$this
->
reviewId
=
$reviewId
;
return
$this
;
return
$this
;
}
}
public
function
setProductId
(
$productId
)
:
Images
public
function
setProductId
(
$productId
)
{
{
$this
->
productId
=
$productId
;
$this
->
productId
=
$productId
;
return
$this
;
return
$this
;
}
}
public
function
getProductId
()
public
function
getProductId
()
{
{
return
$this
->
productId
;
return
$this
->
productId
;
}
}
public
function
getCollection
()
{
public
function
getCollection
()
{
/** @var Collection $collection */
/** @var Collection $collection */
$collection
=
$this
->
collectionFactory
->
create
()
$collection
=
$this
->
collectionFactory
->
create
()
->
addFieldToSelect
(
'*'
)
->
addFieldToSelect
(
'*'
)
->
addFieldToFilter
(
'review_id'
,
$this
->
getReviewId
());
->
addFieldToFilter
(
'review_id'
,
$this
->
getReviewId
());
return
$collection
;
return
$collection
;
}
}
public
function
getFullImagePath
(
$item
)
:
string
public
function
getFullImagePath
(
$item
)
{
{
return
$this
->
imageHelper
->
getFullPath
(
$item
->
getPath
());
return
$this
->
imageHelper
->
getFullPath
(
$item
->
getPath
());
}
}
/**
/**
* @param $item
* @param $item
* @return string
* @return string
* @throws \Magento\Framework\Exception\NoSuchEntityException
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
*/
public
function
getResizedImagePath
(
$item
)
:
string
public
function
getResizedImagePath
(
$item
)
{
{
return
$this
->
imageHelper
->
resize
(
$item
->
getPath
(),
self
::
REVIEW_COVER_WIDTH
);
return
$this
->
imageHelper
->
resize
(
$item
->
getPath
(),
self
::
REVIEW_COVER_WIDTH
);
}
}
/**
/**
* @param $item
* @param $item
* @return string
* @return string
* @throws \Magento\Framework\Exception\NoSuchEntityException
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
*/
public
function
getResizedImagePathByLimit
(
$item
,
$width
)
:
string
public
function
getResizedImagePathByLimit
(
$item
,
$width
)
{
{
return
$this
->
imageHelper
->
resize
(
$item
->
getPath
(),
$width
);
return
$this
->
imageHelper
->
resize
(
$item
->
getPath
(),
$width
);
}
}
}
}
app/code/Joshine/Sales/Plugin/DefaultRendererPlugin.php
View file @
90c6d153
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
namespace
Joshine\Sales\Plugin
;
namespace
Joshine\Sales\Plugin
;
use
\Magento\Catalog\Helper\Image
as
ImageHelper
;
use
\Magento\Catalog\Helper\Image
as
ImageHelper
;
use
Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\DefaultRenderer
;
class
DefaultRendererPlugin
{
class
DefaultRendererPlugin
{
...
@@ -40,4 +41,13 @@ class DefaultRendererPlugin {
...
@@ -40,4 +41,13 @@ class DefaultRendererPlugin {
return
$result
;
return
$result
;
}
}
public
function
afterGetColumns
(
DefaultRenderer
$subject
,
$result
)
{
if
(
isset
(
$result
[
'image'
]))
{
unset
(
$result
[
'image'
]);
$result
=
array_merge
([
'image'
=>
'col-image'
],
$result
);
}
return
$result
;
}
}
}
\ No newline at end of file
app/code/Joshine/Sales/Plugin/ItemsSortPlugin.php
0 → 100644
View file @
90c6d153
<?php
namespace
Joshine\Sales\Plugin
;
use
\Magento\Catalog\Helper\Image
as
ImageHelper
;
use
Magento\Sales\Block\Adminhtml\Order\View\Items
;
class
ItemsSortPlugin
{
public
function
afterGetColumns
(
Items
$subject
,
$result
)
{
if
(
isset
(
$result
[
'image'
]))
{
unset
(
$result
[
'image'
]);
$result
=
array_merge
([
'image'
=>
'Product Image'
],
$result
);
}
return
$result
;
}
}
app/code/Joshine/Sales/etc/di.xml
View file @
90c6d153
...
@@ -3,4 +3,7 @@
...
@@ -3,4 +3,7 @@
<type
name=
"Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\DefaultRenderer"
>
<type
name=
"Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\DefaultRenderer"
>
<plugin
name=
"order-view-image"
type=
"Joshine\Sales\Plugin\DefaultRendererPlugin"
sortOrder=
"1"
/>
<plugin
name=
"order-view-image"
type=
"Joshine\Sales\Plugin\DefaultRendererPlugin"
sortOrder=
"1"
/>
</type>
</type>
<type
name=
"\Magento\Sales\Block\Adminhtml\Order\View\Items"
>
<plugin
name=
"order-item-sort"
type=
"Joshine\Sales\Plugin\ItemsSortPlugin"
sortOrder=
"1"
/>
</type>
</config>
</config>
\ No newline at end of file
app/code/Magento/Checkout/Block/Cart/Shipping.php
View file @
90c6d153
...
@@ -14,6 +14,7 @@ use Magento\Framework\View\Element\Template\Context;
...
@@ -14,6 +14,7 @@ use Magento\Framework\View\Element\Template\Context;
use
Magento\Customer\Model\Session
as
CustomerSession
;
use
Magento\Customer\Model\Session
as
CustomerSession
;
use
Magento\Checkout\Model\Session
as
CheckoutSession
;
use
Magento\Checkout\Model\Session
as
CheckoutSession
;
use
Magento\Framework\App\ObjectManager
;
use
Magento\Framework\App\ObjectManager
;
use
Magento\Framework\App\Config\ScopeConfigInterface
;
/**
/**
* Cart Shipping Block
* Cart Shipping Block
...
@@ -43,7 +44,8 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart
...
@@ -43,7 +44,8 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart
* @var JsonHexTag
* @var JsonHexTag
*/
*/
private
$jsonHexTagSerializer
;
private
$jsonHexTagSerializer
;
protected
$_scopeConfigInterface
;
protected
$_quote
;
/**
/**
* @param Context $context
* @param Context $context
* @param CustomerSession $customerSession
* @param CustomerSession $customerSession
...
@@ -55,6 +57,7 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart
...
@@ -55,6 +57,7 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart
* @param JsonHexTag|null $jsonHexTagSerializer
* @param JsonHexTag|null $jsonHexTagSerializer
* @throws \RuntimeException
* @throws \RuntimeException
*/
*/
public
function
__construct
(
public
function
__construct
(
Context
$context
,
Context
$context
,
CustomerSession
$customerSession
,
CustomerSession
$customerSession
,
...
@@ -63,14 +66,17 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart
...
@@ -63,14 +66,17 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart
array
$layoutProcessors
=
[],
array
$layoutProcessors
=
[],
array
$data
=
[],
array
$data
=
[],
Json
$serializer
=
null
,
Json
$serializer
=
null
,
JsonHexTag
$jsonHexTagSerializer
=
null
JsonHexTag
$jsonHexTagSerializer
=
null
,
ScopeConfigInterface
$_scopeConfigInterface
)
{
)
{
$this
->
configProvider
=
$configProvider
;
$this
->
configProvider
=
$configProvider
;
$this
->
layoutProcessors
=
$layoutProcessors
;
$this
->
layoutProcessors
=
$layoutProcessors
;
$this
->
_quote
=
$checkoutSession
->
getQuote
();
parent
::
__construct
(
$context
,
$customerSession
,
$checkoutSession
,
$data
);
parent
::
__construct
(
$context
,
$customerSession
,
$checkoutSession
,
$data
);
$this
->
_isScopePrivate
=
true
;
$this
->
_isScopePrivate
=
true
;
$this
->
serializer
=
$serializer
?:
ObjectManager
::
getInstance
()
->
get
(
Json
::
class
);
$this
->
serializer
=
$serializer
?:
ObjectManager
::
getInstance
()
->
get
(
Json
::
class
);
$this
->
jsonHexTagSerializer
=
$jsonHexTagSerializer
?:
ObjectManager
::
getInstance
()
->
get
(
JsonHexTag
::
class
);
$this
->
jsonHexTagSerializer
=
$jsonHexTagSerializer
?:
ObjectManager
::
getInstance
()
->
get
(
JsonHexTag
::
class
);
$this
->
_scopeConfigInterface
=
$_scopeConfigInterface
;
}
}
/**
/**
...
@@ -83,7 +89,10 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart
...
@@ -83,7 +89,10 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart
{
{
return
$this
->
configProvider
->
getConfig
();
return
$this
->
configProvider
->
getConfig
();
}
}
public
function
getCountryId
()
{
$shippingAddress
=
$this
->
_quote
->
getShippingAddress
();
return
$shippingAddress
->
getCountryId
();
}
/**
/**
* Retrieve serialized JS layout configuration ready to use in template
* Retrieve serialized JS layout configuration ready to use in template
*
*
...
@@ -119,6 +128,10 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart
...
@@ -119,6 +128,10 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart
{
{
return
$this
->
jsonHexTagSerializer
->
serialize
(
$this
->
getCheckoutConfig
());
return
$this
->
jsonHexTagSerializer
->
serialize
(
$this
->
getCheckoutConfig
());
}
}
public
function
getFlatratePrice
()
{
return
$this
->
_scopeConfigInterface
->
getValue
(
'carriers/flatrate/price'
);
}
public
function
getCountryHtmlSelect
(
$defValue
=
null
,
$name
=
'country_id'
,
$id
=
'country'
,
$title
=
'Country'
)
{
public
function
getCountryHtmlSelect
(
$defValue
=
null
,
$name
=
'country_id'
,
$id
=
'country'
,
$title
=
'Country'
)
{
$objectManager
=
\Magento\Framework\App\ObjectManager
::
getInstance
();
$objectManager
=
\Magento\Framework\App\ObjectManager
::
getInstance
();
/** @var \Magento\Directory\Block\Data $block */
/** @var \Magento\Directory\Block\Data $block */
...
...
app/code/Magento/Checkout/Block/Onepage.php
View file @
90c6d153
...
@@ -42,6 +42,7 @@ class Onepage extends \Magento\Framework\View\Element\Template
...
@@ -42,6 +42,7 @@ class Onepage extends \Magento\Framework\View\Element\Template
* @var \Magento\Framework\Serialize\SerializerInterface
* @var \Magento\Framework\Serialize\SerializerInterface
*/
*/
private
$serializer
;
private
$serializer
;
private
$_scopeConfigInterface
;
/**
/**
* @param \Magento\Framework\View\Element\Template\Context $context
* @param \Magento\Framework\View\Element\Template\Context $context
...
@@ -60,7 +61,8 @@ class Onepage extends \Magento\Framework\View\Element\Template
...
@@ -60,7 +61,8 @@ class Onepage extends \Magento\Framework\View\Element\Template
array
$layoutProcessors
=
[],
array
$layoutProcessors
=
[],
array
$data
=
[],
array
$data
=
[],
\Magento\Framework\Serialize\Serializer\Json
$serializer
=
null
,
\Magento\Framework\Serialize\Serializer\Json
$serializer
=
null
,
\Magento\Framework\Serialize\SerializerInterface
$serializerInterface
=
null
\Magento\Framework\Serialize\SerializerInterface
$serializerInterface
=
null
,
\Magento\Framework\App\Config\ScopeConfigInterface
$_scopeConfigInterface
)
{
)
{
parent
::
__construct
(
$context
,
$data
);
parent
::
__construct
(
$context
,
$data
);
$this
->
formKey
=
$formKey
;
$this
->
formKey
=
$formKey
;
...
@@ -70,6 +72,7 @@ class Onepage extends \Magento\Framework\View\Element\Template
...
@@ -70,6 +72,7 @@ class Onepage extends \Magento\Framework\View\Element\Template
$this
->
layoutProcessors
=
$layoutProcessors
;
$this
->
layoutProcessors
=
$layoutProcessors
;
$this
->
serializer
=
$serializerInterface
?:
\Magento\Framework\App\ObjectManager
::
getInstance
()
$this
->
serializer
=
$serializerInterface
?:
\Magento\Framework\App\ObjectManager
::
getInstance
()
->
get
(
\Magento\Framework\Serialize\Serializer\JsonHexTag
::
class
);
->
get
(
\Magento\Framework\Serialize\Serializer\JsonHexTag
::
class
);
$this
->
_scopeConfigInterface
=
$_scopeConfigInterface
;
}
}
/**
/**
...
@@ -105,7 +108,10 @@ class Onepage extends \Magento\Framework\View\Element\Template
...
@@ -105,7 +108,10 @@ class Onepage extends \Magento\Framework\View\Element\Template
{
{
return
$this
->
configProvider
->
getConfig
();
return
$this
->
configProvider
->
getConfig
();
}
}
public
function
getFlatratePrice
()
{
return
$this
->
_scopeConfigInterface
->
getValue
(
'carriers/flatrate/price'
);
}
/**
/**
* Get base url for block.
* Get base url for block.
*
*
...
...
app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml
View file @
90c6d153
...
@@ -180,7 +180,6 @@
...
@@ -180,7 +180,6 @@
<container
name=
"checkout.cart.methods"
as=
"methods"
label=
"Payment Methods After Checkout Button"
>
<container
name=
"checkout.cart.methods"
as=
"methods"
label=
"Payment Methods After Checkout Button"
>
<block
class=
"Magento\Checkout\Block\Onepage\Link"
name=
"checkout.cart.methods.onepage.bottom"
template=
"Magento_Checkout::onepage/link.phtml"
/>
<block
class=
"Magento\Checkout\Block\Onepage\Link"
name=
"checkout.cart.methods.onepage.bottom"
template=
"Magento_Checkout::onepage/link.phtml"
/>
<block
class=
"Magento\Checkout\Block\QuoteShortcutButtons"
name=
"checkout.cart.shortcut.buttons"
/>
<block
class=
"Magento\Checkout\Block\QuoteShortcutButtons"
name=
"checkout.cart.shortcut.buttons"
/>
<block
class=
"Magento\Framework\View\Element\Template"
name=
"checkout.cart.we_accept"
template=
"Magento_Checkout::cart/we_accept.phtml"
/>
</container>
</container>
</block>
</block>
</container>
</container>
...
...
app/code/Magento/Checkout/view/frontend/templates/cart/methods-new.phtml
View file @
90c6d153
...
@@ -17,54 +17,73 @@
...
@@ -17,54 +17,73 @@
white
-
space
:
nowrap
;
white
-
space
:
nowrap
;
}
}
</
style
>
</
style
>
<
div
class
="
checkout
methods
items
checkout
-
methods
-
items
">
<
div
class
="
checkout
methods
items
checkout
-
methods
-
items
" style="
background
-
color
:
#f2f2f2;">
<div class="
item
checkout
-
now
">
<
div
style
=
"background-color: #fff;width:100%;gap: 1rem;"
>
<button type="
button
" data-role="
proceed
-
to
-
checkout
" title="
Checkout
Now
" class="
action
primary
checkout
">
<
div
class
="
item
checkout
-
now
" style="
margin
:
10
px
0
px
20
px
0
px
;
">
<span class="
secure
"><img alt="" src="
/
media
/
wysiwyg
/
secure
.
png
"></span>
<button type="
button
" data-role="
proceed
-
to
-
checkout
" title="
Checkout
Now
" class="
action
primary
checkout
">
<span>Checkout Now</span>
<span class="
secure
"><img alt="" src="
/
media
/
wysiwyg
/
secure
.
png
"></span>
</button>
<span>Checkout Now</span>
</div>
</button>
</div>
<div class="
item
">
<div class="
item
">
<style type="
text
/
css
">
<style type="
text
/
css
">
.displayno{
.displayno{
display: none;
display: none;
}
}
</style>
</style>
<div class="
or
-
checkout
-
with
" style="
display
:
flex
;
width
:
100
%
;
line
-
height
:
1.2
rem
;
"><span>OR CHECKOUT WITH</span></div>
<div class="
or
-
checkout
-
with
" style="
display
:
flex
;
width
:
100
%
;
line
-
height
:
1.2
rem
;
"><span>OR CHECKOUT WITH</span></div>
<div data-label="
or
" class="
paypal
checkout
after
paypal
-
logo
<div data-label="
or
" class="
paypal
checkout
after
paypal
-
logo
ec_shortcut_jjTyyXrRb0sVUXZkA5EduNvUofEEqeuO
">
ec_shortcut_jjTyyXrRb0sVUXZkA5EduNvUofEEqeuO
">
<div class="
checkout
-
logo
-
medium
">
<div class="
checkout
-
logo
-
medium
">
<input type="
image
" data-action="
checkout
-
form
-
submit
" data-checkout-url="
/
paypal
/
express
/
start
/
button
/
1
/
" src="
/
static
/
frontend
/
Joshine
/
breeze
/
en_US
/
Magento_Paypal
/
images
/
paypal
-
color
.
svg
" alt="
Checkout
with
PayPal
" title="
Checkout
with
PayPal
">
<input type="
image
" data-action="
checkout
-
form
-
submit
" data-checkout-url="
/
paypal
/
express
/
start
/
button
/
1
/
" src="
/
static
/
frontend
/
Joshine
/
breeze
/
en_US
/
Magento_Paypal
/
images
/
paypal
-
color
.
svg
" alt="
Checkout
with
PayPal
" title="
Checkout
with
PayPal
">
<div class="
checkout
-
txt
">Checkout</div>
<div class="
checkout
-
txt
">Checkout</div>
</div>
</div>
</div>
</div
>
<style type="
text
/
css
"
>
<style type="
text
/
css
">
.displayno{
.displayno{
display: none;
display: none;
}
}
</style>
</style>
<div data-label="
or
" class="
paypal
checkout
after
paypal
-
logo
<div data-label="
or
" class="
paypal
checkout
after
paypal
-
logo
ec_shortcut_bml_uk4wcxXNp0BvGHWy4ZWUMx397QbCJKdp
">
ec_shortcut_bml_uk4wcxXNp0BvGHWy4ZWUMx397QbCJKdp
">
<div class="
paypal
-
credit
displayno
">
<div class="
paypal
-
credit
displayno
">
<input type="
image
" data-action="
checkout
-
form
-
submit
" data-checkout-url="
/
paypal
/
bml
/
start
/
button
/
1
/
" src="
/
static
/
frontend
/
Joshine
/
breeze
/
en_US
/
Magento_Paypal
/
images
/
paypal
-
credit
.
png
" alt="
Checkout
with
PayPal
" title="
Checkout
with
PayPal
">
<input type="
image
" data-action="
checkout
-
form
-
submit
" data-checkout-url="
/
paypal
/
bml
/
start
/
button
/
1
/
" src="
/
static
/
frontend
/
Joshine
/
breeze
/
en_US
/
Magento_Paypal
/
images
/
paypal
-
credit
.
png
" alt="
Checkout
with
PayPal
" title="
Checkout
with
PayPa
l
">
<a href="
https
://
www
.
securecheckout
.
billmelater
.
com
/
paycapture
-
content
/
fetch
?
hash
=
AU826TU8
&
amp
;
content
=/
bmlweb
/
ppwpsiw
.
htm
l
">
<a href="
https
://
www
.
securecheckout
.
billmelater
.
com
/
paycapture
-
content
/
fetch
?
hash
=
AU826TU8
&
amp
;
content
=/
bmlweb
/
ppwpsiw
.
html
">
<img src="
https
://
www
.
paypalobjects
.
com
/
webstatic
/
en_US
/
btn
/
btn_bml_text
.
png
">
<
img src="
https
://
www
.
paypalobjects
.
com
/
webstatic
/
en_US
/
btn
/
btn_bml_text
.
png
"
>
<
/a
>
</a
>
<div class="
checkout
-
txt
">Checkout</div
>
<
div class="
checkout
-
txt
">Checkout<
/div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<style>
#we-accept{
text-align: center;
background: #ffffff;
padding: 10px 20px;
}
#we-accept .title{
font-size: 24px;
font-weight: bold;
margin-bottom: 10px;
}
</style>
<div id="
we
-
accept
">
<div class="
title
">We Accept</div>
<img src="
/
media
/
wysiwyg
/
we_accept
.
png
" alt="">
</div>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<script>
<script>
...
...
app/code/Magento/Checkout/view/frontend/templates/cart/shipping.phtml
View file @
90c6d153
...
@@ -7,7 +7,10 @@
...
@@ -7,7 +7,10 @@
?>
?>
<?php
/** @var $block \Magento\Checkout\Block\Cart\Shipping */
?>
<?php
/** @var $block \Magento\Checkout\Block\Cart\Shipping */
?>
<?php
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
?>
<?php
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
?>
<?php
$selectedCountryId
=
$block
->
getCountryId
();
$flatraPrice
=
$block
->
getFlatratePrice
();
?>
<div
id=
"block-shipping"
class=
"block shipping"
>
<div
id=
"block-shipping"
class=
"block shipping"
>
<div
id=
"block-summary"
style=
"display: none;"
>
<div
id=
"block-summary"
style=
"display: none;"
>
<form
method=
"post"
id=
"shipping-zip-form"
>
<form
method=
"post"
id=
"shipping-zip-form"
>
...
@@ -27,6 +30,7 @@
...
@@ -27,6 +30,7 @@
$scriptString
=
<<<script
$scriptString
=
<<<script
window.checkoutConfig = {$serializedCheckoutConfig};
window.checkoutConfig = {$serializedCheckoutConfig};
window.checkoutConfig.flatrate_price = {$flatraPrice};
window.customerData = window.checkoutConfig.customerData;
window.customerData = window.checkoutConfig.customerData;
window.isCustomerLoggedIn = window.checkoutConfig.isCustomerLoggedIn;
window.isCustomerLoggedIn = window.checkoutConfig.isCustomerLoggedIn;
require([
require([
...
@@ -41,5 +45,10 @@
...
@@ -41,5 +45,10 @@
script;
script;
?>
?>
<?=
/* @noEscape */
$secureRenderer
->
renderTag
(
'script'
,
[],
$scriptString
,
false
)
?>
<?=
/* @noEscape */
$secureRenderer
->
renderTag
(
'script'
,
[],
$scriptString
,
false
)
?>
<script>
require
([
'jquery'
],
function
(
$
)
{
$
(
'#shipping_country_id'
).
val
(
'
<?=
$selectedCountryId
?>
'
);
});
</script>
</div>
</div>
</div>
</div>
app/code/Magento/Checkout/view/frontend/web/js/view/address-get.js
View file @
90c6d153
...
@@ -18,6 +18,7 @@ define([
...
@@ -18,6 +18,7 @@ define([
this
.
_super
();
this
.
_super
();
var
address
=
{};
var
address
=
{};
address
.
countryId
=
window
.
checkoutConfig
.
defaultCountryId
;
address
.
countryId
=
window
.
checkoutConfig
.
defaultCountryId
;
address
.
postcode
=
window
.
checkoutConfig
.
postcode
;
getAddress
.
getRates
(
address
);
getAddress
.
getRates
(
address
);
}
}
...
...
app/code/Magento/Checkout/view/frontend/web/js/view/summary/shipping.js
View file @
90c6d153
...
@@ -93,10 +93,14 @@ define([
...
@@ -93,10 +93,14 @@ define([
price
=
this
.
totals
()[
'shipping_amount'
];
price
=
this
.
totals
()[
'shipping_amount'
];
if
(
price
==
0
)
if
(
price
==
0
)
{
{
if
(
quote
.
shippingSaveMethod
())
if
(
quote
.
shippingSaveMethod
()
&&
quote
.
shippingSaveMethod
()[
'amount'
]
!=
0
)
{
{
return
this
.
getFormattedPrice
(
quote
.
shippingSaveMethod
()[
'amount'
]);
return
this
.
getFormattedPrice
(
quote
.
shippingSaveMethod
()[
'amount'
]);
}
}
else
{
return
this
.
getFormattedPrice
(
window
.
checkoutConfig
.
flatrate_price
);
}
}
}
return
this
.
getFormattedPrice
(
price
);
return
this
.
getFormattedPrice
(
price
);
},
},
...
@@ -109,12 +113,16 @@ define([
...
@@ -109,12 +113,16 @@ define([
price
=
this
.
totals
()[
'shipping_amount'
];
price
=
this
.
totals
()[
'shipping_amount'
];
if
(
price
==
0
)
if
(
price
==
0
)
{
{
if
(
quote
.
shippingSaveMethod
())
if
(
quote
.
shippingSaveMethod
()
&&
quote
.
shippingSaveMethod
()[
'amount'
]
!=
0
)
{
{
return
'-'
+
this
.
getFormattedPrice
(
quote
.
shippingSaveMethod
()[
'amount'
]);
return
'-'
+
this
.
getFormattedPrice
(
quote
.
shippingSaveMethod
()[
'amount'
]);
}
}
return
0
;
else
{
return
'-'
+
this
.
getFormattedPrice
(
window
.
checkoutConfig
.
flatrate_price
);
}
}
}
return
0
;
},
},
/**
/**
...
...
app/design/frontend/Joshine/breeze/Magento_Checkout/templates/onepage.phtml
View file @
90c6d153
...
@@ -7,6 +7,9 @@
...
@@ -7,6 +7,9 @@
/** @var $block \Magento\Checkout\Block\Onepage */
/** @var $block \Magento\Checkout\Block\Onepage */
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
?>
?>
<?php
$flatraPrice
=
$block
->
getFlatratePrice
();
?>
<style
type=
"text/css"
>
<style
type=
"text/css"
>
.payment-method._active
{
.payment-method._active
{
border
:
1px
solid
#1979c3
!important
;
border
:
1px
solid
#1979c3
!important
;
...
@@ -777,6 +780,7 @@
...
@@ -777,6 +780,7 @@
<?php
$serializedCheckoutConfig
=
/* @noEscape */
$block
->
getSerializedCheckoutConfig
();
<?php
$serializedCheckoutConfig
=
/* @noEscape */
$block
->
getSerializedCheckoutConfig
();
$scriptString
=
<<<script
$scriptString
=
<<<script
window.checkoutConfig = {$serializedCheckoutConfig};
window.checkoutConfig = {$serializedCheckoutConfig};
window.checkoutConfig.flatrate_price = {$flatraPrice};
// Create aliases for customer.js model from customer module
// Create aliases for customer.js model from customer module
window.isCustomerLoggedIn = window.checkoutConfig.isCustomerLoggedIn;
window.isCustomerLoggedIn = window.checkoutConfig.isCustomerLoggedIn;
window.customerData = window.checkoutConfig.customerData;
window.customerData = window.checkoutConfig.customerData;
...
...
app/design/frontend/Joshine/breeze/Magento_Swatches/web/js/swatch-renderer.js
View file @
90c6d153
...
@@ -450,7 +450,7 @@ define([
...
@@ -450,7 +450,7 @@ define([
}
}
if
(
item
.
label
.
toLowerCase
()
==
"size"
)
{
if
(
item
.
label
.
toLowerCase
()
==
"size"
)
{
// Create new control
// Create new control
var
sizeContent
=
'<div class="swatch-attribute-selected-option-size-content"
style="margin-top: 0.13333rem;padding: 0.26667rem;background-color: #f7f7f7;display: none;"><div style="font-size:.32rem;color:#999999;">Product Measurements
</div>'
+
'<span style="color:#0a0a0a;" class="'
+
classes
.
attributeSelectedOptionLabelClass
+
'"></span></div>'
;
var
sizeContent
=
'<div class="swatch-attribute-selected-option-size-content"
><div style="font-size:.32rem;color:#999999;">Product Size Describe
</div>'
+
'<span style="color:#0a0a0a;" class="'
+
classes
.
attributeSelectedOptionLabelClass
+
'"></span></div>'
;
container
.
append
(
container
.
append
(
'<div class="'
+
classes
.
attributeClass
+
' '
+
item
.
code
+
'" '
+
'<div class="'
+
classes
.
attributeClass
+
' '
+
item
.
code
+
'" '
+
...
...
app/design/frontend/Joshine/breeze/web/css/_custom.less
View file @
90c6d153
...
@@ -166,17 +166,12 @@
...
@@ -166,17 +166,12 @@
.swatch-option {
.swatch-option {
display: block;
display: block;
font-family: Outfit-Regular;
font-family: Outfit-Regular;
width: 40px;
height: 40px;
line-height: 40px;
color: #222222;
color: #222222;
font-size: 12px;
font-size: 12px;
font-weight: 500;
font-weight: 500;
text-align: center;
text-align: center;
background-color: #f1f1f1;
border-radius: 10%;
border-radius: 10%;
padding: 0;
padding: 0;
border: 0;
}
}
.swatch-option-link-layered .swatch-option .color{
.swatch-option-link-layered .swatch-option .color{
...
@@ -436,9 +431,6 @@ button, input, optgroup, select, textarea{
...
@@ -436,9 +431,6 @@ button, input, optgroup, select, textarea{
}
}
#product-options-wrapper .swatch-option.image:hover{
border: 2px solid #000;
}
.product.info .review-add + .review-list, .product.info #product-review-container {
.product.info .review-add + .review-list, .product.info #product-review-container {
...
@@ -2183,15 +2175,7 @@ button.action.submit.primary {
...
@@ -2183,15 +2175,7 @@ button.action.submit.primary {
white-space: nowrap;
white-space: nowrap;
}
}
@media (max-width: 768px){
.swatch-attribute-selected-option-size-content span.swatch-attribute-selected-option{
margin-left: 0!important;
line-height:.53333rem;
font-size: .32rem;
text-transform:capitalize;
color: #0a0a0a;
}
}
#product-intro__freeshipping-more-3{
#product-intro__freeshipping-more-3{
display: inline-block;
display: inline-block;
...
@@ -2256,18 +2240,58 @@ button.action.submit.primary {
...
@@ -2256,18 +2240,58 @@ button.action.submit.primary {
}
}
.swatch-option.color, .swatch-option.image{
.swatch-option.color, .swatch-option.image{
width: 40px !important;
width: 40px;
height: 40px !important;
height: 40px;
border: 1px solid #000008;
background-clip: content-box!important;
padding: 5px;
margin-left: 3%;
}
.swatch-option.color.selected{
border: 2px solid black;
}
.swatch-option.image.selected{
border: 2px solid black;
}
}
.swatch-option.text{
.swatch-option.text{
width: auto!important;
width: auto!important;
padding: calc( 8.5px) calc( 11px);
padding: calc( 8.5px) calc( 11px);
line-height:
22
px!important;
line-height:
10
px!important;
min-width: 40px;
min-width: 40px;
text-align: center;
text-align: center;
font-size: 15px;
font-size: 15px;
background: none!important;
border:2px solid rgba(23, 23, 23, 0.3);
border-radius: 15px;
margin-left: 10px;
}
.swatch-option.text.selected{
border:2px solid black;
}
.swatch-attribute.size .swatch-attribute-selected-option{
font-size: 15px;
color: rgba(23, 23, 23, 0.6) !important;
}
.swatch-attribute-selected-option-size-content{
margin-top: 0.53333rem;
padding: 0.26667rem;
background-color: #f8f8f8!important;
display: none;
}
@media (max-width: 768px){
.swatch-attribute-selected-option-size-content span.swatch-attribute-selected-option{
margin-left: 0!important;
line-height:0.53333rem;
font-size: 12px;
text-transform:capitalize;
color: #0a0a0a;
}
}
}
.block-minicart .block-content>.actions .action.checkout{
.block-minicart .block-content>.actions .action.checkout{
...
@@ -2280,24 +2304,18 @@ button.action.submit.primary {
...
@@ -2280,24 +2304,18 @@ button.action.submit.primary {
margin: 0 !important;
margin: 0 !important;
}
}
//色块强制大小
#product-options-wrapper .swatch-option.image{
width: 40px !important;;
height: 40px !important;;
border-radius: 50% !important;;
}
//颜色提示强制关闭
//颜色提示强制关闭
.breeze .field-tooltip-content, .breeze .tooltip.wrapper .tooltip.content, .breeze .map-popup, .breeze .swatch-option-tooltip {
.breeze .field-tooltip-content, .breeze .tooltip.wrapper .tooltip.content, .breeze .map-popup, .breeze .swatch-option-tooltip {
display: none !important;
display: none !important;
}
}
@media (max-width: 1024px){
@media (max-width: 1024px){
#product-options-wrapper .swatch-option.color,#product-options-wrapper .swatch-option.image{
#product-options-wrapper .swatch-option.color,#product-options-wrapper .swatch-option.image{
width: 30px !important;
width: 30px !important;
height: 30px !important;
height: 30px !important;
border: 1px solid #000008;
border-radius: 50% !important;
border-radius: 50% !important;
line-height: 30px;
line-height: 30px;
}
}
...
@@ -2360,10 +2378,6 @@ button.action.submit.primary {
...
@@ -2360,10 +2378,6 @@ button.action.submit.primary {
background-color: #000;
background-color: #000;
}
}
//产品色块选中错位处理
#product-options-wrapper .swatch-option.image:hover{
border: none;
}
//评论列表距离顶部
//评论列表距离顶部
.product.info.detailed, .block.related {
.product.info.detailed, .block.related {
...
@@ -2855,6 +2869,10 @@ tr.grand.totals {
...
@@ -2855,6 +2869,10 @@ tr.grand.totals {
}
}
.swatch-option.selected:before{
box-shadow:none;
}
div#shipping-method-buttons-container {
div#shipping-method-buttons-container {
display: none;
display: none;
}
}
...
@@ -3018,6 +3036,7 @@ strong#block-related-heading,strong#block-upsell-heading{ font-weight: 600; colo
...
@@ -3018,6 +3036,7 @@ strong#block-related-heading,strong#block-upsell-heading{ font-weight: 600; colo
}
}
/*导入Joshine工具类*/
/*导入Joshine工具类*/
@import "./_joshine_col";
@import "./_joshine_col";
@import "./_joshine_utils";
@import "./_joshine_utils";
...
...
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