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
9817873a
Commit
9817873a
authored
Jan 16, 2023
by
byd
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
936ebcd8
e3455a10
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
119 additions
and
20 deletions
+119
-20
app/code/Oceanpayment/Klarna/Block/Payment/Redirect.php
+7
-1
app/code/Oceanpayment/Klarna/Model/PaymentMethod.php
+17
-5
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/addto.phtml
+1
-1
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/addtocart.phtml
+1
-1
app/design/frontend/Joshine/breeze/Magento_Cms/templates/default/home.phtml
+82
-3
app/design/frontend/Joshine/breeze/Magento_Search/templates/form.mini.phtml
+6
-1
app/design/frontend/Joshine/breeze/Magento_Theme/templates/html/footer.phtml
+0
-5
app/design/frontend/Joshine/breeze/web/css/_custom.less
+5
-3
app/design/frontend/Joshine/breeze/web/images/goTop.png
+0
-0
No files found.
app/code/Oceanpayment/Klarna/Block/Payment/Redirect.php
View file @
9817873a
...
...
@@ -68,7 +68,13 @@ class Redirect extends \Magento\Framework\View\Element\Template
}
public
function
getPayMode
(){
return
$this
->
_paymentMethod
->
getConfigData
(
'pay_mode'
);
$billing_country
=
$this
->
_paymentMethod
->
getBillingCountry
();
$pay_mode
=
$this
->
_paymentMethod
->
getConfigData
(
'pay_mode'
);
if
(
$pay_mode
==
'redirect'
||
in_array
(
$billing_country
,
array
(
'BE'
,
'FR'
,
'IT'
,
'ES'
,
'CH'
))){
return
'redirect'
;
}
else
{
return
'iframe'
;
}
}
...
...
app/code/Oceanpayment/Klarna/Model/PaymentMethod.php
View file @
9817873a
...
...
@@ -90,7 +90,19 @@ class PaymentMethod extends AbstractMethod
{
return
$this
->
getConfigData
(
'gateway_url'
);
}
/**
* billing country
*
* @return string billing country
*/
public
function
getBillingCountry
()
{
$orderIncrementId
=
$this
->
checkoutSession
->
getLastRealOrderId
();
$order
=
$this
->
_orderFactory
->
create
()
->
loadByIncrementId
(
$orderIncrementId
);
$billing
=
$order
->
getBillingAddress
();
return
$billing
->
getCountryId
();
}
public
function
canUseForCurrency
(
$currencyCode
)
{
...
...
@@ -222,8 +234,8 @@ class PaymentMethod extends AbstractMethod
$itemList
=
'{
"0": {
"type": "1",
"title": "'
.
substr
(
$productName
,
0
,
100
)
.
'",
"sku": "'
.
substr
(
$productSku
,
0
,
100
)
.
'",
"title": "'
.
substr
(
str_replace
(
array
(
"'"
,
'"'
),
array
(
""
,
""
),
$productName
),
0
,
100
)
.
'",
"sku": "'
.
substr
(
str_replace
(
array
(
"'"
,
'"'
),
array
(
""
,
""
),
$productSku
),
0
,
100
)
.
'",
"price": "'
.
(
$order_amount
-
$order
->
getTaxAmount
()
-
$order
->
getShippingAmount
())
.
'",
"quantity": "1",
"total_amount": "'
.
(
$order_amount
-
$order
->
getTaxAmount
()
-
$order
->
getShippingAmount
())
.
'",
...
...
@@ -236,7 +248,7 @@ class PaymentMethod extends AbstractMethod
"1": {
"type": "3",
"title": "折扣",
"sku": "'
.
substr
(
$productSku
,
0
,
100
)
.
'",
"sku": "'
.
substr
(
str_replace
(
array
(
"'"
,
'"'
),
array
(
""
,
""
),
$productSku
),
0
,
100
)
.
'",
"price": "0",
"quantity": "0",
"total_amount": "0",
...
...
@@ -249,7 +261,7 @@ class PaymentMethod extends AbstractMethod
"2": {
"type": "4",
"title": "运费",
"sku": "'
.
substr
(
$productSku
,
0
,
100
)
.
'",
"sku": "'
.
substr
(
str_replace
(
array
(
"'"
,
'"'
),
array
(
""
,
""
),
$productSku
),
0
,
100
)
.
'",
"price": "'
.
round
(
$order
->
getShippingAmount
(),
2
)
.
'",
"quantity": "1",
"total_amount": "'
.
round
(
$order
->
getShippingAmount
(),
2
)
.
'",
...
...
@@ -262,7 +274,7 @@ class PaymentMethod extends AbstractMethod
"3": {
"type": "5",
"title": "税费",
"sku": "'
.
substr
(
$productSku
,
0
,
100
)
.
'",
"sku": "'
.
substr
(
str_replace
(
array
(
"'"
,
'"'
),
array
(
""
,
""
),
$productSku
),
0
,
100
)
.
'",
"price": "'
.
round
(
$order
->
getTaxAmount
(),
2
)
.
'",
"quantity": "1",
"total_amount": "'
.
round
(
$order
->
getTaxAmount
(),
2
)
.
'",
...
...
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/addto.phtml
View file @
9817873a
...
...
@@ -51,7 +51,7 @@
<div
class=
"product-intro__freeshipping-item full-line paddingTop-0 paddingBottom-0 action"
id=
"free-return-button"
>
<div
class=
"product-intro__freeshipping-icon"
>
<i
class=
"svgicon svgicon-gd-freereturn"
></i><p>
Free
Return
&
Exchange
</p>
<span
class=
"svgicon svgicon-gd-more-grey product-intro__freeshipping-more"
></span>
</div>
<div
class=
"product-intro__freeshipping-desc"
>
<i
class=
"svgicon svgicon-gd-freereturn"
></i><p>
Return
&
Exchange
</p>
<span
class=
"svgicon svgicon-gd-more-grey product-intro__freeshipping-more"
></span>
</div>
<div
class=
"product-intro__freeshipping-desc"
>
Learn More
</div>
</div>
...
...
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/addtocart.phtml
View file @
9817873a
...
...
@@ -174,6 +174,7 @@
height
:
55px
;
width
:
100%
;
}
.express-area-box
article
{
overflow-y
:
scroll
;
height
:
calc
(
100vh
);
}
@media
(
max-width
:
1024px
){
#product-intro__freeshipping-more-3
{
margin-top
:
7px
;
...
...
@@ -240,7 +241,6 @@
.express-area-box
.top
h3
{
padding-left
:
15px
;
font-size
:
16px
;
background
:
#eeeeee
;
line-height
:
44px
;}
.lastli
{
text-align
:
center
;
font-size
:
14px
;
line-height
:
40px
;}
.lastli-right
{
float
:
right
!important
;}
.express-area-box
article
{
overflow-y
:
scroll
;
}
.area-list
li
{
padding
:
0
15px
;
border-bottom
:
1px
solid
#e2e2e2
;
text-align
:
justify
;
line-height
:
44px
}
.express-area-box
{
position
:
fixed
;
left
:
inherit
;
width
:
inherit
;
height
:
100%
;
right
:
-100%
;
top
:
0
;
margin-left
:
0
;
box-shadow
:
0
0
20px
rgba
(
0
,
0
,
0
,
1
);
}
.area-content
{
padding
:
10px
;
max-width
:
max-content
;
width
:
600px
;}
...
...
app/design/frontend/Joshine/breeze/Magento_Cms/templates/default/home.phtml
View file @
9817873a
...
...
@@ -13,15 +13,21 @@
padding-top
:
2px
;
}
@media
(
max-width
:
768px
)
{
.banner1
,
.banner1
>
.imgbox
,
.banner1
>
.imgbox
>
a
,
.banner1
>
.imgbox
>
a
>
img
{
.banner1
,
.banner1
>
.imgbox
,
.banner1
>
.imgbox
>
a
,
.banner1
>
.imgbox
>
a
>
img
{
height
:
577px
!important
;
margin-top
:
6.5
%
;
/
/
margin-top
:
6.5
%
;
}
input
#left
,
input
#right
{
input
#left
,
input
#right
{
top
:
280px
!important
;
padding
:
1px
;
}
#topBtn
{
width
:
8%
!important
;
}
}
@media
(
max-width
:
1024px
)
{
.rating-result
::before
,
.rating-result
>
span
::before
{
-webkit-mask-size
:
1rem
1rem
;
...
...
@@ -33,10 +39,25 @@
p
.flashsale-title
{
font-size
:
18px
;
}
#topBtn
{
width
:
6%
!important
;
}
}
#topBtn
{
bottom
:
5%
;
right
:
2%
;
position
:
fixed
;
width
:
4%
;
}
</style>
<div
class=
"banner1"
></div>
<a
href=
"#top"
title=
"go to header"
id=
"topBtn"
style=
"display: none;"
>
<img
data-src=
"
<?php
echo
$block
->
getViewFileUrl
(
'images/goTop.png'
);
?>
"
src=
"
<?php
echo
$block
->
getViewFileUrl
(
'images/goTop.png'
);
?>
"
>
</a>
<script>
require
([
'jquery'
...
...
@@ -236,8 +257,66 @@
}
return
mobile_flag
;
}
window
.
onscroll
=
function
(){
var
top
=
document
.
getElementById
(
"topBtn"
);
if
(
document
.
documentElement
.
scrollTop
>
200
||
document
.
body
.
scrollTop
>
200
){
top
.
style
.
display
=
"block"
;
}
else
{
top
.
style
.
display
=
"none"
;
}
}
var
userAgentInfo
=
navigator
.
userAgent
;
var
Agents
=
new
Array
(
"Android"
,
"iPhone"
,
"SymbianOS"
,
"Windows Phone"
,
"iPad"
,
"iPod"
);
var
flag
=
true
;
for
(
var
v
=
0
;
v
<
Agents
.
length
;
v
++
)
{
if
(
userAgentInfo
.
indexOf
(
Agents
[
v
])
>
0
)
{
flag
=
false
;
break
;
}
}
require
([
'jquery'
],
function
(
$
){
if
(
flag
){
var
imgH
=
$
(
'.logo'
).
height
();
imgH
=
Math
.
ceil
(
imgH
/
3
);
$
(
'.header '
).
css
(
'margin-bottom'
,
imgH
);
}
else
{
var
headerH
=
$
(
'.page-header'
).
outerHeight
(
true
);
$
(
'.columns'
).
css
(
'margin-top'
,
headerH
);
}
});
</script>
<?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
(
'flashsaleproduct'
)
->
toHtml
();
?>
<?php
echo
$block
->
getLayout
()
->
createBlock
(
'Magento\Cms\Block\Block'
)
->
setBlockId
(
'home_category_thumnail'
)
->
toHtml
();
?>
<script>
const
imgs
=
document
.
getElementsByTagName
(
"img"
);
const
viewHeight
=
window
.
innerHeight
||
document
.
documentElement
.
clientHeight
;
let
num
=
0
;
function
lazyload
()
{
for
(
let
i
=
num
;
i
<
imgs
.
length
;
i
++
)
{
let
distance
=
viewHeight
-
imgs
[
i
].
getBoundingClientRect
().
top
;
if
(
distance
>=
0
)
{
imgs
[
i
].
src
=
imgs
[
i
].
getAttribute
(
"data-src"
);
num
=
i
+
1
;
}
}
}
function
debounce
(
fn
,
delay
=
500
)
{
let
timer
=
null
;
return
function
(...
args
)
{
if
(
timer
)
clearTimeout
(
timer
);
timer
=
setTimeout
(()
=>
{
fn
.
call
(
this
,
args
);
},
delay
);
};
}
window
.
onload
=
lazyload
;
window
.
addEventListener
(
"scroll"
,
debounce
(
lazyload
,
600
),
false
);
</script>
app/design/frontend/Joshine/breeze/Magento_Search/templates/form.mini.phtml
View file @
9817873a
...
...
@@ -65,8 +65,13 @@ $quickSearchUrl = $allowedSuggestion ? $escaper->escapeUrl($helper->getSuggestUr
require
([
'jquery'
],
function
(
$
)
{
$
(
"#search"
).
on
(
"
focus
"
,
function
()
{
$
(
"#search"
).
on
(
"
click
"
,
function
()
{
$
(
this
).
css
(
"width"
,
"500px"
).
css
(
"font-size"
,
"20px"
);
});
$
(
'#search'
).
on
(
'blur'
,
function
(){
$
(
this
).
attr
(
"style"
,
""
);
});
});
</script>
app/design/frontend/Joshine/breeze/Magento_Theme/templates/html/footer.phtml
View file @
9817873a
...
...
@@ -36,11 +36,6 @@
window
.
addEventListener
(
"scroll"
,
debounce
(
lazyload
,
600
),
false
);
require
([
'jquery'
],
function
(
$
)
{
...
...
app/design/frontend/Joshine/breeze/web/css/_custom.less
View file @
9817873a
...
...
@@ -1982,7 +1982,7 @@ background-color: #000;
@media (min-width: 768px){
.header-top.header-fixed .header.content{
padding-bottom: 15px;
//
padding-bottom: 15px;
margin-top: 3%;
}
.review-list .review-details{
...
...
@@ -2160,7 +2160,7 @@ background-color: #000;
}
.header-top.header-fixed{
height: 110px !important;
//
height: 110px !important;
}
.page-with-filter .toolbar .modes{
...
...
@@ -2567,5 +2567,7 @@ button.primary.action.create {
strong#block-related-heading,strong#block-upsell-heading{ font-weight: 600; color: #000;font-size: 16px;}
.breeze-block-sidebar > .title, .breeze-block-sidebar .block-title, .paypal-review .paypal-review-title, .block > .title, .block .block-title{
padding:0 !important;
}
app/design/frontend/Joshine/breeze/web/images/goTop.png
0 → 100644
View file @
9817873a
4.76 KB
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