Forked from vgrish/gist:b6998560c6a64c0f34109a9e632b9b56
Last active
April 8, 2020 11:34
-
-
Save Advanc8d/db7c2f5280832b602f5c12b19453292d to your computer and use it in GitHub Desktop.
msOptions & msProductOptions sort example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[!msOptionsPrice.initialize?]] | |
<h1>[[*pagetitle]]</h1> | |
<div id="msProduct" class="row"> | |
<div class="col-md-6"> | |
[[!msGallery]] | |
</div> | |
<div class="col-md-6"> | |
<form class="form-horizontal ms2_form msoptionsprice-product" method="post"> | |
<h3 class="msoptionsprice-name msoptionsprice-[[*id]]">[[*pagetitle]]</h3> | |
<input type="hidden" name="id" value="[[*id]]"/> | |
<div class="form-group"> | |
<label class="col-md-2 control-label">[[%ms2_product_article]]:</label> | |
<div class="col-md-10 form-control-static"> | |
<span class='msoptionsprice-article msoptionsprice-[[*id]]'>[[+article:default=`-`]]</span> | |
</div> | |
</div> | |
<div class="form-group"> | |
<label class="col-md-2 control-label">[[%ms2_product_price]]:</label> | |
<div class="col-md-10 form-control-static"> | |
<span class='msoptionsprice-cost msoptionsprice-[[*id]]'>[[+price]]</span> [[%ms2_frontend_currency]] | |
[[+old_price:gt=`0`:then=` | |
<span class="old_price"><span class='msoptionsprice-old-cost msoptionsprice-[[*id]]'>[[+old_price]]</span> [[%ms2_frontend_currency]]</span> | |
`:else=``]] | |
</div> | |
</div> | |
<div class="form-group form-inline"> | |
<label class="col-md-2 control-label" for="product_price">[[%ms2_cart_count]]:</label> | |
<div class="col-md-10"> | |
<input type="number" name="count" id="product_price" class="input-sm form-control" value="1"/> | |
[[%ms2_frontend_count_unit]] | |
</div> | |
</div> | |
<div class="form-group"> | |
<label class="col-md-2 control-label">[[%ms2_product_weight]]:</label> | |
<div class="col-md-10 form-control-static"> | |
<span class='msoptionsprice-mass msoptionsprice-[[*id]]'>[[+weight]]</span> [[%ms2_frontend_weight_unit]] | |
</div> | |
</div> | |
<div class="form-group"> | |
<label class="col-md-2 control-label">[[%ms2_product_made_in]]:</label> | |
<div class="col-md-10 form-control-static"> | |
[[+made_in:default=`-`]] | |
</div> | |
</div> | |
[[!msOptions? | |
&options=`color,size,test3,test6,memory` | |
&sortOptions=` | |
size:SORT_DESC:SORT_NUMERIC:101, | |
memory:SORT_ASC:SORT_NUMERIC, | |
test3:SORT_DESC:SORT_STRING:курица | |
` | |
]] | |
[[!msProductOptions? | |
&sortOptions=` | |
test7:SORT_DESC:SORT_STRING:r | |
` | |
]] | |
<div class="form-group"> | |
<div class="col-md-offset-2 col-md-10"> | |
<button type="submit" class="btn btn-default" name="ms2_action" value="cart/add"> | |
<i class="glyphicon glyphicon-barcode"></i> [[%ms2_frontend_add_to_cart]] | |
</button> | |
</div> | |
</div> | |
</form> | |
</div> | |
</div> | |
<hr> | |
[[!msOptionsPrice.modification? | |
&includeThumbs=`120x90` | |
&limit=`30` | |
]] | |
[[*content]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment