Enhance product management and coupon features
- Added styling for input group add-ons and additional fields in SCSS. - Updated shop coupon view to include a new column for usage count. - Display coupon code and amount in order details if applicable. - Improved product edit template to handle custom fields with required validation. - Modified product save logic to include custom field requirements. - Enhanced decimal normalization function for better input handling. - Implemented checkbox normalization for form submissions. - Updated custom fields in product templates to reflect required status. - Fixed URL for fetching changelog updates.
This commit is contained in:
BIN
templates/.DS_Store
vendored
BIN
templates/.DS_Store
vendored
Binary file not shown.
@@ -4,7 +4,7 @@
|
||||
<?= $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="">
|
||||
<input type="text" class="form-control" name="custom_field[<?= $custom_field['id_additional_field'];?>]" field_name="<?= $custom_field['name'];?>" value="" <? if ( !empty( $custom_field['is_required'] ) ): ?>required<? endif; ?>>
|
||||
</div>
|
||||
</div>
|
||||
<? endforeach; endif;?>
|
||||
@@ -255,22 +255,24 @@
|
||||
<script class="footer" type="text/javascript" src="/libraries/fancybox3/js/wheel.js"></script>
|
||||
<script class="footer" type="text/javascript" src="/plugins/OwlCarousel/owl.carousel.js"></script>
|
||||
<script type="text/javascript">
|
||||
<? if ( $this -> settings['google_tag_manager_id'] ):?>
|
||||
dataLayer.push({ ecommerce: null });
|
||||
dataLayer.push({
|
||||
event: "view_item",
|
||||
ecommerce: {
|
||||
items: [
|
||||
{
|
||||
item_id: "<?= $this -> product -> id;?>",
|
||||
item_name: "<?= str_replace( '"', '', $this -> product -> language['name'] );?>",
|
||||
price: '<? if ( $this -> product -> price_brutto_promo ): echo \S::normalize_decimal( $this -> product -> price_brutto_promo ); else: echo \S::normalize_decimal( $this -> product -> price_brutto ); endif;?>',
|
||||
quantity: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
<? endif;?>
|
||||
$(function(){
|
||||
<? if ( $this -> settings['google_tag_manager_id'] ):?>
|
||||
dataLayer.push({ ecommerce: null });
|
||||
dataLayer.push({
|
||||
event: "view_item",
|
||||
ecommerce: {
|
||||
items: [
|
||||
{
|
||||
item_id: "<?= $this -> product -> id;?>",
|
||||
item_name: "<?= str_replace( '"', '', $this -> product -> language['name'] );?>",
|
||||
price: '<? if ( $this -> product -> price_brutto_promo ): echo \S::normalize_decimal( $this -> product -> price_brutto_promo ); else: echo \S::normalize_decimal( $this -> product -> price_brutto ); endif;?>',
|
||||
quantity: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
<? endif;?>
|
||||
});
|
||||
</script>
|
||||
<script class="footer" type="text/javascript">
|
||||
$( function ()
|
||||
@@ -524,7 +526,7 @@
|
||||
}
|
||||
|
||||
// dodatkowe pola muszą być uzupełnione
|
||||
$( '.custom-field input' ).each( function( index, element )
|
||||
$( '.custom-field input[required]' ).each( function( index, element )
|
||||
{
|
||||
if ( $.trim( $( element ).val() ) == '' )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user