first commit
This commit is contained in:
30
templates/shop-product/_partial/product-attribute.php
Normal file
30
templates/shop-product/_partial/product-attribute.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
global $lang_id;
|
||||
$attribute_details = \front\factory\ShopAttribute::attribute_details( $this -> attribute['id'], $lang_id );
|
||||
if ( $attribute_details['type'] == 0 )
|
||||
{
|
||||
?>
|
||||
<div class="attribute-container fradio-group attribute-<?= \S::seo( $attribute_details['language']['name'] );?>" level="<?= $this -> level;?>" order="<?= $this -> order;?>" attribute="<?= \S::seo( $attribute_details['language']['name'] );?>" attribute-name="<?= $attribute_details['language']['name'];?>">
|
||||
<p class="attribute-label"><?= $attribute_details['language']['name'];?>:</p>
|
||||
<? foreach ( $this -> attribute['values'] as $value ):?>
|
||||
<div class="fradio">
|
||||
<input type="radio" id="<?= $this -> attribute['id'];?>-<?= $value['id'];?>" <? if ( $value['is_default'] ):?>checked="checked"<? endif;?> require="true" value="<?= $this -> attribute['id'];?>-<?= $value['id'];?>" name="<?= \S::seo( $attribute_details['language']['name'] );?>">
|
||||
<label for="<?= $this -> attribute['id'];?>-<?= $value['id'];?>" order="<?= $this -> order;?>"><?= \shop\ProductAttribute::get_value_name( $value['id'], $lang_id );?></label>
|
||||
</div>
|
||||
<? if ( $value['is_default'] ):?>
|
||||
<script class="footer" type="text/javascript">
|
||||
$( function()
|
||||
{
|
||||
<? if ( $this -> level == $this -> max_level ):?>
|
||||
var refresh = true;
|
||||
<? else:?>
|
||||
var refresh = false;
|
||||
<? endif;?>
|
||||
fradio_label_click( $( "label[for='<?= $this -> attribute['id'];?>-<?= $value['id'];?>']" ), refresh );
|
||||
});
|
||||
</script>
|
||||
<? endif;?>
|
||||
<? endforeach;?>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
10
templates/shop-product/_partial/product-custom-fields.php
Normal file
10
templates/shop-product/_partial/product-custom-fields.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<? if ( is_array( $this -> custom_fields ) ): foreach ( $this -> custom_fields as $custom_field ):?>
|
||||
<div class="custom-field">
|
||||
<div class="_name">
|
||||
<?= $custom_field['name'];?>:
|
||||
</div>
|
||||
<div class="_input">
|
||||
<input type="text" class="form-control" name="custom_field[<?= $custom_field['id_additional_field'];?>]" field_name="<?= $custom_field['name'];?>" value="">
|
||||
</div>
|
||||
</div>
|
||||
<? endforeach; endif;?>
|
||||
15
templates/shop-product/_partial/product-meta.php
Normal file
15
templates/shop-product/_partial/product-meta.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
use shop\Product;
|
||||
$product_meta = Product::product_meta($this->product_id);
|
||||
?>
|
||||
|
||||
<?php if (is_array($product_meta) && count($product_meta)): ?>
|
||||
<? $lastKey = array_key_last($product_meta); ?>
|
||||
|
||||
<div id="product-meta">
|
||||
Kategorie:
|
||||
<? foreach ($product_meta as $key => $value) : ?>
|
||||
<a href="/<?= $value['seo_link']; ?>"><?= $value['title']; ?></a><?= $lastKey != $key ? ', ': ''; ?>
|
||||
<? endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,22 @@
|
||||
<div class="warehouse-message">
|
||||
<?
|
||||
// jeżeli produkt nie jest kombinacją
|
||||
if ( !$this -> product['product_combinations'] )
|
||||
{
|
||||
if ( $this -> product['quantity'] > 0 or $this -> product['quantity'] == 0 and $this -> product['stock_0_buy'] )
|
||||
{
|
||||
if ( $this -> product -> language['warehouse_message_nonzero'] )
|
||||
echo $this -> product -> language['warehouse_message_nonzero'];
|
||||
else if ( $this -> settings['warehouse_message_nonzero_' . $this -> lang_id] )
|
||||
echo $this -> settings['warehouse_message_nonzero_' . $this -> lang_id];
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $this -> product -> language['warehouse_message_zero'] )
|
||||
echo $this -> product -> language['warehouse_message_zero'];
|
||||
else if ( $this -> settings['warehouse_message_zero_' . $this -> lang_id] )
|
||||
echo $this -> settings['warehouse_message_zero_' . $this -> lang_id];
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user