Commit f6782c77 by liumengfei

Merge branch 'developer' into production

parents 36e34b21 aa73e0bc
...@@ -42,8 +42,8 @@ class CategoryLoadAfter implements \Magento\Framework\Event\ObserverInterface ...@@ -42,8 +42,8 @@ class CategoryLoadAfter implements \Magento\Framework\Event\ObserverInterface
$str = $this->getUrlParameter($category); $str = $this->getUrlParameter($category);
$oldMetaDescription = $category->getMetaDescription(); $oldMetaDescription = $category->getMetaDescription();
$oldMetaKeyword = $category->getMetaKeywords(); $oldMetaKeyword = $category->getMetaKeywords();
$category->setMetaTitle('Buy the Latest ' . $str['title'] .' on '.$url); $category->setMetaTitle(__('Buy the Latest').' '. $str['title'] .__(' on ').$url);
$category->setMetaDescription('Shop ' . $str['title'] . '. ' . $oldMetaDescription); $category->setMetaDescription(__('Shop ') . $str['title'] . '. ' . $oldMetaDescription);
if ($str['keyword'] && $str['keyword'] != '.'){ if ($str['keyword'] && $str['keyword'] != '.'){
$category->setMetaKeywords($str['keyword']); $category->setMetaKeywords($str['keyword']);
}else{ }else{
...@@ -59,8 +59,8 @@ class CategoryLoadAfter implements \Magento\Framework\Event\ObserverInterface ...@@ -59,8 +59,8 @@ class CategoryLoadAfter implements \Magento\Framework\Event\ObserverInterface
$arr = ['title'=>'' , 'keyword'=>'']; $arr = ['title'=>'' , 'keyword'=>''];
if (isset($data['product_list_order'])){ if (isset($data['product_list_order'])){
$sortBy = $category->getAvailableSortByOptions(); $sortBy = $category->getAvailableSortByOptions();
$arr['title'] .= $sortBy[$data['product_list_order']] . ' '; $arr['title'] .= __($sortBy[$data['product_list_order']]) . ' ';
$arr['keyword'] .= $sortBy[$data['product_list_order']] .' '. $categoryName.','; $arr['keyword'] .= __($sortBy[$data['product_list_order']]) .' '. $categoryName.',';
} }
if (isset($data['color'])){ if (isset($data['color'])){
......
...@@ -180,8 +180,9 @@ class Subscribe extends SubscriberController implements HttpPostActionInterface ...@@ -180,8 +180,9 @@ class Subscribe extends SubscriberController implements HttpPostActionInterface
$message = $this->getSuccessMessage((int)$subscriber->getSubscriberStatus()); $message = $this->getSuccessMessage((int)$subscriber->getSubscriberStatus());
$message = [ $message = [
'success' => __('Success.'), 'success' => __('Success.'),
'data' => $message, 'data' => $message,
'coupon_code' => $this->getCouponCode()
]; ];
} catch (LocalizedException $e) { } catch (LocalizedException $e) {
$message = ['error' => $e->getMessage()]; $message = ['error' => $e->getMessage()];
...@@ -230,4 +231,13 @@ class Subscribe extends SubscriberController implements HttpPostActionInterface ...@@ -230,4 +231,13 @@ class Subscribe extends SubscriberController implements HttpPostActionInterface
return __('Thank you for your subscription.'); return __('Thank you for your subscription.');
} }
private function getCouponCode()
{
return $this->_objectManager->get(ScopeConfigInterface::class)
->getValue(
'joshine_coupon_pusher/general/newsletter_coupon_code',
ScopeInterface::SCOPE_STORE
);
}
} }
...@@ -34,6 +34,54 @@ ...@@ -34,6 +34,54 @@
width: auto; width: auto;
} }
} }
.coupon-wrapper {
transition: all 1s;
perspective: 1000px;
}
.coupon-back {
position: absolute;
}
.coupon-wrapper .coupon-front {
backface-visibility: hidden;
}
.coupon-wrapper .coupon-back {
position: absolute;
top: 0;
transform: rotateY(-180deg);
backface-visibility: hidden;
}
.coupon-wrapper.flipping .coupon-front {
transition: all 2s;
transform: rotateY(180deg);
}
.coupon-wrapper.flipping .coupon-back {
transition: all 2s;
display: block;
transform: rotateY(0deg);
}
.coupon-shopping-now-button {
position: relative;
padding: 1em;
height: 36px;
background: #fb7701;
border-radius: 4px;
color: #fff;
font-size: 16px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
line-height: 16px;
font-weight: 500;
}
</style> </style>
<div class="joshine-model-warp" id="coupon-subscribe-alert" style="display: none;"> <div class="joshine-model-warp" id="coupon-subscribe-alert" style="display: none;">
<div class="joshine-mask"></div> <div class="joshine-mask"></div>
...@@ -45,12 +93,23 @@ ...@@ -45,12 +93,23 @@
</div> </div>
<div class="j-modal-body"> <div class="j-modal-body">
<div class="coupon-alt joshine-text-center"> <div class="coupon-alt joshine-text-center">
<img src="<?= $block->getViewFileUrl('Joshine_CouponPusher::images/coupon_background.png'); ?>" alt="" class=""> <div class="coupon-wrapper">
<div class="coupon-text"> <div class="coupon-front">
<!--todo:: show config coupon--> <img src="<?= $block->getViewFileUrl('Joshine_CouponPusher::images/coupon_background.png'); ?>" alt="" class="">
<p class="coupon-discount-amount"><?= $block->getCouponTitle() ?></p> <div class="coupon-text">
<p class="coupon-discount-rule"><?= $block->getCouponDescription() ?></p> <!--todo:: show config coupon-->
<p class="coupon-discount-amount"><?= $block->getCouponTitle() ?></p>
<p class="coupon-discount-rule"><?= $block->getCouponDescription() ?></p>
</div>
</div>
<div class="coupon-back">
<img src="<?= $block->getViewFileUrl('Joshine_CouponPusher::images/coupon_background.png'); ?>" alt="">
<div class="coupon-text">
<p class="coupon-discount-amount" id="flipping-coupon-code"></p>
</div>
</div>
</div> </div>
<div class="coupon-alt-input-title"> <div class="coupon-alt-input-title">
<?= __('Subscribe to get your exclusive offer.') ?> <?= __('Subscribe to get your exclusive offer.') ?>
</div> </div>
...@@ -60,6 +119,9 @@ ...@@ -60,6 +119,9 @@
</div> </div>
<div class="coupon-alert-submit-button" id="coupon-subscribe-email"><?= __('Submit') ?></div> <div class="coupon-alert-submit-button" id="coupon-subscribe-email"><?= __('Submit') ?></div>
</div> </div>
<div class="coupon-shopping-now" style="display: none;">
<div class="coupon-shopping-now-button"><a href="/"><?= __('Shopping Now') ?></a></div>
</div>
<div class="coupon-input-errorMsg"></div> <div class="coupon-input-errorMsg"></div>
<div class="split-line joshine-hidden-sm joshine-hidden-xs"><span class="split-text"><?= __('Additional Information') ?></span></div> <div class="split-line joshine-hidden-sm joshine-hidden-xs"><span class="split-text"><?= __('Additional Information') ?></span></div>
<div class="coupon-alt-bottom-title joshine-hidden-sm joshine-hidden-xs"><span><?= $block->getInformationTitle() ?></span> <div class="coupon-alt-bottom-title joshine-hidden-sm joshine-hidden-xs"><span><?= $block->getInformationTitle() ?></span>
...@@ -106,7 +168,11 @@ ...@@ -106,7 +168,11 @@
$(".coupon-input-errorMsg").html(response.error).show(); $(".coupon-input-errorMsg").html(response.error).show();
return; return;
} }
//todo::show coupon code $("#flipping-coupon-code").html(response.coupon_code);
$(".coupon-wrapper").addClass("flipping");
$(".coupon-alt-input-title").html("Thank your Subscribe!")
$(".coupon-alt-input").hide();
$(".coupon-shopping-now").show();
}, },
error: function () { error: function () {
$(".coupon-input-errorMsg").html('error').show(); $(".coupon-input-errorMsg").html('error').show();
......
#coupon-subscribe-alert.joshine-model-warp .j-modal .j-modal-dialog { #coupon-subscribe-alert.joshine-model-warp .j-modal .j-modal-dialog {
width: 640px; width: 580px;
} }
#coupon-subscribe-alert .j-modal .j-modal-content { #coupon-subscribe-alert .j-modal .j-modal-content {
......
...@@ -84,7 +84,7 @@ $subtotalStr = $block->escapeHtml( ...@@ -84,7 +84,7 @@ $subtotalStr = $block->escapeHtml(
<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="<?= $block->escapeUrl($block->getViewFileUrl('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>
......
...@@ -9,15 +9,15 @@ ...@@ -9,15 +9,15 @@
<div style="position: relative;"> <div style="position: relative;">
<img style="position: absolute; left: 2px; top: 0;" alt="" src="/media/wysiwyg/cart.png"> <img style="position: absolute; left: 2px; top: 0;" alt="" src="/media/wysiwyg/cart.png">
<div style="padding-left: 45px;"> <div style="padding-left: 45px;">
<span style="display: block; font-family: Lato-Bold; font-size: 14px; margin-bottom: 5px;color: #1d1d1d;">EASY RETURNS</span> <span style="display: block; font-family: Lato-Bold; font-size: 14px; margin-bottom: 5px;color: #1d1d1d;" translate="'EASY RETURNS'"></span>
<span style="display: block; font-family: Regular; font-size: 12px; margin-bottom: 15px;color: #1d1d1d;">No-quibble return &amp; exchange within 15 Days</span> <span style="display: block; font-family: Regular; font-size: 12px; margin-bottom: 15px;color: #1d1d1d;" translate="'No-quibble return & exchange within 15 Days'"></span>
</div> </div>
</div> </div>
<div style="position: relative;"> <div style="position: relative;">
<img style="position: absolute; left: 9px; top: 0;" alt="" src="/media/wysiwyg/key.png"> <img style="position: absolute; left: 9px; top: 0;" alt="" src="/media/wysiwyg/key.png">
<div style="padding-left: 45px;"> <div style="padding-left: 45px;">
<span style="display: block; font-family: Lato-Bold; font-size: 14px; margin-bottom: 5px;color: #1d1d1d;">SAFE &amp; SECURE</span> <span style="display: block; font-family: Lato-Bold; font-size: 14px; margin-bottom: 5px;color: #1d1d1d;" translate="'SAFE & SECURE'"></span>
<span style="display: block; font-family: Regular; font-size: 12px; margin-bottom: 15px;color: #1d1d1d;">Your information is always protected</span> <span style="display: block; font-family: Regular; font-size: 12px; margin-bottom: 15px;color: #1d1d1d;" translate="'Your information is always protected'"></span>
</div> </div>
</div> </div>
<div> <div>
......
...@@ -72,7 +72,8 @@ class Freeshipping extends \Magento\Shipping\Model\Carrier\AbstractCarrier imple ...@@ -72,7 +72,8 @@ class Freeshipping extends \Magento\Shipping\Model\Carrier\AbstractCarrier imple
*/ */
private function isFreeShippingRequired(RateRequest $request): bool private function isFreeShippingRequired(RateRequest $request): bool
{ {
$minSubtotal = $request->getPackageValueWithDiscount(); //$minSubtotal = $request->getPackageValueWithDiscount();
$minSubtotal = $request->getBaseSubtotalInclTax();
if ($request->getBaseSubtotalWithDiscountInclTax() if ($request->getBaseSubtotalWithDiscountInclTax()
&& $this->getConfigFlag('tax_including')) { && $this->getConfigFlag('tax_including')) {
$minSubtotal = $request->getBaseSubtotalWithDiscountInclTax(); $minSubtotal = $request->getBaseSubtotalWithDiscountInclTax();
...@@ -97,7 +98,6 @@ class Freeshipping extends \Magento\Shipping\Model\Carrier\AbstractCarrier imple ...@@ -97,7 +98,6 @@ class Freeshipping extends \Magento\Shipping\Model\Carrier\AbstractCarrier imple
$result = $this->_rateResultFactory->create(); $result = $this->_rateResultFactory->create();
$this->_updateFreeMethodQuote($request); $this->_updateFreeMethodQuote($request);
if ($request->getFreeShipping() || $this->isFreeShippingRequired($request)) { if ($request->getFreeShipping() || $this->isFreeShippingRequired($request)) {
/** @var \Magento\Quote\Model\Quote\Address\RateResult\Method $method */ /** @var \Magento\Quote\Model\Quote\Address\RateResult\Method $method */
$method = $this->_rateMethodFactory->create(); $method = $this->_rateMethodFactory->create();
......
...@@ -212,7 +212,7 @@ $_menuHtml = $block->getHtml('level-top', 'submenu', $columnsLimit) ...@@ -212,7 +212,7 @@ $_menuHtml = $block->getHtml('level-top', 'submenu', $columnsLimit)
<div class="nav-sections"> <div class="nav-sections">
<nav class="navigation" data-action="navigation" id="joshine-navigation"> <nav class="navigation" data-action="navigation" id="joshine-navigation">
<ul data-mage-init='{"menu":{"responsive":true,"dropdown":"div", "expanded":true, "position":{"my":"left top","at":"left bottom"}}}'> <ul data-mage-init='{"menu":{"responsive":true,"dropdown":"div", "expanded":true, "position":{"my":"left top","at":"left bottom"}}}'>
<li class="level0 nav-0 level-top"><a href="/" class="level-top"><span>Home</span></a></li> <li class="level0 nav-0 level-top"><a href="/" class="level-top"><span><?= __('Home') ?></span></a></li>
<?= /* @noEscape */ $_menuHtml?> <?= /* @noEscape */ $_menuHtml?>
<?= $block->getChildHtml() ?> <?= $block->getChildHtml() ?>
</ul> </ul>
......
...@@ -15619,9 +15619,14 @@ Coupon Code,Código preferencial ...@@ -15619,9 +15619,14 @@ Coupon Code,Código preferencial
WHY CHOOSE US,¿¿ por qué nos eligen? WHY CHOOSE US,¿¿ por qué nos eligen?
We Accept,Aceptamos We Accept,Aceptamos
"JOIN OUR LIST FOR SPECIAL OFFERS!","¡¡ Únete a nuestra lista de preferencias!" "JOIN OUR LIST FOR SPECIAL OFFERS!","¡¡ Únete a nuestra lista de preferencias!"
Recommend,Recomendación
Top Rated,La calificación más alta
New Arrivals,Recién llegado
Review Count,Recuento de revisión
Buy the Latest,Comprar los últimos productos
"Shop ","Tiendas "
" on "," En "
Best Seller,Mejor vendedora
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 188 49"><path fill="#0070E0" d="M164.01 11.446l-4.012 25.207a.643.643 0 0 0 .642.746h4.748a.701.701 0 0 0 .698-.589l4.012-25.207a.643.643 0 0 0-.642-.746h-4.748a.692.692 0 0 0-.698.589zm-5.07 7.356h-4.505a.699.699 0 0 0-.697.588l-.149.928s-3.499-3.794-9.694-1.23c-3.554 1.468-5.26 4.501-5.986 6.723 0 0-2.304 6.753 2.907 10.47 0 0 4.832 3.575 10.273-.22l-.094.592a.644.644 0 0 0 .37.686c.085.04.178.06.272.06h4.508a.692.692 0 0 0 .698-.589l2.742-17.262a.632.632 0 0 0-.149-.521.643.643 0 0 0-.496-.226zm-6.629 9.54a5.005 5.005 0 0 1-1.715 3.095 5.073 5.073 0 0 1-3.345 1.203 4.602 4.602 0 0 1-1.416-.206c-1.945-.62-3.055-2.474-2.736-4.484a5.01 5.01 0 0 1 1.717-3.093 5.08 5.08 0 0 1 3.343-1.207 4.6 4.6 0 0 1 1.416.208c1.957.616 3.062 2.473 2.741 4.485h-.005zm-24.056.477c2.443 0 4.806-.868 6.662-2.446a10.147 10.147 0 0 0 3.456-6.158c.789-4.993-3.14-9.351-8.71-9.351h-8.973a.699.699 0 0 0-.697.589L115.98 36.66a.644.644 0 0 0 .37.686c.086.04.178.06.272.06h4.751a.699.699 0 0 0 .697-.589l1.178-7.402a.692.692 0 0 1 .698-.59l4.309-.006zm3.974-8.831c-.293 1.846-1.731 3.205-4.482 3.205h-3.517l1.068-6.713h3.454c2.844.005 3.77 1.67 3.477 3.513v-.005z"/><path fill="#003087" d="M110.567 19.23l-5.434 9.105-2.758-9.038a.694.694 0 0 0-.672-.495h-4.904a.526.526 0 0 0-.527.446.515.515 0 0 0 .025.247l4.942 15.224-4.47 7.174a.516.516 0 0 0 .18.728.527.527 0 0 0 .269.07h5.282a.876.876 0 0 0 .751-.42l13.804-22.667a.512.512 0 0 0 .011-.53.524.524 0 0 0-.463-.263h-5.28a.877.877 0 0 0-.756.419zm-16.548-.428H89.51a.7.7 0 0 0-.698.59l-.146.927s-3.502-3.794-9.697-1.23c-3.553 1.468-5.26 4.501-5.983 6.723 0 0-2.306 6.753 2.904 10.47 0 0 4.833 3.575 10.274-.22l-.094.592a.642.642 0 0 0 .37.686c.085.04.178.06.272.06h4.508a.701.701 0 0 0 .697-.589l2.743-17.262a.642.642 0 0 0-.37-.687.655.655 0 0 0-.272-.06zm-6.63 9.542a5.011 5.011 0 0 1-1.716 3.091 5.082 5.082 0 0 1-3.343 1.206 4.605 4.605 0 0 1-1.414-.206c-1.944-.62-3.053-2.474-2.734-4.485a5.011 5.011 0 0 1 1.723-3.098 5.082 5.082 0 0 1 3.353-1.201c.48-.005.959.065 1.417.208 1.937.616 3.04 2.472 2.72 4.485h-.005zm-24.055.476a10.284 10.284 0 0 0 6.656-2.449 10.144 10.144 0 0 0 3.452-6.156c.79-4.992-3.14-9.35-8.708-9.35H55.76a.7.7 0 0 0-.698.588l-4 25.2a.642.642 0 0 0 .37.687c.085.039.178.06.272.06h4.748a.7.7 0 0 0 .698-.59l1.176-7.402a.692.692 0 0 1 .698-.589h4.31zm3.974-8.832c-.293 1.846-1.73 3.205-4.481 3.205H59.31l1.066-6.713h3.454c2.845.005 3.77 1.671 3.478 3.513v-.005z"/><path fill="#001C64" d="M32.639 12.16c.107-5.566-4.484-9.836-10.797-9.836H8.784a1.277 1.277 0 0 0-1.262 1.078L2.29 36.095a1.038 1.038 0 0 0 1.025 1.2h7.736l-1.209 7.57a1.038 1.038 0 0 0 1.025 1.2h6.302c.304 0 .575-.109.807-.306.23-.198.268-.471.316-.772l1.85-10.884c.047-.3.2-.69.431-.888.231-.198.433-.306.738-.306h3.856c6.183 0 11.428-4.395 12.387-10.507.679-4.338-1.181-8.286-4.915-10.243z"/><path fill="#0070E0" d="M12.725 25.238l-1.927 12.218-1.21 7.664a1.038 1.038 0 0 0 1.026 1.199h6.67a1.276 1.276 0 0 0 1.26-1.078l1.758-11.139a1.277 1.277 0 0 1 1.261-1.078h3.926c6.183 0 11.428-4.51 12.388-10.622.68-4.338-1.504-8.286-5.238-10.243-.01.462-.05.923-.121 1.38-.959 6.11-6.206 10.621-12.387 10.621h-6.145a1.278 1.278 0 0 0-1.261 1.079"/><path fill="#003087" d="M10.797 37.456h-7.76a1.037 1.037 0 0 1-1.024-1.2L7.245 3.078A1.277 1.277 0 0 1 8.506 2h13.336c6.313 0 10.904 4.594 10.797 10.159-1.571-.824-3.417-1.295-5.439-1.295H16.082a1.277 1.277 0 0 0-1.262 1.078l-2.094 13.296-1.93 12.218z"/></svg>
\ No newline at end of file
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