Commit 9817873a by byd

解决冲突

parents 936ebcd8 e3455a10
...@@ -68,7 +68,13 @@ class Redirect extends \Magento\Framework\View\Element\Template ...@@ -68,7 +68,13 @@ class Redirect extends \Magento\Framework\View\Element\Template
} }
public function getPayMode(){ 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';
}
} }
......
...@@ -90,7 +90,19 @@ class PaymentMethod extends AbstractMethod ...@@ -90,7 +90,19 @@ class PaymentMethod extends AbstractMethod
{ {
return $this->getConfigData('gateway_url'); 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) public function canUseForCurrency($currencyCode)
{ {
...@@ -222,8 +234,8 @@ class PaymentMethod extends AbstractMethod ...@@ -222,8 +234,8 @@ class PaymentMethod extends AbstractMethod
$itemList = '{ $itemList = '{
"0": { "0": {
"type": "1", "type": "1",
"title": "'.substr($productName,0,100).'", "title": "'.substr(str_replace(array("'",'"'),array("",""),$productName), 0,100).'",
"sku": "'.substr($productSku,0,100).'", "sku": "'.substr(str_replace(array("'",'"'),array("",""),$productSku), 0,100).'",
"price": "'.($order_amount-$order->getTaxAmount()-$order->getShippingAmount()).'", "price": "'.($order_amount-$order->getTaxAmount()-$order->getShippingAmount()).'",
"quantity": "1", "quantity": "1",
"total_amount": "'.($order_amount-$order->getTaxAmount()-$order->getShippingAmount()).'", "total_amount": "'.($order_amount-$order->getTaxAmount()-$order->getShippingAmount()).'",
...@@ -236,7 +248,7 @@ class PaymentMethod extends AbstractMethod ...@@ -236,7 +248,7 @@ class PaymentMethod extends AbstractMethod
"1": { "1": {
"type": "3", "type": "3",
"title": "折扣", "title": "折扣",
"sku": "'.substr($productSku,0,100).'", "sku": "'.substr(str_replace(array("'",'"'),array("",""),$productSku), 0,100).'",
"price": "0", "price": "0",
"quantity": "0", "quantity": "0",
"total_amount": "0", "total_amount": "0",
...@@ -249,7 +261,7 @@ class PaymentMethod extends AbstractMethod ...@@ -249,7 +261,7 @@ class PaymentMethod extends AbstractMethod
"2": { "2": {
"type": "4", "type": "4",
"title": "运费", "title": "运费",
"sku": "'.substr($productSku,0,100).'", "sku": "'.substr(str_replace(array("'",'"'),array("",""),$productSku), 0,100).'",
"price": "'.round($order->getShippingAmount(),2).'", "price": "'.round($order->getShippingAmount(),2).'",
"quantity": "1", "quantity": "1",
"total_amount": "'.round($order->getShippingAmount(),2).'", "total_amount": "'.round($order->getShippingAmount(),2).'",
...@@ -262,7 +274,7 @@ class PaymentMethod extends AbstractMethod ...@@ -262,7 +274,7 @@ class PaymentMethod extends AbstractMethod
"3": { "3": {
"type": "5", "type": "5",
"title": "税费", "title": "税费",
"sku": "'.substr($productSku,0,100).'", "sku": "'.substr(str_replace(array("'",'"'),array("",""),$productSku), 0,100).'",
"price": "'.round($order->getTaxAmount(),2).'", "price": "'.round($order->getTaxAmount(),2).'",
"quantity": "1", "quantity": "1",
"total_amount": "'.round($order->getTaxAmount(),2).'", "total_amount": "'.round($order->getTaxAmount(),2).'",
......
...@@ -51,7 +51,7 @@ ...@@ -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-item full-line paddingTop-0 paddingBottom-0 action" id="free-return-button" >
<div class="product-intro__freeshipping-icon"> <div class="product-intro__freeshipping-icon">
<i class="svgicon svgicon-gd-freereturn"></i><p>Free Return &amp; 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 &amp; Exchange</p> <span class="svgicon svgicon-gd-more-grey product-intro__freeshipping-more" ></span> </div> <div class="product-intro__freeshipping-desc">
Learn More Learn More
</div> </div>
</div> </div>
......
...@@ -174,6 +174,7 @@ ...@@ -174,6 +174,7 @@
height: 55px; height: 55px;
width: 100%; width: 100%;
} }
.express-area-box article { overflow-y: scroll;height: calc(100vh); }
@media (max-width: 1024px){ @media (max-width: 1024px){
#product-intro__freeshipping-more-3{ #product-intro__freeshipping-more-3{
margin-top: 7px; margin-top: 7px;
...@@ -240,7 +241,6 @@ ...@@ -240,7 +241,6 @@
.express-area-box .top h3 {padding-left: 15px; font-size: 16px;background: #eeeeee;line-height: 44px;} .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{text-align: center;font-size: 14px;line-height: 40px;}
.lastli-right{float:right !important;} .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} .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); } .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;} .area-content{padding:10px;max-width: max-content;width: 600px;}
......
...@@ -13,15 +13,21 @@ ...@@ -13,15 +13,21 @@
padding-top: 2px; padding-top: 2px;
} }
@media (max-width: 768px) { @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; height: 577px !important;
margin-top: 6.5%; / / margin-top: 6.5 %;
} }
input#left,input#right{
input#left, input#right {
top: 280px !important; top: 280px !important;
padding: 1px; padding: 1px;
} }
#topBtn {
width: 8% !important;
}
} }
@media (max-width: 1024px) { @media (max-width: 1024px) {
.rating-result::before, .rating-result>span::before { .rating-result::before, .rating-result>span::before {
-webkit-mask-size: 1rem 1rem; -webkit-mask-size: 1rem 1rem;
...@@ -33,10 +39,25 @@ ...@@ -33,10 +39,25 @@
p.flashsale-title{ p.flashsale-title{
font-size: 18px; font-size: 18px;
} }
#topBtn{
width: 6% !important;
}
}
#topBtn{
bottom: 5%;
right: 2%;
position:fixed;
width: 4%;
} }
</style> </style>
<div class="banner1"></div> <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> <script>
require([ require([
'jquery' 'jquery'
...@@ -236,8 +257,66 @@ ...@@ -236,8 +257,66 @@
} }
return mobile_flag; 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> </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_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();?>
<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('home_category_thumnail')->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>
...@@ -65,8 +65,13 @@ $quickSearchUrl = $allowedSuggestion ? $escaper->escapeUrl($helper->getSuggestUr ...@@ -65,8 +65,13 @@ $quickSearchUrl = $allowedSuggestion ? $escaper->escapeUrl($helper->getSuggestUr
require([ require([
'jquery' 'jquery'
], function ($) { ], function ($) {
$("#search").on("focus",function () { $("#search").on("click",function () {
$(this).css("width","500px").css("font-size","20px"); $(this).css("width","500px").css("font-size","20px");
}); });
$('#search').on('blur',function (){
$(this).attr("style","");
});
}); });
</script> </script>
...@@ -36,11 +36,6 @@ ...@@ -36,11 +36,6 @@
window.addEventListener("scroll", debounce(lazyload, 600), false); window.addEventListener("scroll", debounce(lazyload, 600), false);
require([ require([
'jquery' 'jquery'
], function ($) { ], function ($) {
......
...@@ -1982,7 +1982,7 @@ background-color: #000; ...@@ -1982,7 +1982,7 @@ background-color: #000;
@media (min-width: 768px){ @media (min-width: 768px){
.header-top.header-fixed .header.content{ .header-top.header-fixed .header.content{
padding-bottom: 15px; //padding-bottom: 15px;
margin-top: 3%; margin-top: 3%;
} }
.review-list .review-details{ .review-list .review-details{
...@@ -2160,7 +2160,7 @@ background-color: #000; ...@@ -2160,7 +2160,7 @@ background-color: #000;
} }
.header-top.header-fixed{ .header-top.header-fixed{
height: 110px !important; //height: 110px !important;
} }
.page-with-filter .toolbar .modes{ .page-with-filter .toolbar .modes{
...@@ -2567,5 +2567,7 @@ button.primary.action.create { ...@@ -2567,5 +2567,7 @@ button.primary.action.create {
strong#block-related-heading,strong#block-upsell-heading{ font-weight: 600; color: #000;font-size: 16px;} 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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment