Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WT-33 / WT-34: Staffelpreis && Variants #7

Merged
merged 1 commit into from
Jun 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions build/scss/page/details/_details.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@
}

&-input-group {
width: 250px;
width: 100%;

@include media-breakpoint-up(md) {
width: 250px;
}
}
}

Expand All @@ -78,4 +82,26 @@
border-left: 1px solid #ddd;
padding: 10px 15px;
}
}
}

.variant {
&-label {
margin-bottom: 0;
}
}

.btn-staffel {
margin-bottom: 5px;
width: 100%;

@include media-breakpoint-up(md) {
width: 250px;
}
}

.staffel {
&-dt {
float: left;
padding-right: 15px;
}
}
25 changes: 25 additions & 0 deletions build/scss/widget/product/_list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,29 @@
left: $grid-gutter-width/2;
}
}
}

.variant-dropdown {
margin-top: $grid-gutter-width/2;

.dropdown-menu {
&-item {
transition: background-color .3s;
padding: 5px 0;

&:nth-child(even) {
background-color: $gray-200;
}

&:hover {
background-color: $gray-200;
}
}

&-link {
display: block;
padding: 0 $grid-gutter-width/2;
text-decoration: none;
}
}
}
8 changes: 4 additions & 4 deletions tpl/page/details/inc/priceinfo.tpl
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[{assign var="currency" value=$oView->getActCurrency()}]
<div class="clearfix" style="clear:both;">
<a href="#modal_priceinfo_[{$oDetailsProduct->oxarticles__oxid->value|regex_replace:"/[^a-zA-Z0-9]/":""}]" role="button" class="btn btn-info freeButton" data-toggle="modal" title="[{oxmultilang ident="BLOCK_PRICE"}]">[{oxmultilang ident="BLOCK_PRICE"}]</a>
<a href="#modal_priceinfo_[{$oDetailsProduct->oxarticles__oxid->value|regex_replace:"/[^a-zA-Z0-9]/":""}]" role="button" class="btn btn-info btn-staffel freeButton" data-toggle="modal" title="[{oxmultilang ident="BLOCK_PRICE"}]">[{oxmultilang ident="BLOCK_PRICE"}]</a>
</div>

<div class="modal fade" id="modal_priceinfo_[{$oDetailsProduct->oxarticles__oxid->value|regex_replace:"/[^a-zA-Z0-9]/":""}]">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<span class="h4 modal-title">[{oxmultilang ident="BLOCK_PRICE"}]</span>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
</div>
<div class="modal-body">
<dl class="dl-horizontal">
[{foreach from=$oDetailsProduct->loadAmountPriceInfo() item=priceItem name=amountPrice}]
<dt>[{oxmultilang ident="FROM"}] [{$priceItem->oxprice2article__oxamount->value}] [{oxmultilang ident="PCS"}]</dt>
<dd>
<dt class="staffel-dt">[{oxmultilang ident="FROM"}] [{$priceItem->oxprice2article__oxamount->value}] [{oxmultilang ident="PCS"}]</dt>
<dd class="staffel-dd">
[{if $priceItem->oxprice2article__oxaddperc->value}]
[{$priceItem->oxprice2article__oxaddperc->value}]% [{oxmultilang ident="DISCOUNT"}]
[{else}]
Expand Down
2 changes: 1 addition & 1 deletion tpl/page/details/inc/productmain.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
[{assign var="blCanBuy" value=true}]
[{/if}]
[{/if}]
<div id="variants" class="selectorsBox js-fnSubmit">
<div id="variants" class="selectorsBox variant-dropdown js-fnSubmit">
[{assign var="blHasActiveSelections" value=false}]
[{foreach from=$aVariantSelections.selections item=oList key=iKey}]
[{if $oList->getActiveSelection()}]
Expand Down
2 changes: 1 addition & 1 deletion tpl/widget/product/listitem_infogrid.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

[{block name="widget_product_listitem_infogrid_selections"}]
[{if $aVariantSelections && $aVariantSelections.selections }]
<div id="variantselector_[{$iIndex}]" class="selectorsBox js-fnSubmit clear">
<div id="variantselector_[{$iIndex}]" class="selectorsBox variant-dropdown js-fnSubmit clear">
[{foreach from=$aVariantSelections.selections item=oSelectionList key=iKey}]
[{include file="widget/product/selectbox.tpl" oSelectionList=$oSelectionList sJsAction="js-fnSubmit" blHideLabel=true}]
[{/foreach}]
Expand Down
2 changes: 1 addition & 1 deletion tpl/widget/product/listitem_line.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@

[{block name="widget_product_listitem_line_selections"}]
[{if $aVariantSelections && $aVariantSelections.selections }]
<div id="variantselector_[{$iIndex}]" class="selectorsBox js-fnSubmit clear">
<div id="variantselector_[{$iIndex}]" class="selectorsBox variant-dropdown js-fnSubmit clear">
[{foreach from=$aVariantSelections.selections item=oSelectionList key=iKey}]
[{include file="widget/product/selectbox.tpl" oSelectionList=$oSelectionList sJsAction="js-fnSubmit" blHideLabel=true}]
[{/foreach}]
Expand Down
8 changes: 4 additions & 4 deletions tpl/widget/product/selectbox.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
<input type="hidden" name="[{$sFieldName|default:"varselid"}][[{$iKey}]]" value="[{if $oActiveSelection}][{$oActiveSelection->getValue()}][{/if}]">
<ul class="dropdown-menu [{$sJsAction}][{if $sFieldName != "sel"}] vardrop[{/if}]" role="menu">
[{if $oActiveSelection && !$blHideDefault}]
<li>
<a href="#" rel="">
<li class="dropdown-menu-item">
<a href="#" rel="" class="dropdown-menu-link">
[{if $sFieldName == "sel"}]
[{oxmultilang ident="PLEASE_CHOOSE"}]
[{else}]
Expand All @@ -35,8 +35,8 @@
</li>
[{/if}]
[{foreach from=$oSelections item=oSelection}]
<li class="[{if $oSelection->isDisabled()}]disabled js-disabled[{/if}]">
<a href="[{$oSelection->getLink()}]" data-selection-id="[{$oSelection->getValue()}]" class="[{if $oSelection->isActive()}]active[{/if}]">[{$oSelection->getName()}]</a>
<li class="dropdown-menu-item[{if $oSelection->isDisabled()}] disabled js-disabled[{/if}]">
<a href="[{$oSelection->getLink()}]" data-selection-id="[{$oSelection->getValue()}]" class="dropdown-menu-link[{if $oSelection->isActive()}] active[{/if}]">[{$oSelection->getName()}]</a>
</li>
[{/foreach}]
</ul>
Expand Down