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
c84e8451
Commit
c84e8451
authored
Sep 28, 2022
by
lmf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加产品模板文件
parent
7effe964
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
258 additions
and
0 deletions
+258
-0
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/additional.phtml
+11
-0
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/attribute.phtml
+133
-0
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/attributes.phtml
+33
-0
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/counter.phtml
+20
-0
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/description.phtml
+19
-0
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/details.phtml
+42
-0
No files found.
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/additional.phtml
0 → 100644
View file @
c84e8451
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/** @var $block \Magento\Catalog\Block\Product\View\Additional */
?>
<?php
foreach
(
$block
->
getChildHtmlList
()
as
$_html
)
:?>
<?=
/* @noEscape */
$_html
?>
<?php
endforeach
;
?>
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/attribute.phtml
0 → 100644
View file @
c84e8451
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
/**
* Product view template
*
* @var $block \Magento\Catalog\Block\Product\View\Description
*/
?>
<?php
$_helper
=
$this
->
helper
(
Magento\Catalog\Helper\Output
::
class
);
$_product
=
$block
->
getProduct
();
if
(
!
$_product
instanceof
\Magento\Catalog\Model\Product
)
{
return
;
}
$_call
=
$block
->
getAtCall
();
$_code
=
$block
->
getAtCode
();
$_className
=
$block
->
getCssClass
();
$_attributeLabel
=
$block
->
getAtLabel
();
$_attributeType
=
$block
->
getAtType
();
$_attributeAddAttribute
=
$block
->
getAddAttribute
();
$renderLabel
=
true
;
// if defined as 'none' in layout, do not render
if
(
$_attributeLabel
==
'none'
)
{
$renderLabel
=
false
;
}
if
(
$_attributeLabel
&&
$_attributeLabel
==
'default'
)
{
$_attributeLabel
=
$_product
->
getResource
()
->
getAttribute
(
$_code
)
->
getStoreLabel
();
}
if
(
$_attributeType
&&
$_attributeType
==
'text'
)
{
$_attributeValue
=
(
$_helper
->
productAttribute
(
$_product
,
$_product
->
$_call
(),
$_code
))
?
$_product
->
getAttributeText
(
$_code
)
:
''
;
}
else
{
$_attributeValue
=
$_helper
->
productAttribute
(
$_product
,
$_product
->
$_call
(),
$_code
);
}
?>
<style>
.joshine-desction
{
width
:
100%
;
}
.joshine-desction
.desction-left
{
width
:
90%
;
flot
:
left
;
font-size
:
small
;
font-weight
:
bolder
;
color
:
#000
;
}
.joshine-desction
.desction-right
{
width
:
10%
;
float
:
right
;
text-align
:
end
;
font-size
:
larger
;
color
:
#000
;
font-weight
:
600
;
}
.joshine-desction
.desction-info
{
padding
:
10px
;
margin
:
10px
;
font-size
:
small
;
}
</style>
<?php
if
(
$_attributeValue
)
:?>
<?
php
//print_r($_attributeAddAttribute);
?>
<div
class=
"product attribute
<?=
$block
->
escapeHtmlAttr
(
$_className
)
?>
"
>
<?php
if
(
$renderLabel
)
:?>
<
strong
class
="
type
"><?=
$block->escapeHtml
(
$_attributeLabel
) ?></strong>
<?php endif; ?>
<div class="
value
" <?= /* @noEscape */
$_attributeAddAttribute
?>>
<!--商品描述部分-->
<?php if(
$_attributeAddAttribute
== 'itemprop="
description
"'): ?>
<div class="
joshine
-
desction
">
<div id="
accordion
" data-mage-init='{
"
accordion
":{
"
active
": [1, 2],
"
collapsible
": true,
"
openedState
": "
active
",
"
multipleCollapsible
": true
}}'>
<div data-role="
collapsible
">
<div data-role="
trigger
">
<a class="
desction
-
left
info
-
desc
" href="
#">Description</a>
<
a
class
="
desction
-
right
info
-
desc
" href="
#">+</a>
</
div
>
</
div
>
<
div
data
-
role
=
"content"
>
<
div
class
="
desction
-
info
">
<?= /* @noEscape */
$_attributeValue
?>
<?= /* @noEscape */
$this->helper
(Magento\Catalog\Helper\Output::class)->productAttribute(
$block->getProduct
(),
$block->getProduct
()->getDescription(),
'description'
) ?>
</div>
</div>
</div>
</div>
<?php else:?>
<?= /* @noEscape */
$_attributeValue
?>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<script>
require([
'jquery'
], function ($) {
$("
.
info
-
desc
").click(function () {
$("
.
desction
-
right
").html("
-
");
})
});
</script>
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/attributes.phtml
0 → 100644
View file @
c84e8451
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
/**
* Product additional attributes template
*
* @var $block \Magento\Catalog\Block\Product\View\Attributes
*/
?>
<?php
$_helper
=
$this
->
helper
(
Magento\Catalog\Helper\Output
::
class
);
$_product
=
$block
->
getProduct
();
?>
<?php
if
(
$_additional
=
$block
->
getAdditionalData
())
:?>
<
div
class
="
additional
-
attributes
-
wrapper
table
-
wrapper
">
<table class="
data
table
additional
-
attributes
" id="
product
-
attribute
-
specs
-
table
">
<caption class="
table
-
caption
"><?=
$block->escapeHtml
(__('More Information')) ?></caption>
<tbody>
<?php foreach (
$_additional
as
$_data
) :?>
<tr>
<th class="
col
label
" scope="
row
"><?=
$block->escapeHtml
(
$_data['label']
) ?></th>
<td class="
col
data
" data-th="
<?=
$block
->
escapeHtmlAttr
(
$_data
[
'label'
])
?>
">
<?=
/* @noEscape */
$_helper
->
productAttribute
(
$_product
,
$_data
[
'value'
],
$_data
[
'code'
])
?>
</td>
</tr>
<?php
endforeach
;
?>
</tbody>
</table>
</div>
<?php
endif
;
?>
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/counter.phtml
0 → 100644
View file @
c84e8451
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* Product viewed counter template
*
* @var $block \Magento\Catalog\Block\Ui\ProductViewCounter
*/
?>
<script
type=
"text/x-magento-init"
>
{
"*"
:
{
"Magento_Catalog/js/product/view/provider"
:
{
"data"
:
<?=
/* @noEscape */
$block
->
getCurrentProductData
()
?>
}
}
}
</script>
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/description.phtml
0 → 100644
View file @
c84e8451
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
/**
* Product description template
*
* @var $block \Magento\Catalog\Block\Product\View\Description
*/
?>
<?=
/* @noEscape */
$this
->
helper
(
Magento\Catalog\Helper\Output
::
class
)
->
productAttribute
(
$block
->
getProduct
(),
$block
->
getProduct
()
->
getDescription
(),
'description'
)
?>
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/details.phtml
0 → 100644
View file @
c84e8451
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/** @var \Magento\Catalog\Block\Product\View\Details $block */
?>
<?php
if
(
$detailedInfoGroup
=
$block
->
getGroupSortedChildNames
(
'detailed_info'
,
'getChildHtml'
))
:?>
<
div
class
="
product
info
detailed
">
<?php
$layout
=
$block->getLayout
(); ?>
<div class="
product
data
items
" data-mage-init='
{
"tabs":{"openedState":"active"}
}
'>
<?php foreach (
$detailedInfoGroup
as
$name
) :?>
<?php
if (
$name
== "
product
.
info
.
description
"){
continue;
}
$html
=
$layout->renderElement
(
$name
);
if (!trim(
$html
)) {
continue;
}
$alias
=
$layout->getElementAlias
(
$name
);
$label
=
$block->getChildData
(
$alias
, 'title');
?>
<div class="
data
item
title
"
data-role="
collapsible
" id="
tab
-
label
-<?=
$block
->
escapeHtmlAttr
(
$alias
)
?>
">
<a
class=
"data switch"
tabindex=
"-1"
data-toggle=
"trigger"
href=
"#
<?=
$block
->
escapeUrl
(
$alias
)
?>
"
id=
"tab-label-
<?=
$block
->
escapeHtmlAttr
(
$alias
)
?>
-title"
>
<?=
/* @noEscape */
$label
?>
</a>
</div>
<div
class=
"data item content"
aria-labelledby=
"tab-label-
<?=
$block
->
escapeHtmlAttr
(
$alias
)
?>
-title"
id=
"
<?=
$block
->
escapeHtmlAttr
(
$alias
)
?>
"
data-role=
"content"
>
<?=
/* @noEscape */
$html
?>
</div>
<?php
endforeach
;
?>
</div>
</div>
<?php
endif
;
?>
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