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
088b3c6d
Commit
088b3c6d
authored
Feb 10, 2023
by
halweg
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into haowei/topmenu
parents
f4554fb0
5853904d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
150 additions
and
12 deletions
+150
-12
app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml
+2
-0
app/code/Rokanthemes/OnePageCheckout/view/frontend/web/js/view/summary/item/details.js
+3
-3
app/code/Rokanthemes/OnePageCheckout/view/frontend/web/template/summary/item/details.html
+12
-3
app/design/frontend/Joshine/breeze/Magento_Checkout/templates/cart/item/default.phtml
+38
-2
app/design/frontend/Joshine/breeze/Magento_Checkout/templates/cart/item/renderer/actions/edit.phtml
+2
-0
app/design/frontend/Joshine/breeze/Magento_LayeredNavigation/templates/layer/view.phtml
+9
-4
app/design/frontend/Joshine/breeze/web/css/_custom.less
+84
-0
No files found.
app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml
View file @
088b3c6d
...
@@ -66,6 +66,7 @@
...
@@ -66,6 +66,7 @@
<span>
<?=
$block
->
escapeHtml
(
__
(
'Clear Shopping Cart'
))
?>
</span>
<span>
<?=
$block
->
escapeHtml
(
__
(
'Clear Shopping Cart'
))
?>
</span>
</button>
</button>
<?php
endif
?>
<?php
endif
?>
<!--
<button type="submit"
<button type="submit"
name="update_cart_action"
name="update_cart_action"
data-cart-item-update=""
data-cart-item-update=""
...
@@ -74,6 +75,7 @@
...
@@ -74,6 +75,7 @@
class="action update">
class="action update">
<span>
<?=
$block
->
escapeHtml
(
__
(
'Update Shopping Cart'
))
?>
</span>
<span>
<?=
$block
->
escapeHtml
(
__
(
'Update Shopping Cart'
))
?>
</span>
</button>
</button>
-->
<input
type=
"hidden"
value=
""
id=
"update_cart_action_container"
data-cart-item-update=
""
/>
<input
type=
"hidden"
value=
""
id=
"update_cart_action_container"
data-cart-item-update=
""
/>
</div>
</div>
</form>
</form>
...
...
app/code/Rokanthemes/OnePageCheckout/view/frontend/web/js/view/summary/item/details.js
View file @
088b3c6d
...
@@ -23,8 +23,8 @@ define([
...
@@ -23,8 +23,8 @@ define([
* @returns void
* @returns void
*/
*/
updateQty
:
function
(
item
)
{
updateQty
:
function
(
item
)
{
if
(
item
.
qty
<
0
)
{
if
(
item
.
qty
<
=
0
)
{
$
(
".error-message[itemId = '"
+
item
.
item_id
+
"']"
).
text
(
$t
(
'Please enter the number greater than
or equal to
0!'
));
$
(
".error-message[itemId = '"
+
item
.
item_id
+
"']"
).
text
(
$t
(
'Please enter the number greater than 0!'
));
return
;
return
;
}
}
if
(
parseFloat
(
item
.
qty
)
!=
item
.
qty
)
{
if
(
parseFloat
(
item
.
qty
)
!=
item
.
qty
)
{
...
@@ -83,7 +83,7 @@ define([
...
@@ -83,7 +83,7 @@ define([
qtyInput
.
trigger
(
'change'
);
qtyInput
.
trigger
(
'change'
);
},
1000
);
},
1000
);
}
else
{
}
else
{
if
(
currentQty
>
=
100
)
{
if
(
currentQty
>
100
)
{
var
nextQty
=
(
currentQty
-
100
)
/
100
;
var
nextQty
=
(
currentQty
-
100
)
/
100
;
nextQty
=
+
nextQty
.
toFixed
(
2
);
nextQty
=
+
nextQty
.
toFixed
(
2
);
qtyInput
.
val
(
nextQty
);
qtyInput
.
val
(
nextQty
);
...
...
app/code/Rokanthemes/OnePageCheckout/view/frontend/web/template/summary/item/details.html
View file @
088b3c6d
...
@@ -9,6 +9,16 @@
...
@@ -9,6 +9,16 @@
</strong>
</strong>
<div
class=
"details-qty"
>
<div
class=
"details-qty"
>
<span
class=
"label"
>
<!-- ko i18n: 'Qty' --><!-- /ko -->
</span>
<span
class=
"label"
>
<!-- ko i18n: 'Qty' --><!-- /ko -->
</span>
<!-- ko if: ($parent.qty > 1)-->
<span
class=
"qty-button"
>
<span
class=
"decrease"
data-bind=
"attr: {action: 'decrease', itemId: $parent.item_id}, click: updateQtyButton"
>
-
</span>
</span>
<!-- /ko -->
<!-- ko ifnot: ($parent.qty > 1)-->
<span
class=
"qty-button no-enabled"
>
<span
class=
"decrease"
data-bind=
"attr: {action: 'decrease', itemId: $parent.item_id}, click: updateQtyButton"
>
-
</span>
</span>
<!-- /ko -->
<input
type=
"number"
class=
"input-text qty"
data-bind=
"
<input
type=
"number"
class=
"input-text qty"
data-bind=
"
value: $parent.qty,
value: $parent.qty,
event: {
event: {
...
@@ -16,10 +26,9 @@
...
@@ -16,10 +26,9 @@
},
},
attr: {
attr: {
title: titleQtyBox
title: titleQtyBox
}"
/>
}"
readonly=
"readonly"
/>
<span
class=
"qty-button"
>
<span
class=
"qty-button"
>
<span
class=
"increase"
data-bind=
"attr: {action: 'increase', itemId: $parent.item_id}, click: updateQtyButton"
>
</span>
<span
class=
"increase"
data-bind=
"attr: {action: 'increase', itemId: $parent.item_id}, click: updateQtyButton"
>
+
</span>
<span
class=
"decrease"
data-bind=
"attr: {action: 'decrease', itemId: $parent.item_id}, click: updateQtyButton"
>
</span>
</span>
</span>
<span
class=
"error-message"
data-bind=
"attr: {itemId: $parent.item_id}"
></span>
<span
class=
"error-message"
data-bind=
"attr: {itemId: $parent.item_id}"
></span>
</div>
</div>
...
...
app/design/frontend/Joshine/breeze/Magento_Checkout/templates/cart/item/default.phtml
View file @
088b3c6d
...
@@ -94,9 +94,16 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
...
@@ -94,9 +94,16 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
</td>
</td>
<?php
endif
;
?>
<?php
endif
;
?>
<td
class=
"col qty"
data-th=
"
<?=
$block
->
escapeHtml
(
__
(
'Qty'
))
?>
"
>
<td
class=
"col qty"
data-th=
"
<?=
$block
->
escapeHtml
(
__
(
'Qty'
))
?>
"
>
<div
class=
"field qty"
>
<?php
if
(
$block
->
escapeHtmlAttr
(
$block
->
getQty
())
>
1
)
:?>
<
strong
class
="
lower
-
qty
qty
-
change
">-</strong>
<?php else :?>
<strong class="
lower
-
qty
qty
-
change
no
-
enabled
">-</strong>
<?php endif; ?>
<div class="
field
qty
new
-
qty
">
<div class="
control
qty
">
<div class="
control
qty
">
<label for="
cart
-<?=
$block
->
escapeHtmlAttr
(
$_item
->
getId
())
?>
-qty">
<label for="
cart
-<?=
$block
->
escapeHtmlAttr
(
$_item
->
getId
())
?>
-qty">
<span
class=
"label"
>
<?=
$block
->
escapeHtml
(
__
(
'Qty'
))
?>
</span>
<span
class=
"label"
>
<?=
$block
->
escapeHtml
(
__
(
'Qty'
))
?>
</span>
<input
id=
"cart-
<?=
$block
->
escapeHtmlAttr
(
$_item
->
getId
())
?>
-qty"
<input
id=
"cart-
<?=
$block
->
escapeHtmlAttr
(
$_item
->
getId
())
?>
-qty"
name=
"cart[
<?=
$block
->
escapeHtmlAttr
(
$_item
->
getId
())
?>
][qty]"
name=
"cart[
<?=
$block
->
escapeHtmlAttr
(
$_item
->
getId
())
?>
][qty]"
...
@@ -108,10 +115,12 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
...
@@ -108,10 +115,12 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
title=
"
<?=
$block
->
escapeHtmlAttr
(
__
(
'Qty'
))
?>
"
title=
"
<?=
$block
->
escapeHtmlAttr
(
__
(
'Qty'
))
?>
"
class=
"input-text qty"
class=
"input-text qty"
data-validate=
"{required:true,'validate-greater-than-zero':true}"
data-validate=
"{required:true,'validate-greater-than-zero':true}"
data-role=
"cart-item-qty"
/>
data-role=
"cart-item-qty"
readonly=
"readonly"
/>
</label>
</label>
</div>
</div>
</div>
</div>
<strong
class=
"add-qty qty-change"
>
+
</strong>
</td>
</td>
<td
class=
"col subtotal"
data-th=
"
<?=
$block
->
escapeHtml
(
__
(
'Subtotal'
))
?>
"
>
<td
class=
"col subtotal"
data-th=
"
<?=
$block
->
escapeHtml
(
__
(
'Subtotal'
))
?>
"
>
...
@@ -130,3 +139,30 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
...
@@ -130,3 +139,30 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
<script>
require(['jquery'], function ($) {
$('.add-qty').click(function(){
var input = $(this).prev().find('.input-text');
if (input.val()) {
var current = parseInt(input.val());
input.val(current + 1);
// submit
$("
#form-validate").submit();
}
else
{
return
false
;
}
});
$
(
'.lower-qty'
)
.
click
(
function
(){
var
input
=
$
(
this
)
.
next
()
.
find
(
'.input-text'
);
if
(
input
.
val
()
>
1
)
{
var
current
=
parseInt
(
input
.
val
());
input
.
val
(
current
-
1
);
// submit
$
(
"#form-validate"
)
.
submit
();
}
else
{
return
false
;
}
});
});
</
script
>
app/design/frontend/Joshine/breeze/Magento_Checkout/templates/cart/item/renderer/actions/edit.phtml
View file @
088b3c6d
...
@@ -7,9 +7,11 @@
...
@@ -7,9 +7,11 @@
/** @var $block \Magento\Checkout\Block\Cart\Item\Renderer\Actions\Edit */
/** @var $block \Magento\Checkout\Block\Cart\Item\Renderer\Actions\Edit */
?>
?>
<?php
if
(
$block
->
isProductVisibleInSiteVisibility
())
:?>
<?php
if
(
$block
->
isProductVisibleInSiteVisibility
())
:?>
<!--
<
a
class
="
action
action
-
edit
"
<
a
class
="
action
action
-
edit
"
href="
<?=
$block
->
escapeUrl
(
$block
->
getConfigureUrl
())
?>
"
href="
<?=
$block
->
escapeUrl
(
$block
->
getConfigureUrl
())
?>
"
title="
<?=
$block
->
escapeHtmlAttr
(
__
(
'Edit item parameters'
))
?>
">
title="
<?=
$block
->
escapeHtmlAttr
(
__
(
'Edit item parameters'
))
?>
">
<span>
<?=
$block
->
escapeHtml
(
__
(
'Edit'
))
?>
</span>
<span>
<?=
$block
->
escapeHtml
(
__
(
'Edit'
))
?>
</span>
</a>
</a>
-->
<?php
endif
?>
<?php
endif
?>
app/design/frontend/Joshine/breeze/Magento_LayeredNavigation/templates/layer/view.phtml
View file @
088b3c6d
...
@@ -26,11 +26,16 @@
...
@@ -26,11 +26,16 @@
}
}
?>
?>
<style>
<style>
.page-head-zindex
.page-head-zindex
{
z-index
:
5
!important
;}
{
@media
(
max-width
:
767.98px
){
z-index
:
5
!important
;
.page-layout-1column
.block.filter
.filter-title
,
.sidebar
.block.filter
.filter-title
{
margin-top
:
-10%
;}
}
@media
(
max-width
:
767px
){
.catalog-category-view
.page-main
>
.columns
{
position
:
relative
!important
;}
p
#toolbar-amount
{
margin-top
:
1
!important
;}
.catalog-category-view
.filter-content
.filter-options
.filter-options-title
{
background-color
:
#fff
;}
.price-box.price-final_price
{
width
:
30%
;
margin-top
:
-10%
;}
}
}
</style>
</style>
<div
class=
"block filter"
data-mage-init=
'{"slideout":{"toggler":".filter-title","panel":".filter-content"}}'
data-breeze-processed=
"true"
>
<div
class=
"block filter"
data-mage-init=
'{"slideout":{"toggler":".filter-title","panel":".filter-content"}}'
data-breeze-processed=
"true"
>
<div
class=
"block-title filter-title"
tabindex=
"0"
>
<div
class=
"block-title filter-title"
tabindex=
"0"
>
...
...
app/design/frontend/Joshine/breeze/web/css/_custom.less
View file @
088b3c6d
...
@@ -711,6 +711,90 @@ p.shopbycate-title {
...
@@ -711,6 +711,90 @@ p.shopbycate-title {
.baozhang_before_footer .last_font {color: inherit !important;}
.baozhang_before_footer .last_font {color: inherit !important;}
.baozhang_before_footer img {opacity: 0.5;}
.baozhang_before_footer img {opacity: 0.5;}
.checkout-cart-index input[type="number"]::-webkit-inner-spin-button,
.checkout-cart-index input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none;
}
.checkout-cart-index input[type="number"]{-moz-appearance:textfield;}
.checkout-cart-index .new-qty{
display: inline-block;
}
.checkout-cart-index .new-qty .input-text{
text-align: center;
}
.checkout-cart-index .qty-change{
font-size: 18px;
font-weight: bold;
cursor:pointer;
color: #0000ff;
}
.checkout-cart-index .col.qty{
text-align: center;
}
@media (min-width: 1024px){
.cart.item .item-info td.col.item {
width: 50%;
}
}
.no-enabled{
color:#cacaca!important;
}
@media (max-width: 768px){
.checkout-cart-index .cart-container .cart-summary {
margin:0;
}
}
.checkout-index-index .details-qty,.checkout-cart-index .details-qty{
display: block;
}
.checkout-index-index input[type="number"]::-webkit-inner-spin-button,
.checkout-index-index input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none;
}
.checkout-index-index .product-item-details .details-qty .input-text{
text-align: center;
border:none;
margin: 0 auto;
padding:0;
width:3rem;
}
.checkout-index-index span.qty-button {
font-size: 18px;
font-weight: bold;
cursor:pointer;
color: #0000ff;
}
.checkout-index-index .item-options dt.label {
width: 30% !important;
}
.checkout-index-index input[type="number"]{-moz-appearance:textfield;}
.checkout-index-index .product-item-details .product.options {
width: 70%;
margin-top: 0.5rem;
}
.checkout-index-index .product-item-details .product-item-inner .product-item-name-block .details-qty{
float:none;
}
.checkout-index-index .product-item-details .product-item-inner .product-item-name-block .details-qty .label {
margin-right:15%;
}
.checkout-index-index .product-item-details .product.options .content .item-options .label {
margin: 0 auto;
}
.checkout-index-index .product-item-details .product-item-inner .subtotal {
position: absolute;
right: 7%;
}
@media (max-width: 768px){
.checkout-index-index .product-item-details .product-item-inner .subtotal {
right: 13.5%;
}
}
@media(min-width: 790px){
@media(min-width: 790px){
.baozhang_before_footer{
.baozhang_before_footer{
margin-top: 30px;
margin-top: 30px;
...
...
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