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
2830d097
Commit
2830d097
authored
Sep 16, 2022
by
王东红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
购物车页面优化
parent
f094911a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
89 additions
and
1 deletions
+89
-1
app/code/JTool/LimitRelatedCrossUpsell/Block/Cart/Crosssell.php
+45
-0
app/code/JTool/LimitRelatedCrossUpsell/etc/di.xml
+5
-0
app/code/JTool/LimitRelatedCrossUpsell/etc/module.xml
+10
-0
app/code/JTool/LimitRelatedCrossUpsell/registration.php
+7
-0
app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml
+0
-1
app/design/frontend/Joshine/breeze/Magento_Checkout/layout/checkout_cart_index.xml
+0
-0
app/design/frontend/Joshine/breeze/web/css/_custom.less
+22
-0
No files found.
app/code/JTool/LimitRelatedCrossUpsell/Block/Cart/Crosssell.php
0 → 100644
View file @
2830d097
<?php
namespace
JTool\LimitRelatedCrossUpsell\Block\Cart
;
class
Crosssell
extends
\Magento\Checkout\Block\Cart\Crosssell
{
/**
* We can now set our limit here
*/
const
CROSSSELL_LIMIT
=
20
;
/**
* Crosssell constructor.
* @param \Magento\Catalog\Block\Product\Context $context
* @param \Magento\Checkout\Model\Session $checkoutSession
* @param \Magento\Catalog\Model\Product\Visibility $productVisibility
* @param \Magento\Catalog\Model\Product\LinkFactory $productLinkFactory
* @param \Magento\Quote\Model\Quote\Item\RelatedProducts $itemRelationsList
* @param \Magento\CatalogInventory\Helper\Stock $stockHelper
* @param array $data
*/
public
function
__construct
(
\Magento\Catalog\Block\Product\Context
$context
,
\Magento\Checkout\Model\Session
$checkoutSession
,
\Magento\Catalog\Model\Product\Visibility
$productVisibility
,
\Magento\Catalog\Model\Product\LinkFactory
$productLinkFactory
,
\Magento\Quote\Model\Quote\Item\RelatedProducts
$itemRelationsList
,
\Magento\CatalogInventory\Helper\Stock
$stockHelper
,
array
$data
=
[]
)
{
parent
::
__construct
(
$context
,
$checkoutSession
,
$productVisibility
,
$productLinkFactory
,
$itemRelationsList
,
$stockHelper
,
$data
);
$this
->
_maxItemCount
=
self
::
CROSSSELL_LIMIT
;
//limit number of products
}
}
\ No newline at end of file
app/code/JTool/LimitRelatedCrossUpsell/etc/di.xml
0 → 100644
View file @
2830d097
<?xml version="1.0" encoding="UTF-8" ?>
<config
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:ObjectManager/etc/config.xsd"
>
<preference
for=
"Magento\Checkout\Block\Cart\Crosssell"
type=
"JTool\LimitRelatedCrossUpsell\Block\Cart\Crosssell"
></preference>
</config>
\ No newline at end of file
app/code/JTool/LimitRelatedCrossUpsell/etc/module.xml
0 → 100644
View file @
2830d097
<?xml version="1.0"?>
<config
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:Module/etc/module.xsd"
>
<module
name=
"JTool_LimitRelatedCrossUpsell"
setup_version=
"1.0.0"
>
<sequence>
<module
name=
"Magento_Checkout"
></module>
<module
name=
"Magento_Catalog"
></module>
</sequence>
</module>
</config>
\ No newline at end of file
app/code/JTool/LimitRelatedCrossUpsell/registration.php
0 → 100644
View file @
2830d097
<?php
\Magento\Framework\Component\ComponentRegistrar
::
register
(
\Magento\Framework\Component\ComponentRegistrar
::
MODULE
,
'JTool_LimitRelatedCrossUpsell'
,
__DIR__
);
\ No newline at end of file
app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml
View file @
2830d097
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
<page
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
layout=
"1column"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:View/Layout/etc/page_configuration.xsd"
>
<page
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
layout=
"1column"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:View/Layout/etc/page_configuration.xsd"
>
<update
handle=
"checkout_cart_item_renderers"
/>
<update
handle=
"checkout_cart_item_renderers"
/>
<body>
<body>
<referenceBlock
name=
"page.main.title"
remove=
"true"
/>
<referenceContainer
name=
"page.messages"
>
<referenceContainer
name=
"page.messages"
>
<block
class=
"Magento\Checkout\Block\Cart\ValidationMessages"
name=
"checkout.cart.validationmessages"
/>
<block
class=
"Magento\Checkout\Block\Cart\ValidationMessages"
name=
"checkout.cart.validationmessages"
/>
</referenceContainer>
</referenceContainer>
...
...
app/design/frontend/Joshine/breeze/Magento_Checkout/layout/checkout_cart_index.xml
0 → 100644
View file @
2830d097
This diff is collapsed.
Click to expand it.
app/design/frontend/Joshine/breeze/web/css/_custom.less
View file @
2830d097
...
@@ -775,4 +775,25 @@ p.shopbycate-title {
...
@@ -775,4 +775,25 @@ p.shopbycate-title {
border-bottom: 2px solid #ccc;
border-bottom: 2px solid #ccc;
padding-bottom: 10px;
padding-bottom: 10px;
}
}
table tr.item-actions{
border-bottom: 1px dashed #e5e5e5;
}
}
.price_wish{
display: flex;
justify-content: space-between;
align-content: center;
align-items: flex-end;
}
.checkout-cart-index .column.main .block.crosssell .title{
font-size: 20px;
color: #222222;
line-height: 1.35;
text-align: center;
letter-spacing: -1.5px;
font-weight: 500;
margin-bottom: 20px;
text-transform:uppercase;
background:none;
}
}
\ No newline at end of file
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